rwth-acis / las2peer

A Java-based decentralized framework for distributing community services in a peer-to-peer infrastructure.
https://las2peer.org
Other
52 stars 13 forks source link

RMI invocation exception when authenticated #93

Closed lakhoune closed 2 years ago

lakhoune commented 3 years ago
  1. Summary - Being logged in and then sending a request to a service leads to a RMI invocation exception
  2. Bug Details :
    1. What? - I tried making a request to a (https://las2peer.tech4comp.dbis.rwth-aachen.de/SBFManager/bots) When sending a request while being logged in the request fails with an RMI invocation. I tried deleting the session cookie and then sent the request again. This time no exception occurred. When logging in again and then sending the request again the request fails again. Thus I concluded that the issue only occurs in logged in state
    2. Where? -This seems to be either a webconnector issue, as I have also tested it with other services
lakhoune commented 3 years ago

Might be linked to #91

lakhoune commented 3 years ago

This exception is thrown on the las2peer node: Timeout while updating service cache. i5.las2peer.p2p.TimeoutException: No answer received! Stacktrace javax.ws.rs.InternalServerErrorException: Exception during RMI invocation! at i5.las2peer.connectors.webConnector.WebConnectorRequestHandler.callServiceMethod(WebConnectorRequestHandler.java:399) at i5.las2peer.connectors.webConnector.WebConnectorRequestHandler.invokeRestService(WebConnectorRequestHandler.java:322) at i5.las2peer.connectors.webConnector.WebConnectorRequestHandler.resolveServiceAndInvoke(WebConnectorRequestHandler.java:223) at i5.las2peer.connectors.webConnector.WebConnectorRequestHandler.handle(WebConnectorRequestHandler.java:154) at i5.las2peer.connectors.webConnector.WebConnectorRequestHandler.handleGET(WebConnectorRequestHandler.java:119) at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161) at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:160) at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99) at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389) at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347) at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102) at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271) at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267) at org.glassfish.jersey.internal.Errors.process(Errors.java:315) at org.glassfish.jersey.internal.Errors.process(Errors.java:297) at org.glassfish.jersey.internal.Errors.process(Errors.java:267) at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317) at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305) at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154) at org.glassfish.jersey.jdkhttp.JdkHttpHandlerContainer.handle(JdkHttpHandlerContainer.java:161) at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79) at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83) at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82) at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675) at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79) at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: i5.las2peer.api.execution.ServiceNotFoundException: i5.las2peer.services.contactService.ContactService@* at i5.las2peer.p2p.Node.invoke(Node.java:1317) at i5.las2peer.security.Mediator.invoke(Mediator.java:222) at i5.las2peer.connectors.webConnector.WebConnectorRequestHandler.callServiceMethod(WebConnectorRequestHandler.java:390) ... 34 more Caused by: i5.las2peer.p2p.AgentNotRegisteredException: Could not retrieve service information from the network. at i5.las2peer.p2p.NodeServiceCache.getServiceAgentInstance(NodeServiceCache.java:158) at i5.las2peer.p2p.Node.invoke(Node.java:1315) ... 36 more Caused by: i5.las2peer.p2p.TimeoutException: No answer received! at i5.las2peer.p2p.Node.sendMessageAndCollectAnswers(Node.java:1651) at i5.las2peer.p2p.NodeServiceCache.update(NodeServiceCache.java:319) at i5.las2peer.p2p.NodeServiceCache.getServiceAgentInstance(NodeServiceCache.java:150) ... 37 more

phil-cd commented 3 years ago

@lakhoune Do you know whether this is only happening with services that are connected to the main las2peer network?

lakhoune commented 3 years ago

@phil-cd Yes you are correct. This is only happening in the main network

lakhoune commented 2 years ago

follow #91 for this issue