Installation problem OpenOlat 14.2.2 on Ubuntu 18.04

77 views
Skip to first unread message

Hans

unread,
Mar 25, 2020, 10:09:13 AM3/25/20
to OpenOlat
Hi,
in both ways (Mysql and Postgres) and on different platforms (debian 9, 10, Ubuntu 18.04)

tomcat is starting without the configuration of
- lib/log4j2.xml
- conf/Catalina/localhost/ROOT.xml
- lib/log4j2.xml

My java expierience is not that much, but as I changed in bin/setenv.sh the CATALINA_OPTS=" $JRE_HOME/bin/java -Xss256k -Xmx1024m -Xms512m -XX:MaxMetaspaceSize=512m  ...
I could start tomcat but got the HTTP message  404 which means that there is another missing link.

In the logs/catalina.out I got more confusing answers which look like there are some other faults. The first line in a fresh catalina.out look that java is not called correctly:

#1.
 
Verwendung: java [-options] class [args...]
           (zur Ausführung einer Klasse)
   oder  java [-options] -jar jarfile [args...]
           (zur Ausführung einer JAR-Datei)
wobei options Folgendes umfasst:



#2. Then I found some warings (repeated very often:)

WARNUNG: Unable to add the resource at [/WEB-INF/classes/org/olat/modules/lecture/ui/coach/_content/daily_absences.html] to the cache for web application [] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache



#3. Another suspecting thing:

SCHWERWIEGEND: Fehler beim Senden der 'Context Initialized' Benachrichtigung an den Listener aus der Klasse [org.springframework.web.context.ContextLoaderListener]
SCHWERWIEGEND: One or more listeners failed to start. Full details will be found in the appropriate container log file
SCHWERWIEGEND: Context [] startup failed due to previous errors
SCHWERWIEGEND: The web application [ROOT] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@45966c0e]) and a value of type [org.olat.core.commons.persistence.DBImpl.ThreadLocalData] (value [org.olat.core.commons.persistence.DBImpl$ThreadLocalData@d5961ee]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
I



I'm sure that these problems are close together, but I don't find any information to start with.

Can you give me a hint, please?

Thanks

Hans



Florian Gnaegi

unread,
Mar 25, 2020, 10:48:51 AM3/25/20
to open...@googlegroups.com
Hi Hans

Forget about #2, you can ignore that, that is normal. It is a library we use that generates this message and we can not turn it off easily. Really not the problem. 

Do you have any error in the olat.log?

Cheers
Florian

--
--
Sie erhalten diese Nachricht, weil Sie Mitglied sind von Google
Groups-Gruppe "OpenOlat".
Für das Erstellen von Beiträgen in dieser Gruppe senden Sie eine E-Mail
an open...@googlegroups.com
Um sich von dieser Gruppe abzumelden, senden Sie eine E-Mail an
openolat+u...@googlegroups.com
Weitere Optionen finden Sie in dieser Gruppe unter
http://groups.google.com/group/openolat?hl=de
-------------------------------------------------------------------------------------------------------------------
OpenOlat - infinite learning - http://www.openolat.org
---
You received this message because you are subscribed to the Google Groups "OpenOlat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openolat+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openolat/ed1d0d94-9156-4fd6-8c2c-4e278e442ca9%40googlegroups.com.

--------------------------------------------------------------------
professional services for the e-learning system OpenOlat
hosting - operating - support - development - mobile - consulting
--------------------------------------------------------------------
frentix  GmbH
Florian Gnägi, Geschäftsführer
Okenstrasse 6
CH-8037 Zürich, Switzerland


Find me on wire skype twitter xing linkedin 
--------------------------------------------------------------------

Hans

unread,
Mar 25, 2020, 12:00:38 PM3/25/20
to OpenOlat
Hi Florian,

thanks for your response.

I don't find any useful log for the java purpose. But the following could lead to database mistake:

2020-03-25 13:25:08.840 [localhost-startStop-1] ERROR  JdbcEnvironmentImpl ^%^ I-J26 ^%^ org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentImpl ^%^  ^%^  ^%^  ^%^  ^%^ Could not fetch the SequenceInformation from the database com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown table 'sequenc$
2020-03-25 13:25:10.482 [localhost-startStop-1] WARN   AnnotationBinder ^%^ I-J27 ^%^ org.hibernate.cfg.AnnotationBinder ^%^  ^%^  ^%^  ^%^  ^%^ HHH000491: The [resource] association in the [org.olat.resource.accesscontrol.model.OfferImpl] entity uses both @NotFound(action = NotFoundAction.IGNORE) and FetchTyp$
2020-03-25 13:25:11.751 [localhost-startStop-1] INFO   beans ^%^ I-J28 ^%^ org.hibernate.orm.beans ^%^  ^%^  ^%^  ^%^  ^%^ HHH10005002: No explicit CDI BeanManager reference was passed to Hibernate, but CDI is available on the Hibernate ClassLoader.

I reinstalled the system with Postgres again. Now I'm struggling again with the bin/setenv.sh because I've the fault

Fehler: Hauptklasse bin.java konnte nicht gefunden oder geladen werden
./tomcat/bin/catalina.sh: 2: eval: -Xss256k: not found

 
If I leave it as original, I get on ./start.sh:

Verwendung: java [-options] class [args...]
           (zur Ausführung einer Klasse)
...

in the catalina.out

My bin/setenv.sh looks:

CATALINA_HOME=~/tomcat
CATALINA_BASE=~
JRE_HOME=~/jre
JAVA_HOME=/usr/bin/java
CATALINA_PID=~/run/openolat.pid
CATALINA_TMPDIR=/tmp/openolat
mkdir -p $CATALINA_TMPDIR

CATALINA_OPTS="
-Xss256k -Xmx1024m -Xms512m -XX:MaxMetaspaceSize=512m  \
-Duser.name=openolat                                   \
-Duser.timezone=Europe/Zurich                          \
-Dspring.profiles.active=myprofile                     \
-Djava.awt.headless=true                               \
-Djava.net.preferIPv4Stack=true                        \
-Djava.endorsed.dirs=./common/endorsed                 \
-XX:+HeapDumpOnOutOfMemoryError                        \
-XX:HeapDumpPath=.                                     \
"

I think there is a fault in the line CATALINA_OPTS="

Any idea?
Thanks





But I still think that it's 

Urs Hensler

unread,
Mar 25, 2020, 3:13:30 PM3/25/20
to open...@googlegroups.com
Hi Hans,

Just to be sure: At which URL do you get the error 404? OpenOlat is usually available at: http://localhost:8080/olat/dmz/

Bye,
Urs


--
--
Sie erhalten diese Nachricht, weil Sie Mitglied sind von Google
Groups-Gruppe "OpenOlat".
Für das Erstellen von Beiträgen in dieser Gruppe senden Sie eine E-Mail
an open...@googlegroups.com
Um sich von dieser Gruppe abzumelden, senden Sie eine E-Mail an
openolat+u...@googlegroups.com
Weitere Optionen finden Sie in dieser Gruppe unter
http://groups.google.com/group/openolat?hl=de
-------------------------------------------------------------------------------------------------------------------
OpenOlat - infinite learning - http://www.openolat.org
---
You received this message because you are subscribed to the Google Groups "OpenOlat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openolat+u...@googlegroups.com.

Oliver Kant

unread,
Mar 25, 2020, 3:53:54 PM3/25/20
to open...@googlegroups.com
Hello Hans,

could you please try _without_ the line
> $JRE_HOME/bin/java
in your setenv.sh since that might be something else as what is offered
by ~/jre/bin/java.

What Software Versions are you using (PostgreSQL/MySQL, Tomcat, Java..)?

Otherwise, at a first glance, your CATALINA_OPTS are looking okay. Do
you use the user openolat?

Cheers, Oliver


Am 25.03.20 um 17:00 schrieb Hans:
> Hi Florian,
>
> thanks for your response.
>
> I don't find any useful log for the java purpose. But the following
> could lead to database mistake:
>
>
> 2020-03-25 13:25:08.840 [localhost-startStop-1] ERROR
> JdbcEnvironmentImpl ^%^ I-J26 ^%^
> org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentImpl ^%^  ^%^
> ^%^  ^%^  ^%^ Could not fetch the SequenceInformation from the
> database com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
> Unknown table 'sequenc$
> 2020-03-25 13:25:10.482 [localhost-startStop-1] WARN
> AnnotationBinder ^%^ I-J27 ^%^ org.hibernate.cfg.AnnotationBinder
> ^%^  ^%^  ^%^  ^%^  ^%^ HHH000491: The [resource] association in the
> [org.olat.resource.accesscontrol.model.OfferImpl] entity uses both
> @NotFound(action = NotFoundAction.IGNORE) and FetchTyp$
> 2020-03-25 13:25:11.751 [localhost-startStop-1] INFO   beans ^%^
> I-J28 ^%^ org.hibernate.orm.beans ^%^  ^%^  ^%^  ^%^  ^%^
> HHH10005002: No explicit CDI BeanManager reference was passed to
> Hibernate, but CDI is available on the Hibernate ClassLoader.
>
>
> I reinstalled the system with Postgres again. Now I'm struggling again
> with the *bin/setenv.sh *because I've the fault
> --
> --
> Sie erhalten diese Nachricht, weil Sie Mitglied sind von Google
> Groups-Gruppe "OpenOlat".
> Für das Erstellen von Beiträgen in dieser Gruppe senden Sie eine E-Mail
> an open...@googlegroups.com
> Um sich von dieser Gruppe abzumelden, senden Sie eine E-Mail an
> openolat+u...@googlegroups.com
> Weitere Optionen finden Sie in dieser Gruppe unter
> http://groups.google.com/group/openolat?hl=de
> -------------------------------------------------------------------------------------------------------------------
> OpenOlat - infinite learning - http://www.openolat.org
> ---
> You received this message because you are subscribed to the Google
> Groups "OpenOlat" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to openolat+u...@googlegroups.com
> <mailto:openolat+u...@googlegroups.com>.
> <https://groups.google.com/d/msgid/openolat/113e7e0a-13d8-4edb-8314-80a8498420f0%40googlegroups.com?utm_medium=email&utm_source=footer>.

Hans

unread,
Mar 25, 2020, 5:23:50 PM3/25/20
to OpenOlat
@Urs:
I've tested a lot of combinations. I get always 404 At the conf/server.xml it's port 8088. The only difference ist the entry appBase="webapp". This is mentioned as webapps in the installation manual.

@Oliver:

_without_ the line > $JRE_HOME/bin/java: same behavior. Always the info text like java without parameters and the last in line of

cat /home/openolat/logs/catalina.out
is
./tomcat/bin/catalina.sh: 2: eval: -Xss256k: not found

The installation is:
tomcat -> apache-tomcat-8.5.53/
webapp -> openolat-1422
jre -> jre1.8.0_241

openolat@OO2:~$ $JRE_HOME
-bash: /home/openolat/jre: Ist ein Verzeichnis

Is this correct? Shouldn't the link lead to an executalble

If I call
$JRE_HOME/bin/java -Xss256k -Xmx1024m -Xms512m -XX:MaxMetaspaceSize=512m
the options are not accepted. The output is the same

Partly solved:

There is a missing \ in  in bin/setenv.sh

CATALINA_OPTS="                                        \

-Xss256k -Xmx1024m -Xms512m -XX:MaxMetaspaceSize=512m  \
...

Now the server is starting, but still the error 404

I found in logs/catalina.out:
 INFORMATION: Deployment of web application directory [/home/openolat/openolat-1422/static] has finished in [13.039] ms

The directory exists. But there is no index.html. Are the entries correct?

openolat@OO2:~/openolat-1422/static$ vdir
insgesamt 48
drwxrwxr-x  3 openolat openolat 4096 Feb  7 14:43 assessment
-rw-rw-r--  1 openolat openolat   91 Jän  2  2019 closewindow.html
drwxrwxr-x  2 openolat openolat 4096 Feb  7 14:43 cp_offline_menu_mat
-rw-rw-r--  1 openolat openolat   42 Sep 27 10:04 empty.html
-rw-rw-r--  1 openolat openolat 1379 Sep  6  2019 events.html
drwxrwxr-x  4 openolat openolat 4096 Feb  7 14:43 font-awesome
drwxrwxr-x  7 openolat openolat 4096 Feb  7 14:43 images
drwxrwxr-x 10 openolat openolat 4096 Feb  7 14:43 js
drwxrwxr-x  4 openolat openolat 4096 Feb  7 14:43 movie
drwxrwxr-x  4 openolat openolat 4096 Feb  7 14:43 msg
drwxrwxr-x  4 openolat openolat 4096 Feb  7 14:43 themes
-rw-rw-r--  1 openolat openolat  169 Jän  2  2019 workaround.html

Thanks in advance.

Regards
Hans















Stéphane Rossé

unread,
Mar 26, 2020, 4:16:44 AM3/26/20
to OpenOlat
Hi

Remove -Xss256k, if you use Java 11, I think this option is not available anymore.

You can replace it with: -XX:+UseG1GC -XX:+UseStringDeduplication

It helps to reduce the memory consumption. If it doesn't work, publish the whole olat.log. The relevant error are often the first one or the last one.

Regards
Stéphane

Hans

unread,
Mar 26, 2020, 4:33:28 AM3/26/20
to OpenOlat
@ Stéphane

I've changed the line you mentioned. But still same memory problem. There is no Warning in olat.log. All Warnings regarding memory appear in catalina.out


...
Thu Mar 26 09:25:05 CET 2020 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Security framework of XStream not initialized, XStream is probably vulnerable.
...
Mär 26, 2020 9:24:49 AM org.apache.catalina.webresources.Cache getResource
WARNUNG: Unable to add the resource at [/WEB-INF/classes/de/bps/course/nodes/ll/_content/editForm.html] to the cache for web application [] because there was insufficient free space available after evicting expired cache entries - consider increasing the maximum size of the cache
...
WARNUNG: The web application [ROOT] appears to have started a thread named [RxSchedulerPurge-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)


I think these are SSL problems. task for tomorrow...

Thanks

Stéphane Rossé

unread,
Mar 26, 2020, 5:38:35 AM3/26/20
to OpenOlat
It's only warning, ignore them. If you want to get ride of them, you need to configure the file context.xml (same place as server.xml) with something like that:

<?xml version="1.0" encoding="UTF-8"?>

<Context>

    <Manager pathname="" />

    <Resources cachingAllowed="false" />

</Context>



The manager line remove session serialisation and resources remove the resource cache.

Best regards,
Stéphane
Reply all
Reply to author
Forward
0 new messages