Structure plugin - Error when enabling the plugin

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

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

Why Customware support, I wonder ;)

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

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

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

0 vote

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

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

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.

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)

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

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

...

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

No problem Igor, any idea is appreciated.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Bridget Sauer
Published Thursday in Marketplace Apps

Calling all developers––You're invited to Atlas Camp 2018

 Atlas Camp   is our developer event which will take place in Barcelona, Spain  from the 6th -7th of   September . This is a great opportunity to meet other developers and get n...

196 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you