[xwiki-users] Logfile/Stack traces
Hi, I am a new XWiki User without a background in Java/Tomcat. I am getting a "org.wxiki.wiki.manager.WikiManagerException: Failed to create database for wiki" error when trying to create a new wiki (v5.4.2 from Debian packages). I assume that this error message is not very helpful. How can I find the stack trace of this error so that I can provide helpful information for debugging? Thanks, Christian -- View this message in context: http://xwiki.475771.n2.nabble.com/Logfile-Stack-traces-tp7589450.html Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi Christian, Sorry about that, is your issue the same as http://jira.xwiki.org/browse/XWIKI-10128 ? Thanks -Vincent On 7 Mar 2014 at 09:15:29, panyasan ([email protected](mailto:[email protected])) wrote:
Hi,
I am a new XWiki User without a background in Java/Tomcat. I am getting a "org.wxiki.wiki.manager.WikiManagerException: Failed to create database for wiki" error when trying to create a new wiki (v5.4.2 from Debian packages). I assume that this error message is not very helpful. How can I find the stack trace of this error so that I can provide helpful information for debugging?
Thanks, Christian
Yes, looks like it! Did you already find a fix for this? Here's the content of the distribution status.xml: <?xml version="1.0" encoding="UTF-8"?> <org.xwiki.extension.distribution.internal.job.FarmDistributionJobStatus> <logs serialization="custom"> <unserializable-parents/> <java.util.concurrent.ConcurrentLinkedQueue> <default/> <org.xwiki.logging.event.BeginLogEvent> <marker class="org.xwiki.logging.marker.BeginTranslationMarker"> <name>job.log.beginWithId</name> <references class="linked-hash-set"> <org.slf4j.helpers.BasicMarker> <name>xwiki.begin</name> </org.slf4j.helpers.BasicMarker> </references> <translationKey>job.log.beginWithId</translationKey> </marker> <level>INFO</level> <message>Starting job of type [{}] with identifier [{}]</message> <argumentArray> <string>distribution</string> <list> <string>distribution</string> </list> </argumentArray> </org.xwiki.logging.event.BeginLogEvent> <org.xwiki.logging.event.EndLogEvent> <marker class="org.xwiki.logging.marker.EndTranslationMarker"> <name>job.log.endWithId</name> <references class="linked-hash-set"> <org.slf4j.helpers.BasicMarker> <name>xwiki.end</name> </org.slf4j.helpers.BasicMarker> </references> <translationKey>job.log.endWithId</translationKey> </marker> <level>INFO</level> <message>Finished job of type [{}] with identifier [{}]</message> <argumentArray> <string>distribution</string> <list> <string>distribution</string> </list> </argumentArray> </org.xwiki.logging.event.EndLogEvent> <null/> </java.util.concurrent.ConcurrentLinkedQueue> </logs> <state>FINISHED</state> <request class="org.xwiki.extension.distribution.internal.job.DistributionRequest"> <id> <string>distribution</string> </id> <properties> <entry> <string>wiki</string> <string>xwiki</string> </entry> </properties> <verbose>true</verbose> </request> <startDate>2014-03-06 19:21:57.322 UTC</startDate> <endDate>2014-03-06 19:33:01.493 UTC</endDate> <subJob>false</subJob> <distributionExtension> <id>org.xwiki.enterprise:xwiki-enterprise-web</id> <version class="org.xwiki.extension.version.internal.DefaultVersion" serialization="custom"> <org.xwiki.extension.version.internal.DefaultVersion> <string>5.4.2</string> </org.xwiki.extension.version.internal.DefaultVersion> </version> </distributionExtension> <distributionExtensionUi> <id>org.xwiki.enterprise:xwiki-enterprise-ui-mainwiki</id> <version class="org.xwiki.extension.version.internal.DefaultVersion" serialization="custom"> <org.xwiki.extension.version.internal.DefaultVersion> <string>5.4.2</string> </org.xwiki.extension.version.internal.DefaultVersion> </version> </distributionExtensionUi> <stepList> <org.xwiki.extension.distribution.internal.job.step.WelcomeDistributionStep> <stepId>welcome</stepId> <state>COMPLETED</state> </org.xwiki.extension.distribution.internal.job.step.WelcomeDistributionStep> <org.xwiki.extension.distribution.internal.job.step.DefaultUIDistributionStep> <stepId>extension.defaultui</stepId> <state>COMPLETED</state> </org.xwiki.extension.distribution.internal.job.step.DefaultUIDistributionStep> <org.xwiki.extension.distribution.internal.job.step.WikisDefaultUIDistributionStep> <stepId>extension.defaultui.wikis</stepId> <state>COMPLETED</state> </org.xwiki.extension.distribution.internal.job.step.WikisDefaultUIDistributionStep> <org.xwiki.extension.distribution.internal.job.step.OutdatedExtensionsDistributionStep> <stepId>extension.outdatedextensions</stepId> <state>COMPLETED</state> </org.xwiki.extension.distribution.internal.job.step.OutdatedExtensionsDistributionStep> <org.xwiki.extension.distribution.internal.job.step.ReportDistributionStep> <stepId>report</stepId> <state>COMPLETED</state> </org.xwiki.extension.distribution.internal.job.step.ReportDistributionStep> </stepList> <currentStateIndex>4</currentStateIndex> </org.xwiki.extension.distribution.internal.job.FarmDistributionJobStatus> -- View this message in context: http://xwiki.475771.n2.nabble.com/Logfile-Stack-traces-tp7589450p7589455.htm... Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi, On 7 Mar 2014 at 09:37:32, panyasan ([email protected](mailto:[email protected])) wrote:
Yes, looks like it! Did you already find a fix for this?
Based on your file below it’s not the same problem. There’s no issue in your status.xml file...
Here's the content of the distribution status.xml:
[snip] Could you check your xwiki logs and paste the result somewhere (pastebin, gist, etc), especially if there are errors in it? Since your issue is different from the one I had, we’d need a clear explanation of all you did to try to reproduce it. Thanks -Vincent
Hello, As a side note, please make sure that your DB user has rights to create a new database/schema. For instance in MySQL, we often grant the rights with the command: GRANT ALL TO xwiki.* (...) which won't work in a case of a subwiki creation. So let's make sure we're not in this case here, because a bad grant would give you the error you had. Thanks, Guillaume 2014-03-07 10:06 GMT+01:00 [email protected] <[email protected]>:
Hi,
On 7 Mar 2014 at 09:37:32, panyasan ([email protected](mailto: [email protected])) wrote:
Yes, looks like it! Did you already find a fix for this?
Based on your file below it's not the same problem. There's no issue in your status.xml file...
Here's the content of the distribution status.xml:
[snip]
Could you check your xwiki logs and paste the result somewhere (pastebin, gist, etc), especially if there are errors in it?
Since your issue is different from the one I had, we'd need a clear explanation of all you did to try to reproduce it.
Thanks -Vincent
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hello Vincent, thank you for your prompt reply. As I said in my original question, I don't know where to find the error log with stack traces ... I am a total newbie as far as XWiki/Tomcat is concerned- Can you quickly tell me where to get them? Thanks, Christian -- View this message in context: http://xwiki.475771.n2.nabble.com/Logfile-Stack-traces-tp7589450p7589458.htm... Sent from the XWiki- Users mailing list archive at Nabble.com.
Hello, I did not modify anything, just went to the questions of the debian package installer. I gave the mysql root user a password, and also one the xwiki user, but only in the installer. This all went through without errors. I did not touch anything with mysql itself. Thanks, C. -- View this message in context: http://xwiki.475771.n2.nabble.com/Logfile-Stack-traces-tp7589450p7589460.htm... Sent from the XWiki- Users mailing list archive at Nabble.com.
Ok found it (at least I hope so): http://pastebin.com/BUEpvzz2 Thanks, C. -- View this message in context: http://xwiki.475771.n2.nabble.com/Logfile-Stack-traces-tp7589450p7589463.htm... Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi 1) You should check your tomcat install, there are several warnings/errors but they’re not the root cause of your issue 2) Initially it seems you tried to create a wiki without being logged in, not sure how this can happen… 3) At the end of the log you tried to create a “forum” subwiki and the error is very clear: Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user 'xwiki'@'localhost' to database ‘forum' As Guillaume Fenollar mentioned in another email this means that you need to grant the ability to create schema to the xwiki user in mysql, see http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL Note: It would be nice if this could be done by the debian installer by default. @Thomas (the creator of this installer), any idea why it’s not done? Thanks -Vincent On 7 Mar 2014 at 10:56:35, panyasan ([email protected](mailto:[email protected])) wrote:
Ok found it (at least I hope so):
Thanks, C.
Thank you for investigating the issue. Just so that I understand you and Guillaume clearly: I need to grant all rights to the xwiki mysql user manually to make this work, right? Like so: mysql -u root -e "grant all privileges on *.* to xwiki@localhost identified by 'xwiki'" (see https://network.xwiki.com/xwiki/bin/view/DocXEM41En/XWikiEnterpriseManagerIn...) Because I understood Guillaume to say explicitly that I shouldn't. It would be great if the debian packages get fixed, I need to be able to rely on them. BTW, it would be great if a XWiki Appliance existed for http://www.turnkeylinux.org. If everything works with the debian packages, I might do it. Thanks, C. -- View this message in context: http://xwiki.475771.n2.nabble.com/Logfile-Stack-traces-tp7589450p7589466.htm... Sent from the XWiki- Users mailing list archive at Nabble.com.
On 7 Mar 2014 at 11:32:56, panyasan ([email protected](mailto:[email protected])) wrote:
Thank you for investigating the issue.
Just so that I understand you and Guillaume clearly:
I need to grant all rights to the xwiki mysql user manually to make this work, right? Like so:
mysql -u root -e "grant all privileges on *.* to xwiki@localhost identified by 'xwiki’"
yes
(see https://network.xwiki.com/xwiki/bin/view/DocXEM41En/XWikiEnterpriseManagerIn...)
Note: This doc is from XWiki SAS not from xwiki.org Our xwiki.org doc is here: http://platform.xwiki.org/xwiki/bin/view/AdminGuide/InstallationMySQL
Because I understood Guillaume to say explicitly that I shouldn’t.
Some misunderstanding it seems.. You do need to grant privileges to the xwiki user...
It would be great if the debian packages get fixed,
I agree, maybe you could create a jira issue for this at http://jira.xwiki.org so that it’s not forgotten?
I need to be able to rely on them. BTW, it would be great if a XWiki Appliance existed for http://www.turnkeylinux.org. If everything works with the debian packages, I might do it.
That would be awesome. The challenge, beyond doing the first appliance, is to maintain it when new XWiki releases come out. Thanks! -Vincent
Thanks, C.
vmassol wrote
rely on them. BTW, it would be great if a XWiki Appliance existed for http://www.turnkeylinux.org. If everything works with the debian packages, I might do it.
That would be awesome. The challenge, beyond doing the first appliance, is to maintain it when new XWiki releases come out.
I know. That is why the debian package installation must be absolutely bug-free, without any post-install patches neccessary. Otherwise the maintenance is too much hassle. I'll create a Jira Issue for it. Thanks for your prompt and helpful replies! I'll try to make it work and will report. Christian -- View this message in context: http://xwiki.475771.n2.nabble.com/Logfile-Stack-traces-tp7589450p7589470.htm... Sent from the XWiki- Users mailing list archive at Nabble.com.
Unfortunately, this made things worse. Here's what I did: # mysql -u root -p -e "grant all privileges on *.* to xwiki@localhost identified by 'xwiki'" (entered root password) Now I am getting an HTTP Status 500 error from tomcat with the following stack trace: http://pastebin.com/pFKrGcTx The most important line being probably: org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'xwiki'@'localhost' (using password: YES)) :-( -- View this message in context: http://xwiki.475771.n2.nabble.com/Logfile-Stack-traces-tp7589450p7589471.htm... Sent from the XWiki- Users mailing list archive at Nabble.com.
Could you show us the value of these 3 properties from your hibernate.cfg.xml file (or better, paste it fully somewhere)? <property name="connection.url”>... <property name="connection.username”>... <property name="connection.password”>... I’m not a MySQL expert but the error seems to indicate that you didn’t give the “xwiki” used (the user used in <property name="connection.username”>) the proper rights in the DB somehow. Thanks -Vincent On 7 Mar 2014 at 14:13:35, panyasan ([email protected](mailto:[email protected])) wrote:
Unfortunately, this made things worse.
Here's what I did:
# mysql -u root -p -e "grant all privileges on *.* to xwiki@localhost identified by 'xwiki'"
(entered root password)
Now I am getting an HTTP Status 500 error from tomcat with the following stack trace:
The most important line being probably:
org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'xwiki'@'localhost' (using password: YES))
:-(
-- View this message in context: http://xwiki.475771.n2.nabble.com/Logfile-Stack-traces-tp7589450p7589471.htm... Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Here's /etc/xwiki/hibernate.cfg.xml: http://pastebin.com/CWCwNebS there is also a /usr/lib/xwiki/WEB-INF/hibernate.cfg.xml, but that's not the one you mean, is it? The credentials in the first config file for the xwiki mysql user is incorrect, I have given a different password during the Debian installer setup. But so far, it has worked anyways (except creating new wikis). Only after the manual "grant" did the wiki fully break. -- View this message in context: http://xwiki.475771.n2.nabble.com/Logfile-Stack-traces-tp7589450p7589474.htm... Sent from the XWiki- Users mailing list archive at Nabble.com.
I manually reset the password to the one that I used during the Debian installer setup, and could log into the wiki again. I tried to create a wiki et voilà - it worked. Somehow granting all permissions to the xwiki user seems to have reset its password to the one in the hibernate.cfg.xml file. No idea how that worked. I opened two issues on jira.xwiki.com (10130 and 10129) that address the problems I have encountered. Thanks again, Christian -- View this message in context: http://xwiki.475771.n2.nabble.com/Logfile-Stack-traces-tp7589450p7589476.htm... Sent from the XWiki- Users mailing list archive at Nabble.com.
participants (3)
-
Guillaume Fenollar -
panyasan -
vincent@massol.net