I recently deployed Xwiki:Latest docker on my unRAID server at home, I attached it to my MariaDB:latest container and it worked flawlessly. This was a test deployment and it worked out of the box.
I then proceeded to install a centOS 7 distro at work and setup docker. I deployed a MariaDB:latest container which works,then I tried to deploy the Xwiki:latest container on the distro, but for the life of me I can not get it going.
I’ve been struggling with this for the last couple days, the Xwiki starts to initialize but then errors out on page load. The error is vague and I would appreciate any help.
HTTP Status 500 – Internal Server Error
Type Exception Report
Message com.xpn.xwiki.XWikiException: Error number 11007 in 0: Failed to extract Entity Resource Reference from URL [http://127.0.0.1/bin/view/Main/]
Description The server encountered an unexpected condition that prevented it from fulfilling the request.
The problem is “java.net.ConnectException: Connection refused (Connection refused)”. The XWiki instance is failing to connect to your DB. You need to check your hibernate.cfg.xml file and verify the connection between XWiki and the DB is ok.
That’s odd I can connect remotely to the DB with the user name and password just fine.
<?xml version="1.0" encoding="UTF-8"?>
<!-- Please refer to the installation guide on
http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Installation for configuring your
database. You'll need to do 2 things:
1) Copy your database driver JAR in WEB-INF/lib or in some shared lib directory
2) Uncomment the properties below for your specific DB (and comment the default
database configuration if it doesn't match your DB)
-->
<!-- Generic parameters common to all Databases -->
<property name="show_sql">false</property>
<property name="use_outer_join">true</property>
<!-- Without it, some queries fail in MS SQL. XWiki doesn't need scrollable result sets, anyway. -->
<property name="jdbc.use_scrollable_resultset">false</property>
<!-- DBCP Connection Pooling configuration. Only some properties are shown. All available properties can be found
at http://commons.apache.org/proper/commons-dbcp/configuration.html
-->
<property name="dbcp.defaultAutoCommit">false</property>
<property name="dbcp.maxTotal">50</property>
<property name="dbcp.maxIdle">5</property>
<property name="dbcp.maxWaitMillis">30000</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
<!-- Setting "dbcp.poolPreparedStatements" to true and "dbcp.maxOpenPreparedStatements" will tell DBCP to cache
Prepared Statements (it's off by default). Note that for backward compatibility the "dbcp.ps.maxActive" is also
supported and when set it'll set "dbcp.poolPreparedStatements" to true and "dbcp.maxOpenPreparedStatements" to
value of "dbcp.ps.maxActive".
Note 1: When using HSQLDB for example, it's important to NOT cache prepared statements because HSQLDB
Prepared Statements (PS) contain the schema on which they were initially created and thus when switching
schema if the same PS is reused it'll execute on the wrong schema! Since HSQLDB does internally cache
prepared statement there's no performance loss by not caching Prepared Statements at the DBCP level.
See http://jira.xwiki.org/browse/XWIKI-1740.
Thus we recommend not turning on this configuration for HSQLDB unless you know what you're doing :)
Note 2: The same applies to PostGreSQL.
-->
<!-- BoneCP Connection Pooling configuration.
<property name="bonecp.idleMaxAgeInMinutes">240</property>
<property name="bonecp.idleConnectionTestPeriodInMinutes">60</property>
<property name="bonecp.partitionCount">3</property>
<property name="bonecp.acquireIncrement">10</property>
<property name="bonecp.maxConnectionsPerPartition">60</property>
<property name="bonecp.minConnectionsPerPartition">20</property>
<property name="bonecp.statementsCacheSize">50</property>
<property name="bonecp.releaseHelperThreads">3</property>
<property name="connection.provider_class">com.xpn.xwiki.store.DBCPConnectionProvider</property>
-->
<!-- MySQL configuration.
Notes:
- if you want the main wiki database to be different than "xwiki"
you will also have to set the property xwiki.db in xwiki.cfg file
-->
<property name="connection.url">jdbc:mysql://127.0.0.1/xwiki?useSSL=false</property>
<property name="connection.username">xwiki</property>
<property name="connection.password">xwiki</property>
<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
<property name="connection.useUnicode">true</property>
<property name="connection.characterEncoding">UTF-8</property>
<property name="dbcp.poolPreparedStatements">true</property>
<property name="dbcp.maxOpenPreparedStatements">20</property>
<mapping resource="xwiki.hbm.xml"/>
<mapping resource="feeds.hbm.xml"/>
<mapping resource="activitystream.hbm.xml"/>
<mapping resource="instance.hbm.xml"/>
<mapping resource="mailsender.hbm.xml"/>
Hi. I’ve been trying to get xwiki running on my unraid using the mariadb:latest and this post is the only mention I can find of someone getting it working. When I connect to the web interface I get the following:
“java.sql.SQLException: Access denied for user ‘xwiki’@‘172.17.0.1’ (using password: YES)”
Even though I specified the DB_HOST variable to point to my mariadb’s host port, which is not 172.17.0.1.
I have tried using my host’s IP address and name, both with and without the mysql port.
I would be very interested if you could share your unraid xwiki configuration.
Any help would be appreciated!
As I mentioned in my original post, this is the only mention that I could find of someone successfully using the xwiki docker image on unraid, and was hoping that Exist2Resist could lend some insights as to how to get this working for me.
I understand that it doesn’t have anything to do with the original topic though, and I apologize for that.
I am happy that the link that you provided me did indeed point me to the right direction. When I created the xwiki db user, I gave the user access to connect from my NAT’d IP address, which seems to have been the issue. I changed it to be able to connect from “%”, and it is now working fine.