kitodo / kitodo-production

Kitodo.Production is a workflow management tool for mass digitization and is part of the Kitodo Digital Library Suite.
http://www.kitodo.org/software/kitodoproduction/
GNU General Public License v3.0
63 stars 63 forks source link

White page if ElasticSearch cannot be reached #3496

Open matthias-ronge opened 4 years ago

matthias-ronge commented 4 years ago

If ElasticSearch is not available, after a correct login only an empty page appears, no desktop (also no empty desktop).

Screenshot

An error message appears in the log when the page with the login form is loaded. However, there is no indication that an error has occurred.

[ERROR] 2020-04-22 09:18:47.821 [http-nio-8080-exec-6] IndexingForm - elasticSearchNotRunning
java.net.ConnectException: null
    at org.apache.http.nio.pool.RouteSpecificPool.timeout(RouteSpecificPool.java:168) ~[httpcore-nio-4.4.5.jar:4.4.5]
    at org.apache.http.nio.pool.AbstractNIOConnPool.requestTimeout(AbstractNIOConnPool.java:561) ~[httpcore-nio-4.4.5.jar:4.4.5]
    at org.apache.http.nio.pool.AbstractNIOConnPool$InternalSessionRequestCallback.timeout(AbstractNIOConnPool.java:822) ~[httpcore-nio-4.4.5.jar:4.4.5]
    at org.apache.http.impl.nio.reactor.SessionRequestImpl.timeout(SessionRequestImpl.java:183) ~[httpcore-nio-4.4.5.jar:4.4.5]
    at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processTimeouts(DefaultConnectingIOReactor.java:210) ~[httpcore-nio-4.4.5.jar:4.4.5]
    at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:155) ~[httpcore-nio-4.4.5.jar:4.4.5]
    at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348) ~[httpcore-nio-4.4.5.jar:4.4.5]
    at org.apache.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:192) ~[httpasyncclient-4.1.2.jar:4.1.2]
    at org.apache.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64) ~[httpasyncclient-4.1.2.jar:4.1.2]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]

Error message after login:

Apr 22, 2020 9:18:48 AM org.apache.myfaces.lifecycle.RenderResponseExecutor execute
WARNUNG: There are some unhandled FacesMessages, this means not every FacesMessage had a chance to be rendered.
These unhandled FacesMessages are: 
- 
[ERROR] 2020-04-22 09:24:29.679 [http-nio-8080-exec-7] CustomLoginSuccessHandler - java.net.ConnectException

You have to log in first to realize that you are stuck. Reconnect is not attempted, Tomcat has to be restarted.

Goal: An error message should be displayed on the login form. (The login might be locked.) The next time you try, Production should try to connect again without you having to restart Tomcat.

Kathrin-Huber commented 4 years ago

You doesn't have to restart tomcat. It's sufficient to enter the root url again. Then you see this: Unbenannt The redirection to the desktop is somehow missing here

matthias-ronge commented 4 years ago

I meant that you have to restart Tomcat after fixing the problem with ElasticSearch, so that Production tried to connect again.

solth commented 4 years ago

Instead of redirecting to a broken desktop with an error message I would suggest to display the same error message popup that is shown when a user without administrative privileges logs into a system with an out-of-date index (see #2928)

matthias-ronge commented 4 years ago

I can confirm that I get the desktop (but empty, and takes a long time − timeouts?) when I manually truncate the URL in the browser window; and after starting ElasticSearch it reconnects! Maybe this was fixed meanwile, I update the issue description. However, the suggestion of @solth is the best fit here.