Error while connecting to umserver using Java Admin API

Hello all
I am using webMethods 9.8 suite with Universal Messaging. I’m having problems with UM Java Admin API. Please help me to resolve the issue.

Using the below code to get the RealmNode Object.

String RNAME={“nhp://localhost:9000”};
nSessionAttributes nsa=new nSessionAttributes(RNAME);
nRealmNode realm = new nRealmNode(nsa);

Getting below exception on client side

com.pcbsys.nirvana.client.nRequestTimedOutException: The server failed to respond within the time out value:60000 last ID = 601 class com.pcbsys.nirvana.nAdmin.events.nConfiguration
at com.pcbsys.nirvana.client.nSession.writeEvent(nSession.java:6326)
at com.pcbsys.nirvana.client.nSession.writeEvent(nSession.java:6250)
at com.pcbsys.nirvana.nAdmin.nAdminSession.getConfiguration(nAdminSession.java:1252)
at com.pcbsys.nirvana.nAdminAPI.nRealmNode.connectToRealm(nRealmNode.java:3371)
at com.pcbsys.nirvana.nAdminAPI.nRealmNode.create(nRealmNode.java:1376)
at com.pcbsys.nirvana.nAdminAPI.nRealmNode.(nRealmNode.java:1372)
at com.pcbsys.nirvana.nAdminAPI.nRealmNode.(nRealmNode.java:1358)
at com.pcbsys.nirvana.nAdminAPI.nRealmNode.(nRealmNode.java:1346)
at com.ca.fieldpack.webMethods.um.Test.main(Test.java:40)

Getting these messages in umserver log

[Tue Jan 05 16:06:53 IST 2016],UserManager: User administrator@127.0.0.1 Logged In using nhp ( DataStreamListener:true Admin:true OS:Windows Server 2008 R2 Version:6.1, Java 1.7.0_51 Client Build : Build 12911 Build Date : August 14 2014 ) Session Id = 4c1a5200000000 ID: 127.0.0.1:55465
[Tue Jan 05 16:07:58 IST 2016],class java.lang.NullPointerException
java.lang.NullPointerException
at com.pcbsys.foundation.io.fConnectionAsyncSelectReadHandler.close(fConnectionAsyncSelectReadHandler.java:58)
at com.pcbsys.foundation.drivers.fHTTPDSession.close(fHTTPDSession.java:610)
at com.pcbsys.foundation.drivers.fHTTPDSession$AsyncListener.close(fHTTPDSession.java:873)
at com.pcbsys.foundation.drivers.fHTTPDSession$AsyncListener.dataReady(fHTTPDSession.java:867)
at com.pcbsys.foundation.drivers.nio.fChannelDriver.notifyListener(fChannelDriver.java:386)
at com.pcbsys.foundation.drivers.nio.fChannelDriver.packetArrived(fChannelDriver.java:465)
at com.pcbsys.foundation.drivers.nio.handlers.PacketChannel.processInBuffer(PacketChannel.java:302)
at com.pcbsys.foundation.drivers.nio.handlers.PacketChannel.handleRead(PacketChannel.java:279)
at com.pcbsys.foundation.drivers.nio.handlers.PlainChannel.handleRead(PlainChannel.java:160)
at com.pcbsys.foundation.drivers.nio.io.SelectorThread.processKey(SelectorThread.java:517)
at com.pcbsys.foundation.drivers.nio.io.SelectorThread.processSelectKeysIterator(SelectorThread.java:493)
at com.pcbsys.foundation.drivers.nio.io.SelectorThread.run(SelectorThread.java:398)
at com.pcbsys.foundation.threads.fThread.localRun(fThread.java:216)
at com.pcbsys.foundation.threads.hThread.run(hThread.java:93)
at java.lang.Thread.run(Thread.java:745)
[Tue Jan 05 16:07:58 IST 2016],UserManager: User administrator@127.0.0.1 Logged Out using nhp, Reason : unknown, session established for 65 seconds, Session Id = 4c1a5200000000 ID: 127.0.0.1:55465

I am getting same error whether i connect from remote host or local.

Thanks for your time.
Suresh

Suresh,
a couple of things to check:

  1. Make sure that the 9000 port is an NHP port and not an NSP port. In general I would recommend using NSP to connect, which will work with both NSP and NHP ports. (Note that an NHP client can ONLY connect to an NHP port).
  2. Make sure that you are using the correct version of the nAdminAPI.jar. It mst be EXACTLY the same version and fix level as the UM server. If you have installed fixes, make sure that you install both the UM client library fix (UniversalMessaging/lib) AND the appropriate Infrastructure UM shared library fix (common/lib).

Hope this helps.

1 Like

Thanks Jonathan for quick reply.

I have checked the jar versions. I am using 9.7 jars. problem resolved now.

Thanks

Krishnan,

Please share the problem resolution and it would be great help for the other users in the similar situations!
:smiley:

TIA,
RMG

Hi All,

Where exaclty should the nAdmin jar be placed? I mean which location in IS? I have placed in package/code/jars location and restarted the server. But i see the jar being loaded successfully (but from other location).

Since the jar is loaded properly, i should not get any error. But, I am getting error when i complie the java code as “could not find the symbol nSessionAttribute”.

Can you please share your thoughts on this?

Regards,
Jacob B

Hi Jacob,

You should place nAdmin.jar file in \common\lib directory and restart IS.

Regards,
Ashok

Hi Jonathan,

We have similar issue with our Servers. We are using nsps 9443 port. All the jars are same at both IS and UM.

We get timeOut exception and triggers subscription stops. When i enable and disable the connection alias the issue gets resolved but again after soemtime we see the same issue.

Could you please throw some light on this.

Kavitha,
if the triggers work correctly, and then disconnect, then it is not likely to be a jar version issue. It could point to resource issues on the server.
A timeout usually implies that the server is very busy doing something else, such as syncing cluster state or performing store maintenance.
Are you seeing this under heavy load? Or are you seeing any errors in the nirvana.log?

Jonathan ,

We have kind of similar issue .

We are connecting to same UM from two different clustered IS’s . But from only one node we are getting below error intermittently , other nodes are working fine . And servers are not heavily loaded .

We verified IS,UM fixes , jar files . Everything looks in sync.

com.wm.app.b2b.server.dispatcher.exceptions.ResourceUnavailableException: [ISS.0153.9051] Error initializing UM session: com.pcbsys.nirvana.client.nRealmUnreachableException: Realm is currently not reachable:Realm was still unreachable after max retry count -

Could you please share your thoughts .

Jaipal,
if things are working most of the time, but failing intermittently, then it is likely to be something environmental.
Which IS/UM version is this?
Are you getting any other details about the exception in IS logs?
Is it always the same node that has problems?
Is UM clustered?
To double-check the UM client jar versions, check the size of nClient.jar and nAdminAPI.jar in /common/lib on your IS installations with the same files in /UniversalMessaging/lib on your UM server. They should be identical.

Thanks for quick reply .

1)We are on IS 9.8(core-fix11) , UM 9.9(UM Fix 11) and UM is 3 node clustered
2)There is no other errors in IS and UM logs.
3) Yes , the same IS node is always having problem .
4)We have compared jars , They are identical in all UM’s and IS noddes .

I am assuming that the cluster URL you are using in the wM Messaging alias is identical on all ISes?
What is the URL?
Also, does the problem affect all triggers?
It does seem to hint at a connectivity issue, so is it possible there are network issues between that IS and the UM servers?

I am assuming that the cluster URL you are using in the wM Messaging alias is identical on all ISes? Yes , we are using same URL
What is the URL? nsp://VM1.com:9960,nsp://VM1:9925,nsp://VM1.com:9940

Also, does the problem affect all triggers?[color=blue][b][i]Error with few triggers and sometime most of the triigers , When i tried to refresh the IS-UM connection , its taking several attempts to get enable .Failure attempts throwing below error message

com.wm.app.b2b.server.dispatcher.exceptions.ResourceUnavailableException: [ISS.0153.9051] Error initializing UM session: com.pcbsys.nirvana.client.nRealmUnreachableException: Realm is currently not reachable:Realm was still unreachable after max retry count - nSessionAttributes:conns=3 [/i].[/b][/color]

It does seem to hint at a connectivity issue, so is it possible there are network issues between that IS and the UM servers? It seems fine with network between IS VM’s and UM VM’s .

I think it would be best if you open a support ticket. Nothing springs to mind regarding this, especially if everything is configured identically on all ISes and you are only seeing issues on one IS.

Thanks Jonathan, I have submitted a critical ticket .

HI

Using the Java API’s, I am able to get a session connected to UM but not able to find a channel. I know this channel resides and can be seen through the enterprise manager. Please let me know if i am doing something wrong here.

String RNAME={" < NSP server URL> “};
nChannel myChannel=null;
nSessionAttributes nsa=new nSessionAttributes(RNAME);
mySession=nSessionFactory.create(nsa,“username”,“password”);
mySession.init();
// String output=mySession.getRemoteId();
nChannelAttributes cattrib = new nChannelAttributes();
cattrib.setName(” < channel name>");
myChannel=mySession.findChannel(cattrib);

The error stack:

com.pcbsys.nirvana.client.nChannelNotFoundException: Channel could not be found on the server:Find : : [0] class com.pcbsys.nirvana.base.events.nExceptionEvent RequestID:217218
at com.pcbsys.nirvana.base.nExceptionFactory.getException(nExceptionFactory.java:83)
at com.pcbsys.nirvana.client.nSession.findChannel(nSession.java:3968)
at UM.peekQueue(UM.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:406)
at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:650)
at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:39)
at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:49)
at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:243)
at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:49)
at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:303)
at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:34)
at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:377)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:549)
at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:386)
at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:238)
at com.wm.app.b2b.server.comm.DefaultServerRequestHandler.handleMessage(DefaultServerRequestHandler.java:119)
at com.wm.app.b2b.server.HTTPMessageHandler.process(HTTPMessageHandler.java:156)
at com.wm.app.b2b.server.HTTPDispatch.handleRequest(HTTPDispatch.java:170)
at com.wm.app.b2b.server.Dispatch.run(Dispatch.java:383)
at com.wm.util.pool.PooledThread.run(PooledThread.java:127)
at java.lang.Thread.run(Thread.java:745)