Uploaded image for project: 'Geronimo'
  1. Geronimo
  2. GERONIMO-5372

Linux cann't grap file lock from windows but windows can grap share file lock from linux

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.2.1
    • Component/s: ActiveMQ
    • Security Level: public (Regular issues)
    • Labels:
      None
    • Environment:

      OS: suse 10 sp2, windows 2003, redhat 5.3
      JDK: 1.6.10

      Description

      Server 1: windows 2003, 9.123.233.112
      Server 2: suse 10 sp2 , 9.186.10.68
      Server 3: redhat 5.3 , 9.186.10.96
      Samba share filesystem: //9.186.10.68/share

      1.Go to server 1, edit var/activemq/activemq.xml,
      <persistenceAdapter>
      <amqPersistenceAdapter directory="//9.186.10.68/share"/>
      </persistenceAdapter>
      2.Go to server 2, mount //9.186.10.68/share /mnt, edit var/activemq/activemq.xml,
      <persistenceAdapter>
      <amqPersistenceAdapter directory="/mnt"/>
      </persistenceAdapter>
      3.Go to server 3, mount //9.186.10.68/share /mnt, edit var/activemq/activemq.xml,
      <persistenceAdapter>
      <amqPersistenceAdapter directory="/mnt"/>
      </persistenceAdapter>

      4. Start server 1, then server 2, server 3, but server 2, 3 reported errors below, startup process exits.
      2010-06-08 10:54:10,232 ERROR [BrokerService] Failed to start ActiveMQ JMS Message Broker. Reason: java.io.IOException: Permission denied
      java.io.IOException: Permission denied
      at sun.nio.ch.FileChannelImpl.lock0(Native Method)
      at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:882)
      at java.nio.channels.FileChannel.tryLock(FileChannel.java:962)
      at org.apache.activemq.store.amq.AMQPersistenceAdapter.doLock(AMQPersistenceAdapter.java:1094)
      at org.apache.activemq.store.amq.AMQPersistenceAdapter.lock(AMQPersistenceAdapter.java:1058)
      at org.apache.activemq.store.amq.AMQPersistenceAdapter.start(AMQPersistenceAdapter.java:182)
      at org.apache.activemq.broker.BrokerService.start(BrokerService.java:477)
      at org.apache.geronimo.activemq.BrokerServiceGBeanImpl.doStart(BrokerServiceGBeanImpl.java:120)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:953)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:269)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:103)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:125)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:539)
      at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:377)
      at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456)
      at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:190)
      at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:546)
      at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
      at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:816)
      at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
      at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
      at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
      at org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$$81e42b92.startConfiguration(<generated>)
      at org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:204)
      at org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:87)
      at org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
      at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
      at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)
      2010-06-08 10:54:10,270 ERROR [AMQPersistenceAdapter] Could not stop service: AMQPersistenceAdapter(/tmp/68share). Reason: java.lang.NullPointerExc
      eption
      java.lang.NullPointerException
      at org.apache.activemq.store.amq.AMQPersistenceAdapter.stop(AMQPersistenceAdapter.java:313)
      at org.apache.activemq.util.ServiceStopper.stop(ServiceStopper.java:41)
      at org.apache.activemq.broker.BrokerService.stop(BrokerService.java:573)
      at org.apache.activemq.xbean.XBeanBrokerService.stop(XBeanBrokerService.java:118)
      at org.apache.activemq.broker.BrokerService.start(BrokerService.java:521)
      at org.apache.geronimo.activemq.BrokerServiceGBeanImpl.doStart(BrokerServiceGBeanImpl.java:120)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:953)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:269)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:103)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:125)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:539)
      at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:377)
      at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456)
      at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:190)
      at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:546)
      at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
      at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:816)
      at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
      at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
      at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
      at org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$$81e42b92.startConfiguration(<generated>)
      at org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:204)
      at org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:87)
      at org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
      at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)
      at org.apache.geronimo.cli.daemon.DaemonCLI.main(DaemonCLI.java:30)
      2010-06-08 10:54:10,290 WARN [BrokerService] Failed to stop broker after failure in start
      java.lang.NullPointerException
      at org.apache.activemq.store.amq.AMQPersistenceAdapter.stop(AMQPersistenceAdapter.java:313)
      at org.apache.activemq.util.ServiceStopper.stop(ServiceStopper.java:41)
      at org.apache.activemq.broker.BrokerService.stop(BrokerService.java:573)
      at org.apache.activemq.xbean.XBeanBrokerService.stop(XBeanBrokerService.java:118)
      at org.apache.activemq.broker.BrokerService.start(BrokerService.java:521)
      at org.apache.geronimo.activemq.BrokerServiceGBeanImpl.doStart(BrokerServiceGBeanImpl.java:120)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(GBeanInstance.java:953)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(GBeanInstanceState.java:269)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstanceState.java:103)
      at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GBeanInstanceState.java:125)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanInstance.java:539)
      at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(BasicKernel.java:377)
      at org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans(ConfigurationUtil.java:456)
      at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(KernelConfigurationManager.java:190)
      at org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(SimpleConfigurationManager.java:546)
      at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(ReflectionMethodInvoker.java:34)
      at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperation.java:130)
      at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.java:816)
      at org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:57)
      at org.apache.geronimo.kernel.basic.RawOperationInvoker.invoke(RawOperationInvoker.java:35)
      at org.apache.geronimo.kernel.basic.ProxyMethodInterceptor.intercept(ProxyMethodInterceptor.java:96)
      at org.apache.geronimo.gbean.GBeanLifecycle$$EnhancerByCGLIB$$81e42b92.startConfiguration(<generated>)
      at org.apache.geronimo.system.main.EmbeddedDaemon.doStartup(EmbeddedDaemon.java:204)
      at org.apache.geronimo.system.main.EmbeddedDaemon.execute(EmbeddedDaemon.java:87)
      at org.apache.geronimo.kernel.util.MainConfigurationBootstrapper.main(MainConfigurationBootstrapper.java:45)
      at org.apache.geronimo.cli.AbstractCLI.executeMain(AbstractCLI.java:65)

      5. If i start server 2, then server 1, server 1 will wait to file lock. And i shutdown server 2, server 1 can grap file release, and continue startup.

        Attachments

        1. Windows_FileShare.JPG
          265 kB
          viola.lu
        2. G5372.patch
          1 kB
          viola.lu

          Activity

            People

            • Assignee:
              genspring Lin Quan Jiang
              Reporter:
              viola.lu viola.lu
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: