You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "viola.lu (JIRA)" <ji...@apache.org> on 2010/06/08 09:19:12 UTC

[jira] Created: (GERONIMO-5372) Linux cann't grap file lock from windows but windows can grap share file lock from linux

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

                 Key: GERONIMO-5372
                 URL: https://issues.apache.org/jira/browse/GERONIMO-5372
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: ActiveMQ
    Affects Versions: 2.2.1
         Environment: OS: suse 10 sp2, windows 2003, redhat 5.3
JDK: 1.6.10
            Reporter: viola.lu
            Assignee: Shawn Jiang
             Fix For: 2.2.1


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.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-5372) Linux cann't grap file lock from windows but windows can grap share file lock from linux

Posted by "Shawn Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-5372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12880729#action_12880729 ] 

Shawn Jiang commented on GERONIMO-5372:
---------------------------------------

The error was found on amqPersistenceAdapter instead of kahaDB,  right ?

I'd suggest to verify amqPersistenceAdapter  on activeMQ to see if the origianl issue still exists in activeMQ.

> Linux cann't grap file lock from windows but windows can grap share file lock from linux 
> -----------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5372
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5372
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: ActiveMQ
>    Affects Versions: 2.2.1
>         Environment: OS: suse 10 sp2, windows 2003, redhat 5.3
> JDK: 1.6.10
>            Reporter: viola.lu
>            Assignee: Shawn Jiang
>             Fix For: 2.2.1
>
>         Attachments: Windows_FileShare.JPG
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (GERONIMO-5372) Linux cann't grap file lock from windows but windows can grap share file lock from linux

Posted by "viola.lu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

viola.lu closed GERONIMO-5372.
------------------------------

    Resolution: Invalid

I changed the amqpersistentadapter 

<persistenceAdapter>
      <amqPersistenceAdapter directory="/sharedFileSystem/sharedBrokerData"/>
    </persistenceAdapter>
to 

<persistenceAdapter>
      <kahaDB directory="/sharedFileSystem/sharedBrokerData"/>
    </persistenceAdapter>
, now this problem doesn't exist
so close it. 
thanks, ivan.


> Linux cann't grap file lock from windows but windows can grap share file lock from linux 
> -----------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5372
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5372
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: ActiveMQ
>    Affects Versions: 2.2.1
>         Environment: OS: suse 10 sp2, windows 2003, redhat 5.3
> JDK: 1.6.10
>            Reporter: viola.lu
>            Assignee: Shawn Jiang
>             Fix For: 2.2.1
>
>         Attachments: Windows_FileShare.JPG
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (GERONIMO-5372) Linux cann't grap file lock from windows but windows can grap share file lock from linux

Posted by "viola.lu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

viola.lu updated GERONIMO-5372:
-------------------------------

    Attachment: Windows_FileShare.JPG

> Linux cann't grap file lock from windows but windows can grap share file lock from linux 
> -----------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5372
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5372
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: ActiveMQ
>    Affects Versions: 2.2.1
>         Environment: OS: suse 10 sp2, windows 2003, redhat 5.3
> JDK: 1.6.10
>            Reporter: viola.lu
>            Assignee: Shawn Jiang
>             Fix For: 2.2.1
>
>         Attachments: Windows_FileShare.JPG
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-5372) Linux cann't grap file lock from windows but windows can grap share file lock from linux

Posted by "viola.lu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-5372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12876646#action_12876646 ] 

viola.lu commented on GERONIMO-5372:
------------------------------------

I tried on activemq 5.3.2, whether linux or windows can grab file lock from others like below:

INFO | Using Persistence Adapter: org.apache.activemq.store.kahadb.KahaDBPersis
 INFO | Database /share/lock is locked... waiting 10 seconds for the database to not be locked.
 INFO | Database /share/lock is locked... waiting 10 seconds for the database to not be locked.
 INFO | Database /share/lock is locked... waiting 10 seconds for the database to not be locked.
 INFO | Replayed 1 operations from the journal in 0.0080 seconds.
 INFO | ActiveMQ 5.3.2 JMS Message Broker (share) is starting
 INFO | For help or more information please see: http://activemq.apache.org/
 INFO | Listening for connections at: tcp://rhel53x86:61616
 INFO | Connector openwire Started
 INFO | ActiveMQ JMS Message Broker (share, ID:rhel53x86-47525-1275997184970-0:0
 INFO | Logging to org.slf4j.impl.JCLLoggerAdapter(org.mortbay.log) via org.mort
 INFO | jetty-6.1.9
 INFO | ActiveMQ WebConsole initialized.
 INFO | Initializing Spring FrameworkServlet 'dispatcher'
 INFO | ActiveMQ Console at http://0.0.0.0:8161/admin
 INFO | Initializing Spring root WebApplicationContext
 INFO | Successfully connected to tcp://localhost:61616
 INFO | Camel Console at http://0.0.0.0:8161/camel
 INFO | ActiveMQ Web Demos at http://0.0.0.0:8161/demo
 INFO | RESTful file access application at http://0.0.0.0:8161/fileserver
 INFO | Started SelectChannelConnector@0.0.0.0:8161


> Linux cann't grap file lock from windows but windows can grap share file lock from linux 
> -----------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5372
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5372
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: ActiveMQ
>    Affects Versions: 2.2.1
>         Environment: OS: suse 10 sp2, windows 2003, redhat 5.3
> JDK: 1.6.10
>            Reporter: viola.lu
>            Assignee: Shawn Jiang
>             Fix For: 2.2.1
>
>         Attachments: Windows_FileShare.JPG
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-5372) Linux cann't grap file lock from windows but windows can grap share file lock from linux

Posted by "Shawn Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-5372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12881013#action_12881013 ] 

Shawn Jiang commented on GERONIMO-5372:
---------------------------------------

I suggest we change the default adapter in geronimo to kahaDB ,the same with activeMQ standalone.

> Linux cann't grap file lock from windows but windows can grap share file lock from linux 
> -----------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5372
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5372
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: ActiveMQ
>    Affects Versions: 2.2.1
>         Environment: OS: suse 10 sp2, windows 2003, redhat 5.3
> JDK: 1.6.10
>            Reporter: viola.lu
>            Assignee: Shawn Jiang
>             Fix For: 2.2.1
>
>         Attachments: Windows_FileShare.JPG
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (GERONIMO-5372) Linux cann't grap file lock from windows but windows can grap share file lock from linux

Posted by "viola.lu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

viola.lu reopened GERONIMO-5372:
--------------------------------


i tried amqpersistentadapter on activemq, it also can wait for lock , and grap the file share from a failed acitvemq, pls see log, so reopen it.
INFO | Using Persistence Adapter: AMQPersistenceAdapter(/share)
 WARN | Waiting to Lock the Store /share
 INFO | AMQStore starting using directory: /share
 INFO | Kaha Store using data directory /share/kr-store/state
 INFO | Active data files: []
 WARN | The ReferenceStore is not valid - recovering ...
 INFO | Kaha Store successfully deleted data directory /share/kr-store/data
 INFO | Journal Recovery Started from: DataManager:(data-)
 INFO | Recovered 0 operations from redo log in 0.011 seconds.
 INFO | Finished recovering the ReferenceStore
 INFO | Aquired lock for AMQ Store/share
 INFO | ActiveMQ 5.3.2 JMS Message Broker (share) is starting
 INFO | For help or more information please see: http://activemq.apache.org/
 INFO | Kaha Store using data directory /share/kr-store/data
 INFO | Listening for connections at: tcp://rhel53x86:61617
 INFO | Connector openwire Started
 INFO | ActiveMQ JMS Message Broker (share, ID:rhel53x86-37644-1277103386077-0:0) started
 INFO | Logging to org.slf4j.impl.JCLLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
 INFO | jetty-6.1.9
 INFO | ActiveMQ WebConsole initialized.
 INFO | Initializing Spring FrameworkServlet 'dispatcher'
 INFO | ActiveMQ Console at http://0.0.0.0:8161/admin
 INFO | Initializing Spring root WebApplicationContext


> Linux cann't grap file lock from windows but windows can grap share file lock from linux 
> -----------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5372
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5372
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: ActiveMQ
>    Affects Versions: 2.2.1
>         Environment: OS: suse 10 sp2, windows 2003, redhat 5.3
> JDK: 1.6.10
>            Reporter: viola.lu
>            Assignee: Shawn Jiang
>             Fix For: 2.2.1
>
>         Attachments: Windows_FileShare.JPG
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-5372) Linux cann't grap file lock from windows but windows can grap share file lock from linux

Posted by "viola.lu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-5372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885154#action_12885154 ] 

viola.lu commented on GERONIMO-5372:
------------------------------------

pls review it, thanks.

> Linux cann't grap file lock from windows but windows can grap share file lock from linux 
> -----------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5372
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5372
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: ActiveMQ
>    Affects Versions: 2.2.1
>         Environment: OS: suse 10 sp2, windows 2003, redhat 5.3
> JDK: 1.6.10
>            Reporter: viola.lu
>            Assignee: Shawn Jiang
>             Fix For: 2.2.1
>
>         Attachments: G5372.patch, Windows_FileShare.JPG
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (GERONIMO-5372) Linux cann't grap file lock from windows but windows can grap share file lock from linux

Posted by "Ivan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-5372?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12879682#action_12879682 ] 

Ivan commented on GERONIMO-5372:
--------------------------------

---> INFO | Using Persistence Adapter: org.apache.activemq.store.kahadb.KahaDBPersis
>From the output of activemq 5.3.2 standalone server, I think it uses KahaDBPersistentAdapter, while in Geronimo, by default, it uses AMQPersistenceAdapter.

> Linux cann't grap file lock from windows but windows can grap share file lock from linux 
> -----------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5372
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5372
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: ActiveMQ
>    Affects Versions: 2.2.1
>         Environment: OS: suse 10 sp2, windows 2003, redhat 5.3
> JDK: 1.6.10
>            Reporter: viola.lu
>            Assignee: Shawn Jiang
>             Fix For: 2.2.1
>
>         Attachments: Windows_FileShare.JPG
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (GERONIMO-5372) Linux cann't grap file lock from windows but windows can grap share file lock from linux

Posted by "viola.lu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

viola.lu closed GERONIMO-5372.
------------------------------


Verified on latest build 2010.07.06-05:11:28.307-0400. So close it.
Create another jira https://issues.apache.org/jira/browse/GERONIMO-5426 to trace amqpersistentadapter issue.

> Linux cann't grap file lock from windows but windows can grap share file lock from linux 
> -----------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5372
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5372
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: ActiveMQ
>    Affects Versions: 2.2.1
>         Environment: OS: suse 10 sp2, windows 2003, redhat 5.3
> JDK: 1.6.10
>            Reporter: viola.lu
>            Assignee: Shawn Jiang
>             Fix For: 2.2.1
>
>         Attachments: G5372.patch, Windows_FileShare.JPG
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (GERONIMO-5372) Linux cann't grap file lock from windows but windows can grap share file lock from linux

Posted by "Shawn Jiang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shawn Jiang resolved GERONIMO-5372.
-----------------------------------

    Resolution: Fixed

The patch was just committed, thanks Viola for the patch !


Will you file a JIRA on  persistentAdapter issue against ActiveMQ ?

> Linux cann't grap file lock from windows but windows can grap share file lock from linux 
> -----------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5372
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5372
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: ActiveMQ
>    Affects Versions: 2.2.1
>         Environment: OS: suse 10 sp2, windows 2003, redhat 5.3
> JDK: 1.6.10
>            Reporter: viola.lu
>            Assignee: Shawn Jiang
>             Fix For: 2.2.1
>
>         Attachments: G5372.patch, Windows_FileShare.JPG
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (GERONIMO-5372) Linux cann't grap file lock from windows but windows can grap share file lock from linux

Posted by "viola.lu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/GERONIMO-5372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

viola.lu updated GERONIMO-5372:
-------------------------------

    Attachment: G5372.patch

Make kadadb as default persistent adapter

> Linux cann't grap file lock from windows but windows can grap share file lock from linux 
> -----------------------------------------------------------------------------------------
>
>                 Key: GERONIMO-5372
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-5372
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: ActiveMQ
>    Affects Versions: 2.2.1
>         Environment: OS: suse 10 sp2, windows 2003, redhat 5.3
> JDK: 1.6.10
>            Reporter: viola.lu
>            Assignee: Shawn Jiang
>             Fix For: 2.2.1
>
>         Attachments: G5372.patch, Windows_FileShare.JPG
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.