JavanetUnknownHostException with IS 46 and TN 46

Hi,
I am running WebMethods Integration Server 4.6 and Trading
Networks 4.6 on Solaris 8 system using JDK 1.3.1_01 in my
development environment. I have been having problems lately
were my DNS lookups in the IS 4.6 server just starts failing
for no apparent reason (No changes that I know of have been made to TN or IS 4.6). Name resolution works fine on the
Solaris box and I can even run a simple java program that
does DNS lookups out side of webMethods. If I run the code
inside of webMethods it fails. If I shut down the IS 4.6
server and start it back up again the problem goes away for
awhile and then eventually comes back.

Has anyone had this problem? An insight into this problem
would be helpful.

Thanks,

Duain

Here is the error I receive:

com.wm.app.b2b.server.ServiceException:
java.net.UnknownHostException: www.yahoo.com
at testing.testlookup(testing.java:320)
at java.lang.reflect.Method.invoke(Native Method)
at
com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:281)
at
com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:688)
at
com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:480)
at
com.wm.app.b2b.server.HTTPInvokeHandler.process(HTTPInvokeHandler.java:168)
at
com.wm.app.b2b.server.HTTPDispatch.run(HTTPDispatch.java:457)
at
com.wm.util.pool.PooledThread.run(C:/NT/Perforce/basis/4.1.0-terra/module/core/source/com/wm/util/pool/PooledThread.java:103)
at java.lang.Thread.run(Thread.java:484)

Here is the sample code I run inside of IS 4.6 that does a
DNS lookup:

public static final void testlookup( IData pipeline ) throws
ServiceException
{
IDataCursor idc = pipeline.getCursor();
String s = null,localhost=null;
if (idc.first(“strHost”))
{
s = (String) idc.getValue();
}

InetAddress host=null;
try{
//localhost=InetAddressInpl.getHostByAddr().getHostName();
host=InetAddress.getByName(s);

}catch(Exception e){
System.out.println(“Duain=”+e);
throw new ServiceException(e);

}

String hostname=host.getHostName();
String strAdd=host.getHostAddress();
idc.insertAfter(“hostname”, hostname);
idc.insertAfter(“Address”, strAdd);
//idc.insertAfter(“localhost”, localhost);
return;
}

Try adding "http://" to the URL. Let me know if that helps.

Dan,

Adding http:// doesn’t make any difference. The only thing I’m doing is trying to resolve a DNS name to an IP address. Even though this works on my Solaris 8 server (at the OS level with nslookup) it doesn’t work in IS 4.6. Also, the problem is persistent now. If I restart the IS 4.6 server the UnkownHostException still persists. None of my services that need to lookup a Fully Qualified Domain name work.

Any ideas?

Thanks,

Duain

We have had problems where webmethods holds an invalid or outdated connection parameter of some kind, and no longer can connect (for us this happens mostly for our database connection).

The solution was to delete our repository files. The out-of-the-box webmethods functionality is to use a file based repository which stores such things as flow service locks, transaction states, ejb alias info, etc. It’s a black box - for us it seemed to cache or store some sort of db connection.

This is a somewhat extreme solution - you have to delete all the files in the WmRepository2 directory after shutting down the server. There are a few ‘side effects’ to doing this as you lose your ejb alias (no big deal for us since we just have one) and we weren’t concerned with transaction states (they were all completed).

Will,

Thanks for the response. That fixed the problem.

Thanks,

Duain