Structure plugin - Error when enabling the plugin

Werner
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 9, 2012

When I enabe the structure plugin, the button changes to "Disable", but nothing changes - the plugin is still disabled (Versions: Structure 2.0.0, Jira 5.1.2).

The log shows the following error:

Error message: Failed to start database '/atlassian/application-data/jira/structure/db' with class loader 119.0, see the next exception for details.

Shutting down instance a816c00e-013b-7131-ae6e-fffff34e140a on database directory /atlassian/application-data/jira/structure/db with class loader 11

9.0

Thu Dec 06 18:09:39 CET 2012 Structure-Jobs-79e83ae8 Thread#1 Cleanup action starting

java.sql.SQLException: Failed to start database '/atlassian/application-data/jira/structure/db' with class loader 119.0, see the next exception for

details.

at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)

at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)

at org.apache.derby.impl.jdbc.Util.seeNextException(Unknown Source)

at org.apache.derby.impl.jdbc.EmbedConnection.bootDatabase(Unknown Source)

at org.apache.derby.impl.jdbc.EmbedConnection.<init>(Unknown Source)

at org.apache.derby.impl.jdbc.EmbedConnection30.<init>(Unknown Source)

at org.apache.derby.impl.jdbc.EmbedConnection40.<init>(Unknown Source)

at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)

at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)

at org.apache.derby.jdbc.AutoloadedDriver.connect(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at com.almworks.jira.structure.services.jdbc.BackendPool.createUnderlyingResource(BackendPool.java:43)

at com.almworks.jira.structure.services.jdbc.BackendPool.createUnderlyingResource(BackendPool.java:14)

at com.almworks.jira.structure.util.ConnectionPool2.createConnection(ConnectionPool2.java:63)

at com.almworks.jira.structure.util.ConnectionPool2.warmUp(ConnectionPool2.java:172)

at com.almworks.jira.structure.services.jdbc.JDBCStructureBackendManager.startPool(JDBCStructureBackendManager.java:244)

at com.almworks.jira.structure.services.jdbc.JDBCStructureBackendManager.start(JDBCStructureBackendManager.java:225)

at com.almworks.jira.structure.services.jdbc.JDBCStructureBackendManager.getPool(JDBCStructureBackendManager.java:100)

at com.almworks.jira.structure.services.jdbc.JDBCStructureBackendManager.execute(JDBCStructureBackendManager.java:112)

at com.almworks.jira.structure.services.BackendBasedSyncManager.start0(BackendBasedSyncManager.java:473)

at com.almworks.jira.structure.services.BackendBasedSyncManager.access$000(BackendBasedSyncManager.java:34)

at com.almworks.jira.structure.services.BackendBasedSyncManager$1.doStart(BackendBasedSyncManager.java:64)

at com.almworks.jira.structure.util.Starter.runStart(Starter.java:48)

at com.almworks.jira.structure.util.Starter.start(Starter.java:36)

at com.almworks.jira.structure.services.BackendBasedSyncManager$3.doJob(BackendBasedSyncManager.java:98)

at com.almworks.jira.structure.api.job.AbstractStructureJob.job(AbstractStructureJob.java:50)

at com.almworks.jira.structure.services.SingleThreadJobManager.runJob(SingleThreadJobManager.java:230)

at com.almworks.jira.structure.services.SingleThreadJobManager.access$1300(SingleThreadJobManager.java:27)

at com.almworks.jira.structure.services.SingleThreadJobManager$JobThread.run(SingleThreadJobManager.java:398)

Caused by: java.sql.SQLException: Failed to start database '/atlassian/application-data/jira/structure/db' with class loader 119.0, see the next exc

eption for details.

at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)

at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)

... 30 more

Caused by: java.sql.SQLException: Container was opened in read-only mode.

at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)

at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)

at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)

at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)

... 27 more

Caused by: ERROR 40XD1: Container was opened in read-only mode.

at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)

at org.apache.derby.impl.store.raw.data.BaseContainer.use(Unknown Source)

at org.apache.derby.impl.store.raw.data.BaseContainerHandle.useContainer(Unknown Source)

at org.apache.derby.impl.store.raw.data.BaseDataFileFactory.openContainer(Unknown Source)

2 answers

1 accepted

0 votes
Answer accepted
JohnA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 9, 2012

Hi Lem,

Can you try clearing your plugin caches and seeing whether that resolves your issue or not? You can do that by following the instructions outlined below:

1. Shutdown Confluence
2. Delete the following directories
<confluence-home>/bundled-plugins folder
<confluence-home>/plugin-cache folder
<confluence-home>/plugins-osgi-cache folder
<confluence-home>/plugins-temp folder
3. Restart Confluence

If this doesn't work then you should contact Customware Support and ask their input on this issue.

All the best,
John

Igor Sereda [ALM Works]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 9, 2012

Why Customware support, I wonder ;)

Werner
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

@John Inder [Atlassian] : thanks a lot, your hint worked!

Igor Sereda [ALM Works]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

Lem, did you clean Confluence home directories and it helped Structure, installed in JIRA?

Werner
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

Yep - I deleted the folders and restarted Confluence. And then it was possible to enable Structure .

0 votes
Igor Sereda [ALM Works]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 9, 2012

Please take a look here - https://wiki.almworks.com/x/zwqf

It looks like "structure" sub-directory in your JIRA home directory is not writable by JIRA process. Make sure /atlassian/application-data/jira/structure/ is fully writable by JIRA and there's enough free disk space.

Hope this helps!
Igor

Werner
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2012

Thanks for the info. We checked the rights, they are drwxr-xr-x - looks pretty ok.

Igor Sereda [ALM Works]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 10, 2012

Lem, did structure work before on this JIRA? Did you copy JIRA instance lately? Is it possible that another JIRA instance is using the same JIRA home?

To verify that your JIRA has adequate permissions please provide the output of the following commands:

ls -aln /atlassian/application-data/jira/structure/
df -k /atlassian/application-data/jira/structure/
mount -l
ps -ef n | grep java

From the latter command I need only the one that represents running JIRA instance.

Werner
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

Here's the output:

1: ls -aln /atlassian/application-data/jira/structure/
total 528
drwxr-xr-x. 3 1115 1115 4096 Sep 21 09:51 .
drwx------. 14 1115 1115 4096 Nov 6 11:08 ..
drwxr-xr-x. 4 1115 1115 4096 Dec 10 11:58 db
-rw-r--r--. 1 1115 1115 520896 Dec 10 11:58 derby.log

2: df -k /atlassian/application-data/jira/structure/
Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/app1vg-jira1lv
15481840 1988148 12707260 14% /atlassian

3: mount -l
/dev/mapper/rootvg-rootlv on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw,rootcontext="system_u:object_r:tmpfs_t:s0")
/dev/sda1 on /boot type ext4 (rw)
/dev/mapper/rootvg-homelv on /home type ext4 (rw)
/dev/mapper/rootvg-varlv on /var type ext4 (rw)
/dev/mapper/app1vg-jira1lv on /atlassian type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)

Werner
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

1115 26365 1 0 Dec07 ? Sl 16:05 /opt/atlassian/jira/jre//bin/java -Djava.util.logging.config.file=/opt/atlassian/jira/conf/logging.properties -XX:MaxPermSize=256m -Xms256m -Xmx768m -Djava.awt.headless=true -Datlassian.standalone=JIRA -Dorg.apache.jasper.runtime.BodyContentImpl.LIMIT_BUFFER=true -Dmail.mime.decodeparameters=true -Dhttp.proxyHost=uxm-proxy.lottery.co.at -Dhttp.proxyPort=480 -Djira.jelly.on=true -XX:+PrintGCDateStamps -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/atlassian/jira/endorsed -classpath /opt/atlassian/jira/bin/bootstrap.jar -Dcatalina.base=/opt/atlassian/jira -Dcatalina.home=/opt/atlassian/jira -Djava.io.tmpdir=/opt/atlassian/jira/temp org.apache.catalina.startup.Bootstrap start

Werner
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

4: ps -ef n| grep java
0 3938 567 0 14:59 pts/0 S+ 0:00 grep java
1116 6913 1 0 Oct22 ? Sl 242:23 /opt/atlassian/confluence/jre//bin/java -Djava.util.logging.config.file=/opt/atlassian/confluence/conf/logging.properties -Xms256m -Xmx512m -XX:MaxPermSize=256m -Dhttp.proxyHost=uxm-proxy.lottery.co.at -Dhttp.proxyPort=480 -Djava.awt.headless=true -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/atlassian/confluence/endorsed -classpath /opt/atlassian/confluence/bin/bootstrap.jar -Dcatalina.base=/opt/atlassian/confluence -Dcatalina.home=/opt/atlassian/confluence -Djava.io.tmpdir=/opt/atlassian/confluence/temp org.apache.catalina.startup.Bootstrap start
0 8244 1 0 Oct22 ? Sl 152:49 /usr/bin/java -Djava.util.logging.config.file=/opt/atlassian/atlassian-crowd-2.5.0/apache-tomcat/conf/logging.properties -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8 -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/atlassian/atlassian-crowd-2.5.0/apache-tomcat/endorsed -classpath /opt/atlassian/atlassian-crowd-2.5.0/apache-tomcat/bin/bootstrap.jar -Dcatalina.base=/opt/atlassian/atlassian-crowd-2.5.0/apache-tomcat -Dcatalina.home=/opt/atlassian/atlassian-crowd-2.5.0/apache-tomcat -Djava.io.tmpdir=/opt/atlassian/atlassian-crowd-2.5.0/apache-tomcat/temp org.apache.catalina.startup.Bootstrap start

...

Igor Sereda [ALM Works]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

Hello Lem, thank you very much. It does look normal.

I just remembered, we've had a case where just certain files inside structure/db/ were made inaccessible by root. To make sure we don't have the same case here, could you please list the files in /structure/ recursively:

ls -alnR /atlassian/application-data/jira/structure/

If you see that all files have correct permissions and all are owned by user 1115, then this is not the case.

Then to proceed, please try the following: rename "structure" subdirectory to "structure_backup" (if you don't already have such directory, of course). Try to start Structure and see if it can successfully create "structure/" subdirectory and start.

Thanks and sorry for the inconvenience.
Igor

Werner
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 11, 2012

No problem Igor, any idea is appreciated.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events