I’ve installed a new instanse of XWiki and PostgreSQL 14.
Used fresh installed OS.
xwiki-tomcat9-postgresql deb package was used.
APP and DB server are separated.
Instalation passed without errors, I’ve checked the connection to the DB from APP server by loggin under xwiki user from terminal - everything looks fine.
psql -U xwiki -h 10.40.63.231 -d postgres
Password for user xwiki:
psql (15.0 (Debian 15.0-1.pgdg110+1), server 14.5 (Debian 14.5-2.pgdg110+2))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off)
Type “help” for help.postgres=> \l
List of databases
Name | Owner | Encoding | Collate | Ctype | ICU Locale | Locale Provider | Access privileges
-----------±---------±---------±------------±------------±-----------±----------------±----------------------
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | | libc |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | | libc | =c/postgres +
| | | | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | | libc | =c/postgres +
| | | | | | | postgres=CTc/postgres
xwiki | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | | libc | =Tc/postgres +
| | | | | | | postgres=CTc/postgres+
| | | | | | | xwiki=C/postgres
(4 rows)postgres=> \du
List of roles
Role name | Attributes | Member of
-----------±-----------------------------------------------------------±----------
postgres | Superuser, Create role, Create DB, Replication, Bypass RLS | {}
xwiki | | {}postgres=>
After install I updated the tomcat9 config:
JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
JAVA_OPTS=“-Djava.awt.headless=true -Xmx2048m”
JAVA_OPTS=“${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom”
But at the 50% of initialization I’ve got errors:
HTTP Status 500 – Internal Server Error
Type Exception Report
Message Failed to execute the action with name [view]
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
Exception
javax.servlet.ServletException: Failed to execute the action with name [view]
com.xpn.xwiki.web.LegacyActionServlet.service(LegacyActionServlet.java:116)
javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:61)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)Root Cause
com.xpn.xwiki.XWikiException: Error number 11007 in 0: Failed to extract Entity Resource Reference from URL [http://10.40.22.248:8080/xwiki/bin/view/Main/]
com.xpn.xwiki.XWiki.initializeResourceFromURL(XWiki.java:1106)
com.xpn.xwiki.XWiki.getXWiki(XWiki.java:952)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:379)
com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:289)
com.xpn.xwiki.web.LegacyActionServlet.service(LegacyActionServlet.java:114)
javax.servlet.http.HttpServlet.service(HttpServlet.java:733)
com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:122)
org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:61)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
… etc → look at the attachment
Error 500 XWiki.txt (42.9 KB)
In Catalina.out there are to lines at the beginig of initialisation:
[2022-10-16 05:55:18] [info] 2022-10-16 05:55:18,553 [XWiki initialization] ERROR c.x.x.s.DBCPConnectionProvider - Could not create a DBCP pool. There is an error in the Hibernate configuration file, please review it.
[2022-10-16 05:55:18] [info] java.sql.SQLException: Cannot create PoolableConnectionFactory (FATAL: password authentication failed for user “xwiki”)
I tried to research the similar themes about “HTTP Status 500 – Internal Server Error”, but didn’t find appropriate solution.
I suppose that problem somewhere in connection to the PostgreSQL.
Pg_hba.conf:
TYPE DATABASE USER ADDRESS METHOD
“local” is for Unix domain socket connections only
local all all peer
IPv4 local connections:
host all all 127.0.0.1/32 scram-sha-256
host all all 10.40.22.0/24 md5
host all all 192.168.22.0/24 md5IPv6 local connections:
host all all ::1/128 scram-sha-256
Allow replication connections from localhost, by a user with the
replication privilege.
local replication all peer
host replication all 127.0.0.1/32 scram-sha-256
host replication all ::1/128 scram-sha-256
Finaly tomcat9 process was killed by OOM killer after 1 hour of standby in this state:
● tomcat9.service - Apache Tomcat 9 Web Application Server
Loaded: loaded (/lib/systemd/system/tomcat9.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/tomcat9.service.d
└─xwiki-tomcat9-systemd.conf
Active: failed (Result: oom-kill) since Sun 2022-10-16 13:33:53 EDT; 4h 40min ago
Docs: Apache Tomcat 9 (9.0.89) - Documentation Index
Process: 663 ExecStartPre=/usr/libexec/tomcat9/tomcat-update-policy.sh (code=exited, status=0/SUCCESS)
Process: 671 ExecStart=/bin/sh /usr/libexec/tomcat9/tomcat-start.sh (code=killed, signal=KILL)
Main PID: 671 (code=killed, signal=KILL)
CPU: 34min 22.004sOct 16 12:38:28 MGD-XWIKI-APP tomcat9[671]: at org.postgresql.Driver.connect(Driver.java:291)
Oct 16 12:38:28 MGD-XWIKI-APP tomcat9[671]: at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:52)
Oct 16 12:38:28 MGD-XWIKI-APP tomcat9[671]: at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:374)
Oct 16 12:38:28 MGD-XWIKI-APP tomcat9[671]: at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:106)
Oct 16 12:38:28 MGD-XWIKI-APP tomcat9[671]: at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:649)
Oct 16 12:38:28 MGD-XWIKI-APP tomcat9[671]: … 47 common frames omitted
Oct 16 13:33:53 MGD-XWIKI-APP systemd[1]: tomcat9.service: A process of this unit has been killed by the OOM killer.
Oct 16 13:33:53 MGD-XWIKI-APP systemd[1]: tomcat9.service: Main process exited, code=killed, status=9/KILL
Oct 16 13:33:53 MGD-XWIKI-APP systemd[1]: tomcat9.service: Failed with result ‘oom-kill’.
Oct 16 13:33:53 MGD-XWIKI-APP systemd[1]: tomcat9.service: Consumed 34min 22.004s CPU time.
Any ideas, what shuold I check or fix in that case?
PS: great thanks in advance.
hibernate.cfg.xml.txt (16.1 KB)
pg_hba.conf.txt (997 Bytes)