on 08-22-2008 9:50 AM
Hi Gurus!!
I´m trying to open a socket connection from a Java Proxy. This is my code.
Socket sock = null;
PrintWriter out = null;
BufferedReader in = null;
String host = "FESRV028";
int destPort = 10006;
InetAddress destAddr = null;
try {
sock = new Socket("FESRV029", 10006);
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException(e);
}
I get the error "java.net.ConnectException: Connection refused".
Is neccesary some type of authetication with the server which we want to connect?? Somebody knows what could be the cause of this error?
Thanks and regards,
Manuel Míguez.
EJB classes are not allowed to open sockets directly. This is a general restriction of EJB.
Regards
Stefab
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Manuel,
There are 2 possible causes of this error as far as I can see. 1) no service is listening on port 10006 of server FESRV028, or 2) something (e.g. a firewall) is blocking the connection between your Java proxy and FESRV028.
Regards,
Thorsten
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Thorsten,
Is very strange because I have done a ping from my XID server (server where the Java Proxy is deployed) to the server FESRV028 with port 10006 and the result is ok. And is supposed that the server doesn´t have any security enabled.
I don´t know if the server recquires any authentication. Do you know if this is possible?
Thanks and regards,
Manuel Míguez.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.