[EMAIL PROTECTED] wrote:

Hi there,

I specified the host name by using the following code instead of
derby.properties.
NetworkServerControl server = new
NetworkServerControl(InetAddress.getByName("192.168.1.11"),1527);
server.start(null);

Then, error messages in derby.log were gone but I got two lines of "Server is ready to accept connections on port 1527."
and unfortunately, I still cannot access the Derby instance from remote.

I tested whether the port is opened or not using telnet.
From the same host, it's opened.
From a remote host, it's NOT opened.

Thanks,
Wolfgang



__________________________________
Take an action against poverty
http://pr.mail.yahoo.co.jp/whiteband/


Hi,

I tried both the scenarios you mentioned in you mails:

1) reading  hostname/port from derby.properties
2) hostname/port as arguments

and did not get the errors you are seeing (no multiple messages in derby.log, unsuccessful pings) . I am using Eclipse and wrote the following two classes (testServerStart.java and serverThread .java), using your code snippet, to bring up the Network Server. Was able to ping/connect/create db/query the Network Server just fine from a remote client.

If you can post a reproduction of your scenario it will be really useful. Also info on what platform, jdk you are using.

Regards,
Rajesh

====================================================

//testServerStart.java
public class testServerStart {

   /**
    * @param args
    */
public static void main(String[] args) { serverThread srv=new serverThread();
       srv.run();
       while(true){
//wait forever, else the main program will exit and so will all the threads ;-)
       }
   }

}
====================================================
//serverThread .java
import java.net.InetAddress;
import java.net.UnknownHostException;

import org.apache.derby.drda.NetworkServerControl;

public class serverThread  extends Thread {

   public void start() {
       System.out.println("Starting Server Thread...");
       try {
           NetworkServerControl server = new

           // hostname/port read from derby.properties
NetworkServerControl(); // hostname/port as arguments
           //NetworkServerControl(InetAddress.getByName("9.x.x.x"),1527);

           server.start(null);
       } catch (UnknownHostException e) {
           System.out.println("Unkown host error");
           e.printStackTrace();
       } catch (Exception e) {
           System.out.println("Unkown EXCEPTION");
           e.printStackTrace();
       }
   }
   public void run() {
       start();
   }
}

Reply via email to