bibbox / app-openspecimen

BIBBOX openspecimen application
8 stars 4 forks source link

ERR_TOO_MAN_REDIRECTS on http://localhost:9000 #20

Open mingf opened 7 months ago

mingf commented 7 months ago

Hi, I have tried two versions of V9 and V8 container version, both show ERR_TOO_MAN_REDIRECTS on http://localhost:9000 basically failed to deploy this software. anyone could shed some light please? Thanks in advance,

aleksandrsa commented 6 months ago

I have the same issue, but only on a Windows machine. (The docker-compose runs fine on a Mac.)

Logs led me to the following errors/warnings related to Tomcat in local-openspecimen-web that seem to be causing the problem:

Starting OpenSpecimen Application!
Wait for DB server to be ready
Tomcat started.
==> /var/lib/tomcat9/logs/catalina.out <==

==> /var/lib/tomcat9/logs/catalina.out <==
<6>Server version name:   Apache Tomcat/9.0.31 (Ubuntu)
<6>Server built:          Mar 16 2022 18:51:24 UTC
<6>Server version number: 9.0.31.0
<6>OS Name:               Linux
<6>OS Version:            5.15.133.1-microsoft-standard-WSL2
<6>Architecture:          amd64
<6>Java Home:             /usr/lib/jvm/java-8-openjdk-amd64/jre
<6>JVM Version:           1.8.0_312-8u312-b07-0ubuntu1~20.04-b07
<6>JVM Vendor:            Private Build
<6>CATALINA_BASE:         /var/lib/tomcat9
<6>CATALINA_HOME:         /usr/share/tomcat9
<6>Starting Servlet engine: [Apache Tomcat/9.0.31 (Ubuntu)]
<6>Deploying web application archive [/var/lib/tomcat9/webapps/openspecimen.war]
<4>Name = openspecimen Property maxActive is not used in DBCP2, use maxTotal instead. maxTotal default value is 8. You have set value of "100" for "maxActive" property, which is being ignored.
<4>Name = openspecimen Property maxWait is not used in DBCP2 , use maxWaitMillis instead. maxWaitMillis default value is -1. You have set value of "10000" for "maxWait" property, which is being ignored.
<6>At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
<2>One or more listeners failed to start. Full details will be found in the appropriate container log file
<2>Context [/openspecimen] startup failed due to previous errors
<4>The web application [openspecimen] appears to have started a thread named [Log4j2-TF-3-Scheduled-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 sun.misc.Unsafe.park(Native Method)
 java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
 java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
 java.lang.Thread.run(Thread.java:748)
<6>Deployment of web application archive [/var/lib/tomcat9/webapps/openspecimen.war] has finished in [49,423] ms
<6>Deploying web application directory [/var/lib/tomcat9/webapps/ROOT]
<6>At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
aleksandrsa commented 5 months ago

After more close inspection, the solution was to fix the permissions on the data folder as described in README in branch v9.0.RC2:

set the permission for the data folder (inside the root folder of the project) like: sudo chmod -R 777 data

Tested on Ubuntu, yet not sure how to accomplish the same when running in Docker on Windows.