HTTP Status 500 – Internal Server Error in new Debian installation

Hello, It’s me again.

I was installing the XWiki system with the installation guide. I was using the MySQL version and let the installer install and configure the MySQL server on the same virtual machine as the XWiki is running on. At the first launch, I get the error attached.

My system:

  • Debian 10
  • Package for installation: sudo apt-get install xwiki-tomcat9-mysql
    Java:
    java -version
    openjdk version “11.0.7” 2020-04-14
    OpenJDK Runtime Environment (build 11.0.7+10-post-Debian-3deb10u1)
    OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Debian-3deb10u1, mixed mode, sharing)

Right after installation, I made these changes:
-Replace encryption key in /etc/xwiki/xwiki.cfg

  • add password to built-in superadmin within the same file
  • set memory for tomcat9 java in /etc/default/tomcat9 to -Xmx2048m
  • changed standard random implementation to urandom:
    JAVA_OPTS="${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom" in /etc/default/tomcat9

Thank you again for your help

error.txt (55.2 KB)

The server time zone value ‘CDT’ is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the ‘serverTimezone’ configuration property) to use a more specifc time zone value if you want to utilize time zone support.

Seems the MySQL connector does not work with your time zone, I guess it’s related to the move to MySQL 8 connector. According to the message it seems to can indicate an explicit timezone in /etc/xwiki/hibernate.conf.xml in the . Something like

    <property name="hibernate.connection.url">jdbc:mysql://localhost/xwiki?allowPublicKeyRetrieval=true&amp;useSSL=false&amp;serverTimezone=UTC</property>

I guess we should set that by default for now. Need to understand exactly what’s the different between the old connector and the new one.

Indeed seems it fails because CDT is ambiguous. See https://bugs.mysql.com/bug.php?id=95036

@tmortagne I’m not sure it’s related to MySQL8, see https://stackoverflow.com/questions/26515700/mysql-jdbc-driver-5-1-33-time-zone-issue

Good explanations here: https://stackoverflow.com/a/54256150/153102

@tmortagne I’m not sure it’s related to MySQL8, see https://stackoverflow.com/questions/26515700/mysql-jdbc-driver-5-1-33-time-zone-issue

It definitely is since we did not had this issue with the previous connector.

Actually it existes with MySQL5 before but it was an unwanted bug and got fixed and it now only exists in MySQL8. See https://stackoverflow.com/a/33893008/153102

So yes for new DBs we should force serverTimezone=UTC. For existing DBs though it needs to be set with the same timezone used for dates in the DB or the times retrieved will be shifted.

There is no impact of setting server time as UTC (for instance with jdbc:mysql://localhost:3306/myschema?serverTimezone=UTC , even if your application / database servers are not in this timezone. The important is for the application connection string + database to be synchronized with the same time zone. In different words, simply setting serverTimezone=UTC with a different time zone on the database server will shift any dates extracted from the database

The important is for the application connection string + database to be synchronized with the same time zone

So setting an arbitrary timezone is not going to work.

Uh this seems to be a hot discussion.
At the installation of the os I set the language to english, the location germany, the locales to en_US_UTF-8, keyboard to german

At the moment I do not exactly get what I should change to get it work. Could you explain this again, please? Thank you

See https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationWAR/InstallationMySQL/#HTips

Thank you for the link. What I’m wondering ist that the command mysql -v is telling me that there’s a MariaDB 10.3.22 installed. I was choosing the sudo apt-get install xwiki-tomcat9-mysql command for installation. Is this making any difference?

I didn’t really got it working within this link. It is telling me to set native password authentication but not how to actually do this as well as the timezone thing. And you really think this would make it work?

Well I’m really wondering why you provide a common installer if it doesn’t really work tbh. :sweat_smile:

Well here I am again. I tried a fresh installation from the beginning. But now i get this:

E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation

when I try to run wget -q “https://maven.xwiki.org/public.gpg” -O- | sudo apt-key add -

If I try to install it I get this error (no matter if I enter gnupg, gnupg1, gnupg2):

apt-get install gnupg2
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package gnupg2 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
gpgv

E: Package ‘gnupg2’ has no installation candidate

Thanks for your help