Question & Answer
Question
Technical: How to configure JBOSS startup script when JBOSS is installed on a network mounted file system?
Answer
The symptoms:
JBoss Console (jmx-console) is not accessible; the startup script doesn’t seem to precede any further, the thread dump shows that the main thread is stuck at:
"main" prio=3 tid=0x0014d800 nid=0xf runnable [0xd6bfa000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.FileChannelImpl.lock0(Native Method)
at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:879)
at org.hsqldb.persist.NIOLockFile.lockImpl(Unknown Source)
at org.hsqldb.persist.LockFile.tryLock(Unknown Source)
at org.hsqldb.persist.LockFile.newLockFileLock(Unknown Source)
at org.hsqldb.persist.Logger.acquireLock(Unknown Source)
at org.hsqldb.persist.Logger.openLog(Unknown Source)
The solution:
JBoss is shipped with a default database - Hypersonic database (hsqldb) which it uses for persistence and caching as well as for saving durable topic subscriptions and authentication. Unless JBoss is configured to use a different database as a part of the startup process it will attempt to put configurations in hsqldb. (It is not recommended to use hsqldb in production systems)
As seen in the trace above, the main process is stuck while attempting to create a file in the data directory. As the file system is network mounted, the process is unable to create the file/directory.
One of the solutions to address this problem is to specify the data directory to a file system on the local machine. This can be achieved by defining the data directory as an argument to the startup script (run.sh/bat)
i.e.
run.sh -c <your server configuration> -Djboss.server.data.dir=<directory on local machine>
The Jboss server should start after this and you should be able to access the jmx-console.
[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Not Applicable","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]
Historical Number
HTG2641
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21563768