Connection refused from Java in Windows to remote postgresql Linux server

I fail to connect from windows to a remote postgresql linux server. The SQLEexception received is same as the SQLException that happen to the localhost connection to postgresql where the condition of postgresql not started or not start with -i option to allow tcp/ip connection. The SQLException is SQLException: Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
Please help..
Java class file with the following codes:
String url = "jdbc:postgresql://servername:5432/databasename";
Connection con = DriverManager.getConnection(url,"username","password");
The /var/lib/pgsql/data/pg_hba.conf have the following configuration:
# TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD
local all all trust
host all all 127.0.0.1 255.255.255.255 trust
hostssl all all 219.94.117.8 255.255.255.255 trust
hostssl all all 0.0.0.0. 0.0.0.0 trust
host all all 219.94.117.8 255.255.255.255 trust
host all all 0.0.0.0 0.0.0.0 trust
The /var/lib/pgsql/data/postgresql.conf have the following configuration:
# Connection Parameters
tcpip_socket = true
#ssl = false
#max_connections = 32
#superuser_reserved_connections = 2
#port = 5432
#hostname_lookup = false
#show_source_port = false
The postgresql start in the /etc/init.d directory with the command ./postgresql start
postgres 16923 0.1 0.3 9556 1956 pts/0 S 01:58 0:00 /usr/bin/postmaster -p 5432 -i
postgres 16925 0.0 0.3 10548 1948 pts/0 S 01:58 0:00 postgres: stats buffer process
postgres 16926 0.0 0.3 9580 1968 pts/0 S 01:58 0:00 postgres: stats collector process
root 16931 0.0 0.1 2664 716 pts/0 R 01:58 0:00 ps aux

On my machine (OS X ) I had trouble with postgresql refusing to notice the -i option in the configuration file. Instead I manually had to specifiy postmaster -i ...
Also check your firewall settings. I also could not get localhost to work, I had to use the actual IP address of the machine, ie not 127.0.0.1. Use telnet hostip 5432 to check if you can get a connection. For my situation once telnet would connect, then JDBC started working too. Then localhost started working too.

Similar Messages

  • Problem opening device from Java on Windows XP

    Hi,
    I am having trouble opening the TUN device (it is a virtual network device developed by the OpenVPN project - http://openvpn.net) from Java on Windows.
    I found from the registry that the key for the device on my machine is
    {5998ABF4-70CC-4B8C-9CBF-F2B985BAD4A2}.
    From elsewhere on the web, I found that on Windows this device can be
    addressed as \\.\{5998ABF4-70CC-4B8C-9CBF-F2B985BAD4A2}.tap
    I then wrote up a short C code,
    char *tun_dev_name = "\\\\.\\{5998ABF4-70CC-4B8C-9CBF-F2B985BAD4A2}.tap";
    FILE *f = fopen(tun_dev_name, "rw");
    fclose(f);
    HANDLE h = CreateFile(tun_dev_name, GENERIC_WRITE | GENERIC_READ, 0, 0, \
    OPEN_EXISTING, FILE_ATTRIBUTE_SYSTEM | FILE_FLAG_OVERLAPPED, 0);
    CloseHandle(h);In the above code, the FILE* returned is non-NULL and the HANDLE returned is positive.
    However, when I try to do the same in Java using the code below,
    String tun_dev_name =
    new String("\\\\.\\{5998ABF4-70CC-4B8C-9CBF-F2B985BAD4A2}.tap");
    RandomAccessFile raf = new RandomAccessFile(tun_dev_name, "rw");
    []/code]
    a "java.io.IOException: Invalid argument" is thrown. The same exception is thrown when I try to open either FileInputStream or FileOutputStream instead of RandomAccessFile.
    In fact, when I invoke the above C code as a native method from within Java,
    though a valid HANDLE is still returned, the FILE* returned is now NULL. I
    have tried giving all permissions to my codebase using Java's policytool, but that didn't help. BTW, I ran all this code on Windows XP from cygwin.
    Clearly this problem isn't with OpenVPN because I'm able to open the device using both fopen and CreateFile from C. Please let me know if one of you knows what the problem could be and what I need to do to fix it. In case, this is not the right forum for this question, kindly let me know which other forum I should pose this question on.
    Thanks!
    Harsha                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    I am sorry but looks like somehow some text got missed out from my message.
    After the C code and before the Java code, I had intended to mention that when that C code is compiled and run independently, both the fopen and CreateFile calls work fine, with a non-NULL FILE* and a valid HANDLE being returned, respectively.
    And as I have already mentioned, when I invoke the C code as a native method from within Java, the CreateFile still works but the fopen fails returning NULL.
    Sorry for missing that out. Hope somebody will be able to help me out.
    Thanks!
    Harsha

  • Users can only connect to RD farm website and cannot remote into terminal server , when connected via VPN

    Hello,
    I have a RD farm using 3 Win 2012 servers (1 broker and 2 session host), for internal use only, have not
    configured gateway for internet access.
    Users are able to connect to RD farm website and remote into terminal server, within office
    but can only connect to RD farm website and cannot remote into terminal server , when connected via VPN
    Its takes long time at securing connection and fails.
    Thanks

    Hi,
    Thank you for your posting in Windows Server Forum.
    First of all I would suggest you to configure RD gateway role on your server and pass all the connection through it because it’s a best practice to use RD Gateway in RDS Farm. 
    Apart from this, if you are not using RD Gateway then you must check that you have successfully forwarded port 3389 for RDS to access via VPN. Also check that you have made configuration under IIS Manager to enable Forms Authentication. Please check
    this link.
    In addition, please refer beneath article for additional details.
    1. How to Access Windows Remote Desktop Over the Internet
    2. Remote Desktop Services in Windows 2008 R2 – Part 3 – RD Web Access & RemoteApp
    (For reference)
    Hope it helps! 
    Thanks,
    Dharmesh

  • Connection refused with java, but not javaw

    I have a ServerSocket based program...listening on a port. It is really a very simple program. And I can run it with javaw. Then I can use another problem, for example, telnet to connect to that port, just to prove I can connect to that port. Everything is fine.
    Now if I run the exactly the same ServerSocket program with java, then I got the connection refused error.
    It is weird.
    Do you know why? Do you know a good socket troubleshooting tool on Windows? I am afraid of the viruses, so I haven't downloaded any free tools yet.

    You're right.
    The Norton personal firewall does not handle localhost to localhost correctly. I do all the tests on the same machine. The netstat -an shows the port is listening in either case. But now I know the firewall blocks one of them silently. No rule prompt was triggered. Worse, no logging produced for that particular access.
    Thanks. You've been very helpful.

  • SOAP 'Connection refused' in java

    I am using the code attached to Log onto the SOAP Actuate reporting server using HttpURLConnection in Java. I get "java.net.ConnectException: Connection refused" while calling connection.getInputStream(); PLease note I do not get error while openConnection() but get it while getting the InputStream.
    URL u = new URL("http://devserver:8000//soap/servlet/acweb");
                   System.out.println("Opening connection...");
    URLConnection uc = u.openConnection();
                   System.out.println("Opening connection Done...");
    HttpURLConnection connection = (HttpURLConnection) uc;
    connection.setDoOutput(true);
    connection.setDoInput(true);
    connection.setRequestMethod("POST");
    connection.setRequestProperty("Connection", "Keep-Alive");
    connection.setRequestProperty("Content-Type", "text/xml;charset-'utf-8'");
    connection.setRequestProperty("SOAPAction", "");
    Writer wout = new OutputStreamWriter(connection.getOutputStream());
    System.out.println("connection.getOutputStream...");
    wout.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n");
    wout.write("<SOAP-ENV:Envelope xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"");
    wout.write("xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"");
    wout.write("xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">");
    wout.write("<SOAP-ENV:Body>");
    wout.write("<SOAP-ACTU:Login xmlns:SOAP-ACTU=\"http://schemas.actuate.com/actuate6\">");
    wout.write("<User>testuser</User>");
    wout.write("<Password>tsetpwd</Password>");
    wout.write("<Domain>HQ</Domain>");
    wout.write("<UserSettings>true</UserSettings>");
    wout.write("</SOAP-ACTU:Login>");
    wout.write(" </SOAP-ENV:Body>");
    wout.write("</SOAP-ENV:Envelope>");
    wout.flush();
    wout.close();
    System.out.println("Wout.close...");
    InputStream in = connection.getInputStream();
    System.out.println("connection.ger Input Stream...");
    int c;
    while ((c = in.read()) != -1) System.out.print(c);
    in.close();
    System.out.println("Input Stream closed...");
    catch (IOException e)
    System.out.println("IO EXception : "+e);
    catch (Exception ee)
    System.out.println("EXception : "+ee);

    "Connection refused" generally means there is no server listening at the port you tried to connect to.

  • Executing a dos command from java in windows nt

    i need to execute the
    " net send"
    command from the command line in windows nt, from within my java program... is there any way that i can execute cmommands in the dos command shell? or rather, does anybody know a way i can send a message ( in windows ) from java, from one computer to another over the lan?? I cannot have a java programming running on all the other computers, so i cannot make my program serve, it must just send the messges using a lan command....
    (the net send command just sends a message in the form of a pop up box on the receiver's screeen)
    thanks a bunch guys!!!
    Thanks a bunch guys!!!!

    you can do that with exec() in Runtime.
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec(command here);but before you do that you need to read this:
    http://www.javaworld.com/jw-12-2000/jw-1229-traps.html
    hth
    partha

  • Connecting a Mac to a Window's 2008 small business server

    I'm looking to purchase an iMac to use at work. Everyone else in the office uses a PC and are connected to our current Window's 2008 server. I would be the only person using a Mac. Is there any way to connect a Mac to the server?

    There should be no problems connecting the Mac to a Windows server for file sharing. I do it every day. See:
    http://support.apple.com/kb/ht1568
    If there are Windows-based programs that you will need to use, you may need to run Windows on the Mac for those programs, but there are several very practical ways to accomplish that.
    Regards.

  • Tomcat connection refused from localhost

    I have Tomcat 5.5.7 installed as a stand-alone server on my local machine. I have installed Java jre 1.5.0 (5.0). The OS is Windows 2000 SP3. The install went without incident. I set system variables JAVA_HOME, CATALINA_HOME, TOMCAT_HOME.
    When I try to access anything using tomcat, I get "The connection was refused when contacting ......" I've used ...
    http://localhost
    http://localhost :8080
    http://127.0.0.1
    http://127.0.0.1:8080
    ...and a number of variations to get at the webapps area. All give exactly the same response.
    I can ping myself, but when I run Steve Gibson's IS Serve, it tells me the port is closed.
    I think I have server.xml set up correctly. Any ideas. Any help will be appreciated. Thanks.
    - Ed Lipchus

    did you try installing tomcat as a windows service
    download tomcat.exe and double click and follow instructions

  • Connectivity problem from iphone to window 7

    I have downloaded newer version of Itune 11. I am trying to upload some songs from window 7. I am connecting Iphone 5 to computer using aaple usb cable. When I connect, I am not seeing any device button as they say after download and i am not seeing any iphone device any place.

    Try Apple mobile device support is working, re-install Itune 11..Same problem..funny thing, I have uploaded songs back in 2013 when Itune 9-10 was on my computer. By auto update, Itune 11 was downloaded and getting problem...I did read lot's of discussion on forum, try every thing.

  • How can I run a dos command from java on windows 98, 95?

    The usage of cmd.exe in the java program to run a dos command on windows 98. 95 doesn't work as the equivalent command is command.exe
    But using the command.exe in the java program makes my program to hang.

    hi,
    As u mentioned, u cannot use the cmd.exe in win9x environment as cmd.exe is specific to windows NT, you can use the command.exe without any hitches.
    for eg
    java.lang.Runtime.getRuntime().exec("start command /K a.bat"); should run the batch file a.bat..
    if the problem persists, try posting the snippet of code that you are using.
    cheerz
    ynkrish

  • Calling a WebServices From Java Stored Proc fails with Connection refused

    I have followed the example in Note:220662.1 on Metalink step by step.
    I am using two windows machines (2000 SP4). I have Oracle 9.2.0.5 EE on one of them and OC4J 9.0.4 standalone on the other(running on JVM 1.4.2_05-b04). The 2 servers "see" each other over the network.
    I can execute the stub from the database machine:
    C:\WebServices\HelloWorld>java HelloWorldImplWSStub
    Hello World - The current time is Sat Aug 21 11:56:20 EDT 2004When running it from the database, I get:
    SQL> select ws_hello_world from dual;
    select ws_hello_world from dual
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception: [SOAPException:
    faultCode=SOAP-ENV:IOException; msg=Connection refused;
    targetException=java.net.ConnectException: Connection refused]
    Elapsed: 00:00:21.02The trace file generated on the database server machine looks like:
    [SOAPException: faultCode=SOAP-ENV:IOException; msg=Connection refused; targetException=java.net.ConnectException: Connection refused]
      at oracle.soap.transport.http.OracleSOAPHTTPConnection.send(OracleSOAPHTTPConnection.java:765)
      at org.apache.soap.rpc.Call.invoke(Call.java:261)
      at HelloWorldImplWSStub.sayHelloWorld(HelloWorldImplWSStub.java:52)Here is the stub code generated using JDeveloper 9.0.5.1:
    import oracle.soap.transport.http.OracleSOAPHTTPConnection;
    import org.apache.soap.encoding.SOAPMappingRegistry;
    import java.net.URL;
    import org.apache.soap.rpc.Call;
    import org.apache.soap.Constants;
    import java.util.Vector;
    import org.apache.soap.rpc.Response;
    import org.apache.soap.rpc.Parameter;
    import org.apache.soap.Fault;
    import org.apache.soap.SOAPException;
    import java.util.Properties;
    public class HelloWorldImplWSStub  {
      public HelloWorldImplWSStub() {
        m_httpConnection = new OracleSOAPHTTPConnection();
        m_smr = new SOAPMappingRegistry();
      public static String endpoint = "http://oc4jsrv:8888/MyWorkarea-OC4J-context-root/HelloWorldImplWS";
      public String getEndpoint() {
        return _endpoint;
      public void setEndpoint(String endpoint) {
        _endpoint = endpoint;
      private static OracleSOAPHTTPConnection m_httpConnection = null;
      private static SOAPMappingRegistry m_smr = null;
      public static String sayHelloWorld() throws Exception {
        String returnVal = null;
        URL endpointURL = new URL(_endpoint);
        Call call = new Call();
        call.setSOAPTransport(m_httpConnection);
        call.setTargetObjectURI("HelloWorldImplWS");
        call.setMethodName("sayHelloWorld");
        call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
        Vector params = new Vector();
        call.setParams(params);
        call.setSOAPMappingRegistry(m_smr);
        Response response = call.invoke(endpointURL, "");
        if (!response.generatedFault()) {
          Parameter result = response.getReturnValue();
          returnVal = (String)result.getValue();
        else {
          Fault fault = response.getFault();
          throw new SOAPException(fault.getFaultCode(), fault.getFaultString());
        return returnVal;
      public void setMaintainSession(boolean maintainSession) {
        m_httpConnection.setMaintainSession(maintainSession);
      public boolean getMaintainSession() {
        return m_httpConnection.getMaintainSession();
      public void setTransportProperties(Properties props) {
        m_httpConnection.setProperties(props);
      public Properties getTransportProperties() {
        return m_httpConnection.getProperties();
       public static void main(String[] argv) throws Exception   {    
        HelloWorldImplWSStub hstub = new HelloWorldImplWSStub();    
        System.out.println(hstub.sayHelloWorld());  
    }The PL/SQL function code:
    CREATE OR REPLACE FUNCTION ws_hello_world RETURN VARCHAR2
    AS LANGUAGE JAVA
    NAME 'HelloWorldImplWSStub.sayHelloWorld() return java.lang.String';Any help would be greatly appreciated.

    Hello,I have the same problem. Did you find any solution to it?
    Thanks. Diego (Argentina)

  • Error while running EJB from java client on JBOSS

    Hi
    As i am new to EJB i have created a helloworld application in ejb which is working fine when i try to call it from servlet but when i try to invoke the same ejb from java client (i.e from diff jvm) on jboss i got the following error:
    javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]]
         at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1399)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
         at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
         at javax.naming.InitialContext.lookup(InitialContext.java:351)
         at com.gl.TestClient.main(TestClient.java:39)
    Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]]
         at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:254)
         at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1370)
         ... 4 more
    Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused]
         at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:228)
         ... 5 more
    Caused by: java.net.ConnectException: Connection refused
         at java.net.PlainSocketImpl.socketConnect(Native Method)
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
         at java.net.Socket.connect(Socket.java:519)
         at java.net.Socket.connect(Socket.java:469)
         at java.net.Socket.<init>(Socket.java:366)
         at java.net.Socket.<init>(Socket.java:266)
         at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:69)
         at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:62)
         at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:224)
         ... 5 more
    Following is my code:
    Home Interface:
    package com.gl;
    import javax.ejb.CreateException;
    public interface testHome extends EJBHome {
         String JNDI_NAME = "testBean";
         public     test create()
         throws java.rmi.RemoteException,CreateException;
    Remote Interface:
    package com.gl;
    import java.rmi.RemoteException;
    import javax.ejb.EJBObject;
    public interface test extends EJBObject {
         public String welcomeMessage() throws RemoteException;
    Bean:
    package com.gl;
    import java.rmi.RemoteException;
    import javax.ejb.EJBException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    public class testbean implements SessionBean {
         public void ejbActivate() throws EJBException, RemoteException {
              // TODO Auto-generated method stub
         public void ejbPassivate() throws EJBException, RemoteException {
              // TODO Auto-generated method stub
         public void ejbRemove() throws EJBException, RemoteException {
              // TODO Auto-generated method stub
         public void setSessionContext(SessionContext arg0) throws EJBException,
                   RemoteException {
              // TODO Auto-generated method stub
         public void ejbCreate(){}
         public String welcomeMessage(){
              return "Welcome to the World of EJB";
    ejb-jar.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <enterprise-beans>
    <session>
    <ejb-name>testBean</ejb-name>
    <home>com.gl.testHome</home>
    <remote>com.gl.test</remote>
    <ejb-class>com.gl.testbean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>
    jboss.xml:
    <?xml version='1.0' ?>
    <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.2//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd">
    <jboss>
    <enterprise-beans>
    <entity>
    <ejb-name>testBean</ejb-name>
    <jndi-name>testBean</jndi-name>
    </entity>
    </enterprise-beans>
    </jboss>
    Client code:
    package com.gl;
    import java.util.Properties;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    public class TestClient {
         public static void main(String[] args) throws Exception{
                   try{
                   /*     Properties props=new Properties();
                        props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
                        props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
                        props.put(Context.PROVIDER_URL, "jnp://localhost:1099");
                   Properties props = new Properties();
    props.put(Context.INITIAL_CONTEXT_FACTORY,
    "org.jnp.interfaces.NamingContextFactory");
    props.put(Context.PROVIDER_URL, "localhost:1099");
                        System.out.println("Properties ok");
                        //env.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.naming.HttpNamingContextFactory");
                        //env.put(Context.PROVIDER_URL,"http://localhost:8080");
                        //env.put(Context.SECURITY_PRINCIPAL, "");
                        //env.put(Context.SECURITY_CREDENTIALS, "");
                        Context ctx=new InitialContext(props);
                        System.out.println("context ok");
                        //testHome home = (testHome)ctx.lookup("testBean");
                        Object obj = ctx.lookup ("testBean");
                        System.out.println("ojb = " + obj);
                        testHome ejbHome = (testHome)PortableRemoteObject.narrow(obj,testHome.class);
                   test ejbObject = ejbHome.create();
                   String message = ejbObject.welcomeMessage();
                        System.out.println("home ok");
                        System.out.println("remote ok");
                        System.out.println(message);
                        catch(Exception e){e.printStackTrace();}
    I am able to successfully deployed my ejb on JBOSS but i m getting above error when i am trying to invoke ejb from java client.
    kindly suggest me something to solve this issue.
    Regards
    Gagan
    Edited by: Gagan2914 on Aug 26, 2008 3:28 AM

    Is it a remote lookup? Then maybe this will help:
    [http://wiki.jboss.org/wiki/JBoss42FAQ]
    - Roy

  • Connection refused Error while writing file to FTP server.

    Hi All,
    We got below error while writing file to FTP server. Any one have any idea on this?
    sABCS_1.0_8e88588d4fb54ebd2ac7ef66c8421d52.tmp/writeEncryptedFile.wsdl [ Put_ptt::Put(opaque) ] - Could not invoke operation 'Put' against the 'FTP Adapter' due to:
    ORABPEL-11429
    Error sending file to FTP Server.
    Unable to send file to server. [Caused by: Connection refused]
    Please ensure 1. Specified remote output Dir has write permission 2. Output filename has not exceeded the max chararters allowed by the OS and 3. Remote File System has enough space.

    Hmmm ...
    Same issue as your post from three months' earlier?
    Re: Error while putting file in sftp location.

  • Connection refused - I need some help :]

    Hello !
    java.net.ConnectException: Connection refused
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
    at java.net.Socket.connect(Socket.java:452)
    at java.net.Socket.connect(Socket.java:402)
    at java.net.Socket.<init>(Socket.java:309)
    at java.net.Socket.<init>(Socket.java:124)
    at Test.main(Test.java:91)
    Have you read that !!
    It's terrible...
    I don't succeed in finding a solution...
    Can you help me ?
    thanks a lot !!

    First aid check list for "connection refused":
    - Check host name.
    - Check port number.
    - Try numeric IP address of server host, in case name server is hosed.
    - Are there any firewalls between client and server blocking the port.
    - Check that the server is running.
    - Check that the server is listening to the port. On the server, try: "telnet localhost the-port-number". Or "netstat -an", there should be a listening entry for the port.
    - Try "telnet server-host-name the-port-number" from the client, to see if firewalls are blocking it.
    - If "telnet" fails: try telnet with the numeric ip address.
    - If "telnet" fails: does it fail immediately or after an obvious timeout? How long is the timeout?
    - Does the server respond to "ping serverhost" or "telnet serverhost" or "ssh serverhost"?

  • Connection refused in Linux

    hi,
    i have some questions here. Hope you can help me..
    first, i run my server on local host in Linux. Then i run my client on local host too so that it connects to server : Socket socket = new Socket(InetAddress.getLocalHost().getHostAddress(), port); But exception occurs:
    java.net.ConnectException: Connection refused
         at java.net.PlainSocketImpl.socketConnect<Native Method>
         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
         at java.net.Socket.connect(Socket.java:452)
         at java.net.Socket.connect(Socket.java:402)
         at java.net.Socket.<init>(Socket.java:309)
         at java.net.Socket.<init>(Socket.java:124)Why this will happen? Can you explain what is this problem? But when i run the same things in Windows, it run properly and successfully without any exception. Why?
    I really need your help..it's urgent for me..i appreciate your kindness..thanks..

    What port are you using? Typically only root can run servers below 1024.

Maybe you are looking for