w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Glassfish, EC2, Swing Application not connecting to @remote interface
You should still be able to add an entry to your hosts file for your eIP - have you tried that? EC2 instances all have a public IP and a private 10.X.X.X address. The eIP replaces the public IP address and is fixed (until you disassociate it). The alternative with AWS, which will allow you to have a fixed private IP too, is to deploy to a VPC. Amazon have some very good documentation on VPCs. What you're getting, in a nutshell, is comparable to a local network, so you can just pick your CIDR block and create subnets, for example Now, when you launch an EC2 instance, you can launch into that VPC subnet and choose the private IP. Along with your eIP, you now have both IP addresses (public and private) set permanently, unless you decide to change them yourself (for whatever re

Categories : Java

Connecting to a TCP server via TcpClient through proxy
In this link you would get code to connect tcp via http proxy.

Categories : C#

Weird issue with TcpClient.Connected=true when tcpclient and relative stream have been closed C#
I don't know if this may interest anyone, but I'll tell you how I solved this issue. Since TcpClient.Connected doesn't seem to be reliable, (under certain conditions it will still be true even after a failed read attempt on the underlying stream) instead of checking the connection status from TcpClient.Connected, I use a bool "disconnected". Such bool value is managed by the thread which was listening from such TcpClient (through a BinaryReader): when a read fails -> it means that the connection has been closed -> an exception is generated and it's gracefully handled by a try/catch, where: try { reader.Read(); } catch { disconnect = true; }

Categories : C#

Connecting to WiFi host using Bonjour on iPhone
This should give you enough to get started. You'll also learn the basics of the networking necessities that you will need. Networking an Bonjour on iPhone. Or you could just see the Apple Docs here.

Categories : Iphone

Having trouble with connecting SQLite in host Java
SQLite does not handle remote databases very well. According to their Appropriate Uses For SQLite page, "... Another way to look at SQLite is this: SQLite is not designed to replace Oracle. It is designed to replace fopen()." When you connect to an SQLite DB, you can only do it if you have direct access to the database file. If the file is shared on a remote drive, you can probably use jdbc:sqlite:\hostnameXX.sqlite as your connection string, but only if you can see the file that way in Windows explorer. On the other hand, you may want to try to install a database that intentionally allows remote connections. Apache Derby is a good one with a small footprint. It is written in Java and has a very nice and easy to use JDBC driver. Derby is available at http://db.apache.org/derby/.

Categories : Java

Connecting to https host with soapclient: how to fix SSL problems?
Interesting. Try adding this: wget https://[[SERVER]]/soap/ —post-file=request.xml —header=”Content-Type: text/xml” -O response.xml This will save the result as a file named response.xml.

Categories : PHP

SFTP: how to know if i'm connecting to a unix or windows host?
There is a number of possible ways to complete your task, however I'm not sure if your libraries support them: SFTP protocol contains SSH_FXF_TEXT_MODE file open flag, allowing to open file in text mode, translating EOL sequences to CRLF (available since version 6 of protocol, AFAIR). 'newline' SFTP extension - it tells exact server's EOL convention Parsing SSH server software/version string.

Categories : Java

strange mongodb behavior when connecting to invalid host/port combination
Default driver is never to timeout or whatever is the os default timeout (I think it's 30 min on linux bot not completely sure). You can tweak it yourself as the link above show. But don't set it to small or you'll continuously get timeouts and reconnects

Categories : Node Js

Connecting to remote tty using perl
If you can connect to the remote host via SSH, you can also get your Perl script to run on the remote host. Maybe as a daemon. Then each script talks to the devices via local ttys, and they could talk to each other over TCP or UDP sockets, using a protocol you define.

Categories : Perl

Trouble connecting to Postgresql database in Vagrant guest box with Induction from host machine?
check file pg_hba.conf looks like require allow connection most easy and lesss secure set 'trust' (everyone can use your postgresql) http://www.postgresql.org/docs/9.2/static/auth-pg-hba-conf.html

Categories : Postgresql

OSX application freezes when try to set the value of TextView?
3rd day that I am working with objective-c and finally found the answer :) I used the performSelectorOnMainThread and solved the problem - (IBAction)sendReq:(id)sender { request *req = [[request alloc] init]; voidCallback callback = ^(NSURLResponse *resp, NSData *data, NSError *error) { NSString *val = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding]; [self performSelectorOnMainThread:@selector(setResponseValue:) withObject:val waitUntilDone:NO]; }; [req setUrl:[[NSURL alloc] initWithString:@"http://programming.com"]]; [req setCallback:callback]; [req send]; } - (void)setResponseValue:(NSString *)resp { [self.txtResponse setString:resp]; //NSLog(resp); }

Categories : Objective C

SCP from remote host using groovy
In groovy, '0' is a String constant, not a char or byte. You can't subtract a String from a byte. Convert it to a char or use the first byte: byte b = 51 // ASCII '3' assert b - ('0' as char) == 3 assert b - '0'.bytes[0] == 3 A better way to get a digit from a byte is to use Character.digit(). For example: filesize = filesize * 10L + Character.digit(buf[0], 10)

Categories : Groovy

Connecting to remote server with pgadmin
Specify a different local port in the script. The specified port is already in use by something else, possibly a local PostgreSQL running on port 5433. That's really just a toy wrapper around an SSH tunnel. Personally I tend to just fire up the ssh tunnel directly when I need that, or ssh into the remote machine and use psql on it locally.

Categories : Postgresql

C# .Net application freezes when writing to the file
Your GUI slows down but keeps working after a while. It seems as if you're exhausting a resource, and the OS tries to compensate. My guess is memory - are you perhaps leaking memory? Make sure the memory you use in the secondary thread is freed.

Categories : C#

BackgroundWorker in MVC3 application freezes UI
I'm developing MVC3 based web application ... so I put it in BackgroundWorker BackgroundWorker is designed to work with Windows (forms) application; to achieve similar in web application, use Task.Factory.StartNew or Thread (more primitive)

Categories : C#

Connecting to a remote database from Azure Websites
Are you using the default MySQL Database from Web Sites? If so, could you be hitting an issue with the maximum concurrent connections? The default database allows up to 4 concurrent connections. If you want to upgrade to a larger database you can do so from the provider ClearDB

Categories : Mysql

Connecting to remote MySQL from local machine
I'm not sure why they would say not to add - that's the local machine, which means that people from the outside can't access it. So you have skip-networking turned on and you're connecting through a local UNIX socket? Are you sure it didn't say not to add anything other than Do you have SSH access? If so, you can easily use SSH tunneling so that you'll only have to connect locally with a command like ssh -L 3307:localhost:3306 -N yoursever.com Then you connect locally on your home machine to port 3307 (you can make this 3306 but you said you develop your database locally as well, so in that case you'd need a different port). Then the packets go through SSH and magically appear at the database, looking as though they had come from the same machine. The security th

Categories : Mysql

Connecting to a remote machine through client-server
You say the other machine has an external ip address. This implies it also has a local ip address; ie it is behind a NAT firewall or similar. In this case, you will have to configure the firewall to allow communication to take place, eg by setting up port forwarding. Applications such as MSN Messenger, VOIP clients etc have elaborate mechanisms to negotiate this automatically, but they're often not very successful.

Categories : Vb.Net

Connecting to remote machine without username/password
You have to use interop to use the Credential Management API in .NET: http://www.microsoft.com/indonesia/msdn/credmgmt.aspx

Categories : C#

connecting to SQLSERVER database without remote connection
I guess I somehow need to force the other company to allow remote connection with us. Am I wrong? Very wrong, you hardly ever need remote connections to a database. An HTTP service in front of the database is the way to go. Would you otherwise hardcode the database credentials in the application you distribute and hope the T-SQL TCP port is opened for outgoing traffic in the user's firewall? since i dont know any of the table names this is nonsense Then ask them for a diagram. even if I write a .net web service or web application is it possible to publish it over an ftp? Of course, why not?

Categories : Dotnet

Connecting directly to remote MySQL database in iOS
You need to create a web service that will expose a set of APIs that are then use by your iPhone app to push/pull data. You may then choose to cache the data locally (on the iPhone) in a sqlite3 database. The most common data transfer formats are JSON and XML.

Categories : Mysql

connecting a remote django app to postgresql on openshift
You can do a reverse port forward from OpenShift to your other server OR you can port forward from your server to the OpenShift server - but there is no direct DB access. Direct access would require exposing your database to the outside world and is generally considered bad security practice

Categories : Django

Connecting to a remote database server at run time
I don't know what type of application you're creating. But you can add a key to the config file at runtime and recall it next time the application is run. System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); config.AppSettings.Settings["connectionString"].Value = "<connectionstring>"; config.Save(ConfigurationSaveMode.Modified);

Categories : C#

Failed to connect to remote VM. Connection refused. when trying to debug remote java application in Flash Builder 4.7
Each debug argument must be placed in a line by itself, after the -vm argument. This should do the trick: -vmargs -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000

Categories : Java

RST request sent to the remote host after I send a SYN and receive a SYN-ACK
You can setup a firewall rule with iptables which will prevent the kernel from answering to your connections. libpcap gets the packets before the firewall denies them so you can still read them and respond to them yourself.

Categories : Networking

how to replace IP address on remote host using expect
Quote the “EOF” (here document marker) in the line where you use it, that is, change expect_transfer=`cat << EOF into expect_transfer=`cat << EOF or expect_transfer=`cat << 'EOF' When you do not quote the here document marker, the shell interpolates variable references like $ENV inside the here document. In your case, ENV='$HOME/.kshrc' so that Perl does not see $ENV{OLD} but $HOME/.kshrc{OLD} which is clearly wrong.

Categories : Linux

UDP with netty different pipeline per remote host not working
Made a fundamental mistake. With ConnectionlessBootstrap everything runs over the same channel and we were closing the channel after each call to the server...thus disabling UDP. That's what our TCP code does and it took a while to realize it works differently. Hope someone else saves some time and headaches off of this.

Categories : Java

Selenium Webdriver: INFO: I/O exception (java.net.BindException) caught when connecting to the target host: Address already in use: connect
This question solves this problem It's the info-level message. Don't worry about it.

Categories : Java

Exception connecting to Remote Solr Instance (407 error)
HTTP code 407 implies Proxy Authentication Required, you need to set authentication information while making connection to server via HttpClient: httpclient.getCredentialsProvider().setCredentials( AuthScope.ANY, new UsernamePasswordCredentials(username, password)); solrServer = new HttpSolrServer(solrUrl, httpclient);//with credentials you may like to check similar discussions: Solr - instantiate HttpSolrServer with Httpclient Solr 4 with basic authentication

Categories : Java

Connecting to remote services from multiple threaded requests
Since memcached have syncronous protocol you should not write next request before you got answer to prevous. So, no other thread can chat in same memcached connection. I'd prefer to make thread-local connection if you work with it in "blocking" mode. Or you can make it work in "async" manner: make pool of connections, pick a connection from it (and lock it). After request is done, return it to pool. Also, you can make a request queue and process it in special thread(s) (using multigets and callbacks).

Categories : C++

Java jLayer application freezes while playing song
It happens because the song-playing happens in the same thread as the GUI, or more specifically the EDT. Therefore, the GUI does not response, when the song is playing. To fix this, do something like this: new Thread(){ run(){ //Your play code } }.start(); This will play your stuff in a seperate Thread. However, you have to regard that since the GUI is responsive, you can start songs while songs are still playing. For more information, see this

Categories : Java

An existing connection was forcibly closed by the remote host on WCF
"Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host." This error could be generated because of Group Policy Settings. Try connecting to Analysis Service using SQL Management Studio, if error persist try to elevate the user privilages.

Categories : Wcf

Execute local script on remote Linux host
Copy the script with scp, then run it. scp script.sh user@hostname: ssh user@hostname sudo ./script.sh > results.txt To do it in one line: ssh user@hostname 'cat > script.sh; chmod 755 script.sh; sudo ./script.sh' < script.sh > results.txt However, this won't work if you need to enter a password into sudo. All of ssh's stdin will be put in the script. There might be a way to do this using Expect, but I don't have much expertise there.

Categories : Bash

Is it possible to install or update a Windows Service on a remote host in C#?
I would recommend looking at this existing question: Installing a windows service on a remote machine using a given username. In this answer they mention using "SC.exe". This is a tool in windows that allows you to "create and start a service". You should easily be able to run this program using the Process class in System.Diagnostics. For example here is code, based on the example by Patrick McDonald, that would start NewServ.exe on the computer "remotecomputer". Process process = new Process(); process.Start(@"C:WindowsSystem32SC.exe", @"\remotecomputer create newservice binpath= C:WindowsSystem32Newserv.exe start= auto obj= DOMAINusername password= pwd"); If this doesn't work, then you should be able to create your own installer, copy it to the remote computer, and then start the pr

Categories : C#

Rails using localhost instead of remote ip host to connect to mysql2
We found the issue. The host was actually being pulled in correctly. The problem was that we had to specify a database that already existed in mysql, not a new one. Once that was specified the rake db:migrate worked.

Categories : Ruby On Rails

maven + ant run local bash script on the remote host
Yes you can do that with sshexec. It has an attribute called input that you can point to a local file to run a script.

Categories : Maven

Recv() call hangs after remote host terminates
Assuming you want to continue to use blocking sockets, you can use the SO_RCVTIMEO socket option: SO_RCVTIMEO and SO_SNDTIMEO Specify the receiving or sending timeouts until reporting an error. The parameter is a struct timeval. If an input or out- put function blocks for this period of time, and data has been sent or received, the return value of that function will be the amount of data transferred; if no data has been transferred and the timeout has been reached then -1 is returned with errno set to EAGAIN or EWOULDBLOCK just as if the socket was specified to be nonblocking. If the timeout is set to zero (the default) then the operation will never timeout. So, before you begi

Categories : C++

Problems connecting to a remote server and performing a simple db query
Log on to your database server, check the details and obtain the correct server information such as server, username and password. Once you change the server details you shoudl be ready to rock n roll. Edit post with the host name/server name and we may be able to find it for you. You'll have a phpMyAdmin page where you're hosting the site. Check the membership area or cPanel.

Categories : PHP

Trouble connecting the cassandra database via remote access through JAVA
I could ping the machine. But I could not access the machine using telnet in windows. The servers is linux machine. Do you have any idea ? Your firewall is blocking off the telnet port and probably the rest of the ports cassandra needs. You need to add an exception telling the firewall to open port 9160 (the client port). 9160 is the only port you really need to have open unless you want remote jmx management etc. To add an exception to your linux firewall: iptables -I INPUT -p tcp --dport 9160 --syn -j ACCEPT And if you want to save the state: service iptables save

Categories : Cassandra

Connecting to a Remote Server on a different domain -- how do I enter the username and password?
According to Microsoft it should be possible. You need to authenticate against the remote domain, though, e.g. like this: computer = "..." username = "OTHERDOMAINuser" password = "..." Set locator = CreateObject("WbemScripting.SWbemLocator") Set wmi = locator.ConnectServer(computer, "rootcimv2", username, password) wmi.Security_.ImpersonationLevel = 3

Categories : Vbscript

© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.