Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-1923

[AMQ7, ha replication, server.lock] broker appears to hang when server.lock has incorrect file permissions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • AMQ 7.2.2.GA
    • AMQ 7.2.0.GA
    • None
    • None
    • Hide
      • start a broker
      • stop broker
      • change permission on data/journal/server.lock
           chmod 000 server.lock
        
      • restart broker

      Result

      no exception logged in broker. Broker logs it is starting and nothing else.

      Show
      start a broker stop broker change permission on data/journal/server.lock chmod 000 server.lock restart broker Result no exception logged in broker. Broker logs it is starting and nothing else.
    • AMQ Broker 1839

    Description

      When the server.lock does not have the correct permission set and cannot be accessed in the artemis log it just seems to hang and does not report any error . Also nothing is obvious why it is hanging from the thread dump.

      2018-08-22 20:46:05,260 INFO  [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server
      

      However when I looked at the console/terminal output it reported the "FileNotFoundException".

      018-08-22 19:00:55,065 INFO  [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server
      Exception in thread "main" java.io.FileNotFoundException: ...../amq-broker-7.2.0/examples/features/ha/replicated-failback-static/target/server1/./data/journal/server.lock (Permission denied)
      	at java.io.RandomAccessFile.open(Native Method)
      	at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)
      	at org.apache.activemq.artemis.core.server.NodeManager.setUpServerLockFile(NodeManager.java:179)
      	at org.apache.activemq.artemis.core.server.impl.FileLockNodeManager.start(FileLockNodeManager.java:76)
      	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.internalStart(ActiveMQServerImpl.java:526)
      	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.start(ActiveMQServerImpl.java:474)
      	at org.apache.activemq.artemis.integration.FileBroker.start(FileBroker.java:111)
      	at org.apache.activemq.artemis.cli.commands.Run.execute(Run.java:82)
      	at org.apache.activemq.artemis.cli.Artemis.internalExecute(Artemis.java:149)
      	at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:97)
      	at org.apache.activemq.artemis.cli.Artemis.execute(Artemis.java:124)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:483)
      	at org.apache.activemq.artemis.boot.Artemis.execute(Artemis.java:129)
      	at org.apache.activemq.artemis.boot.Artemis.main(Artemis.java:49)
      ~~~  
      

      This exception should be logged to the log file as it is very difficult to spot if you miss the standard/error output and are only review the artemis log.

      Attachments

        Activity

          People

            rhn-support-jbertram Justin Bertram
            rhn-support-pfox Patrick Fox (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: