on 10-19-2011 8:38 AM
Hi Guys,
Can someone please tell me if there's some way to trace this. I'm doing a TCP/IP connection to an external server from our PI Dev system in a UDF. I've designed this code in an external java tool and everything works fine. I can send the message over the protocol and I get a response back but if I test the UDF in my MM it times out and kicks me off the network. I've asked the firewall guys to have a look but all they they there's no scanning on this rule and nothing's being blocked. I need to find out how come I can't get a connection to this IP and Port. Any idea? Also would I be able to run a tracert command in R/3 itself?
Thanks,
Jan
Edited by: Jan de Lange on Oct 19, 2011 9:54 AM
Hi,
If i understood correctly,
In the UDF, when you call the endpoint url, have you tried to use the TRY/CATCH statement to get the error message?
try {
} catch (Exception e) {
}
You can map the Exception variable to a Structure Text field to get the connection error message.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I've tested my code in my 3G which gets a connection and send/receive data. However if I deploy it on PI It times out after a while. At s.connect(serverAddress, 30000); it can't get a connection to the host. There's no error message, just times out. I'll see what I can come up with working with the network people. They just HAVE to do a trace on it.
try
{
System.out.println("Creating Socket: " + ip + ":" + port);
//Create Socket Address
SocketAddress serverAddress = new InetSocketAddress(ip, Integer.parseInt(port));
s = new Socket();
//Set Keep Alive Parameter
s.setKeepAlive(true);
//Set Read/Write Timout
s.setSoTimeout(20000);
//Open Connection with Address + Process Timout
s.connect(serverAddress, 30000);
System.out.println("Socket Created: " + s);
}
catch(UnknownHostException uhe)
{
// Host unreachable
System.out.println("Unknown Host :" + ip);
errorTrace+=(";Unknown Host :" + ip);
s = null;
}
try to do the same from your local machine i.e in an independent piece of java code.
in case you still get the timeout, i am assuming that this has to be a network problem. Also make sure there is proper exception handling in the code so that it might prompt with the correct exception.
You might then have to have your network team involved and enable a trace to see what is the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jan,
Out of interest, just wanted to check why you are trying to connect to an external system via UDF. Can you elaborate your requirement? Dont you have any other options?
Regards
Krish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.