grisu / gricli

Grisu commandline client
7 stars 2 forks source link

Java exception - error 401 #124

Closed sgenie68 closed 13 years ago

sgenie68 commented 13 years ago

After an hour or so of inactivity gricli throws an exception:

gricli> com.sun.xml.ws.client.ClientTransportException: The server sent HTTP status code 401: Unauthorized
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.checkStatusCode(HttpTransportPipe.java:203)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:179)
at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:94)
at com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:89)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:598)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:557)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:542)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:439)
at com.sun.xml.ws.client.Stub.process(Stub.java:222)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
at $Proxy41.getAllJobnames(Unknown Source)
at grisu.model.UserEnvironmentManagerImpl.getCurrentJobnames(UserEnvironmentManagerImpl.java:449)
at grisu.frontend.control.jobMonitoring.RunningJobManager.updateJobnameList(RunningJobManager.java:532)
at grisu.frontend.control.jobMonitoring.RunningJobManager$UpdateTimerTask.run(RunningJobManager.java:55)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
sgenie68 commented 13 years ago

That was the case of expired credentials - they expired while idle.

ndjones commented 13 years ago

so we should be able to handle this exception, and provide guidance and feedback instead of the stack trace?

makkus commented 13 years ago

Hard to handle this exception as it is thrown by the JAX-WS library somehow. Wasn't able yet to figure out where exactly it comes from, so I'm having problems catching it.

Will look into it a bit further and steal this issue from Gene...

makkus commented 13 years ago

Small update: hard to debug atm because I'm getting hit by the old myproxy-dns issue:

Caused by: Mutual authentication failed   Expected target subject name="/CN=host/myproxy.arcs.org.au"   
Target returned subject name="/C=AU/O=APACGrid/OU=VPAC/CN=myproxy2.arcs.org.au"]; 
nested exception is grisu.control.exceptions.NoValidCredentialException: MyProxy get failed. 
[Caused by: Mutual authentication failed   Expected target subject name="/CN=host/myproxy.arcs.org.au"   
Target returned subject name="/C=AU/O=APACGrid/OU=VPAC/CN=myproxy2.arcs.org.au"]

Will try to setup test environment inside UoA network, but that'll take a bit longer...

makkus commented 13 years ago

This is harder than i thought, also it probably does not make sense at the moment, because I need to upgrade enunciate first: https://github.com/grisu/enunciate-backend/issues/4

If I'd fix this here now, it'll probaby break again after the enunciate upgrade. I don't want to upgrade enunciate for this next milestone though, it's too big a deal. So I'll remove the milestone from this issue and deal with it after I worked on the enunciate thing...