Opened 4 years ago

Closed 13 months ago

#1529 closed defect (fixed)

Error 500 after clicking on config

Reported by: nextloop Owned by: zzz
Priority: minor Milestone: 0.9.36
Component: apps/console Version: 0.9.18
Keywords: Cc:
Parent Tickets: Sensitive: no

Description

I also manually checked for updates before, and it started to update via bittorrent

Fehler 500: /configupdate Server Error

java.lang.IllegalStateException
     at org.eclipse.jetty.server.session.AbstractSession.checkValid(AbstractSession.java:109)
     at org.eclipse.jetty.server.session.HashedSession.checkValid(HashedSession.java:73)
     at org.eclipse.jetty.server.session.AbstractSession.getAttribute(AbstractSession.java:132)
     at net.i2p.router.web.jsp.configupdate_jsp._jspService(configupdate_jsp.java:413)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
     at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
     at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496)
     at net.i2p.servlet.filters.XSSFilter.doFilter(XSSFilter.java:28)
     at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1476)
     at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
     at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
     at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:522)
     at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
     at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
     at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
     at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
     at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
     at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
     at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
     at net.i2p.router.web.LocaleWebAppHandler.handle(LocaleWebAppHandler.java:99)
     at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
     at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
     at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
     at org.eclipse.jetty.server.Server.handle(Server.java:370)
     at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
     at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
     at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
     at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
     at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
     at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
     at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
     at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
     at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
     at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
     at java.lang.Thread.run(Thread.java:745)


I2P version: 0.9.18-0
Java version: Oracle Corporation 1.7.0_75 (OpenJDK Runtime Environment 1.7.0_75-b13)
Wrapper version: 3.5.25
Server version: 8.1.16.v20140903
Servlet version: Jasper JSP 2.1 Engine
Platform: Linux i386 3.16.0-30-generic
Processor: Core (Yonah) (pentiumm)
Jbigi: Locally optimized library libjbigi-linux-pentiumm.so loaded from file
Encoding: UTF-8
Charset: UTF-8

Subtickets

Change History (5)

comment:1 Changed 4 years ago by zzz

Component: unspecifiedapps/console

This happens from time to time, but most of them are now caught in formhandler.jsi, Not sure how to fix this one.

Note: corresponds to line 21 in configupdate.jsp. At the session.getAttribute() call.

comment:2 Changed 4 years ago by zzz

Milestone: undecided0.9.21

The whole mechanism of storing a "context id" in the session or in a form parameter, storing it in each helper or handler, retrieving it, etc. is overwrought and not at all useful. Trying to make the console work with multiple in-JVM router contexts is a fantasy. Helpers and handlers can just get the static global context, or try to grab onto RouterConsoleRunner?'s one. But there's lots of static accesses to the context elsewhere in the console. Not an issue for Android or in embedded applications, where we don't use the console. Nor would we in MultiRouter? tests, or vmContext.

Even if we rip all that out, still some work to find every place where a session is referenced and wrap it in try/catch. But most of it is this contextID foolishness.

comment:3 Changed 14 months ago by zzz

Milestone: 0.9.210.9.37
Owner: set to zzz
Status: newaccepted

comment:4 Changed 13 months ago by zzz

Milestone: 0.9.370.9.36

Wrap all getAttribute() / setAttribute() in try/catch, in fd4151ac4943788f0cb9c5d4746f4806a0368b3f to be 0.9.35-19

…but then ctxID will be null and ContextHelper? will throw ISE so not sure this is an improvement… for further research…

comment:5 Changed 13 months ago by zzz

Resolution: fixed
Status: acceptedclosed

No, it will return first available context. Declaring fixed.

Note: See TracTickets for help on using tickets.