You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Dariusz Szablinski (JIRA)" <ji...@apache.org> on 2011/04/06 17:03:05 UTC

[jira] [Created] (AMQ-3273) Slave broker acquires lock file when Master is still alive (shared file system master/slave setup)

Slave broker acquires lock file when Master is still alive (shared file system master/slave setup)
--------------------------------------------------------------------------------------------------

                 Key: AMQ-3273
                 URL: https://issues.apache.org/jira/browse/AMQ-3273
             Project: ActiveMQ
          Issue Type: Bug
          Components: Message Store
    Affects Versions: 5.5.0
         Environment: Windows 7, Windows Server 2008 
            Reporter: Dariusz Szablinski
            Priority: Critical
             Fix For: 5.6.0, 5.5.0


The change introduced in AMQ-3237 has triggered issue with LockFile.lock() on Win7 and Win2k8. See comments to the JRE issue http://bugs.sun.com/view_bug.do?bug_id=6628575 (bottom of the page).  

Suggested solution is to use this construction instead:
fc.lock( 0, Math.max( 1, fc.size() ), false );


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Re: [jira] [Created] (AMQ-3273) Slave broker acquires lock file when Master is still alive (shared file system master/slave setup)

Posted by jaker <ja...@yahoo.com>.
Hi - 

Please walk me through compiling activeMQ-CPP package.  I downloaded the
following packages and unpacked them into different sub-directories 

main_idr: 
   activeMQ-cpp.3.2.5 
   apr-1.4.2 
   apr-util.1.3.10 
   cppunit.1.12.1 
   libtool-2.4 
   openssl-1.0.0d 

when i "configure" my activeMQ-cpp.3.2.5 package:      ./configure
--with-apr=/usr/local/share/apr 
it doesn't see the apr package. 

configure.ac 
    AC_PREREQ(2.61) <--- it complains about this, but I have 2.68 installed

when I commented AC_PREREQ(2.61) out  and do the following:

./autogen.sh
aclocal
./configure --with-apr=/usr/local/apr

it says "configure: error: invalid apr version found..."

but I installed apr-1.4.2 which is located here [--with-apr=/usr/local/apr]

Please help! 


--
View this message in context: http://activemq.2283324.n4.nabble.com/jira-Created-AMQ-3273-Slave-broker-acquires-lock-file-when-Master-is-still-alive-shared-file-system--tp3430971p3434676.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

[jira] [Resolved] (AMQ-3273) Slave broker acquires lock file when Master is still alive (shared file system master/slave setup)

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

Dejan Bosanac resolved AMQ-3273.
--------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 5.5.0)

Patch applied with svn revision 1089772. Thanks!

> Slave broker acquires lock file when Master is still alive (shared file system master/slave setup)
> --------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-3273
>                 URL: https://issues.apache.org/jira/browse/AMQ-3273
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>    Affects Versions: 5.5.0
>         Environment: Windows 7, Windows Server 2008 
>            Reporter: Dariusz Szablinski
>            Assignee: Dejan Bosanac
>            Priority: Critical
>             Fix For: 5.6.0
>
>         Attachments: LockFile.java.patch
>
>
> The change introduced in AMQ-3237 has triggered issue with LockFile.lock() on Win7 and Win2k8. See comments to the JRE issue http://bugs.sun.com/view_bug.do?bug_id=6628575 (bottom of the page).  
> Suggested solution is to use this construction instead:
> fc.lock( 0, Math.max( 1, fc.size() ), false );

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (AMQ-3273) Slave broker acquires lock file when Master is still alive (shared file system master/slave setup)

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

Dejan Bosanac reassigned AMQ-3273:
----------------------------------

    Assignee: Dejan Bosanac

> Slave broker acquires lock file when Master is still alive (shared file system master/slave setup)
> --------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-3273
>                 URL: https://issues.apache.org/jira/browse/AMQ-3273
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>    Affects Versions: 5.5.0
>         Environment: Windows 7, Windows Server 2008 
>            Reporter: Dariusz Szablinski
>            Assignee: Dejan Bosanac
>            Priority: Critical
>             Fix For: 5.5.0, 5.6.0
>
>         Attachments: LockFile.java.patch
>
>
> The change introduced in AMQ-3237 has triggered issue with LockFile.lock() on Win7 and Win2k8. See comments to the JRE issue http://bugs.sun.com/view_bug.do?bug_id=6628575 (bottom of the page).  
> Suggested solution is to use this construction instead:
> fc.lock( 0, Math.max( 1, fc.size() ), false );

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3273) Slave broker acquires lock file when Master is still alive (shared file system master/slave setup)

Posted by "Ben O'Day (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13056644#comment-13056644 ] 

Ben O'Day commented on AMQ-3273:
--------------------------------

someone should add a warning to this page (http://activemq.apache.org/shared-file-system-master-slave.html) to let people know this is an issue in version 5.5.0 (since its the latest release)...

also, when will 5.6 be released?


> Slave broker acquires lock file when Master is still alive (shared file system master/slave setup)
> --------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-3273
>                 URL: https://issues.apache.org/jira/browse/AMQ-3273
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>    Affects Versions: 5.5.0
>         Environment: Windows 7, Windows Server 2008 
>            Reporter: Dariusz Szablinski
>            Assignee: Dejan Bosanac
>            Priority: Critical
>             Fix For: 5.6.0
>
>         Attachments: LockFile.java.patch
>
>
> The change introduced in AMQ-3237 has triggered issue with LockFile.lock() on Win7 and Win2k8. See comments to the JRE issue http://bugs.sun.com/view_bug.do?bug_id=6628575 (bottom of the page).  
> Suggested solution is to use this construction instead:
> fc.lock( 0, Math.max( 1, fc.size() ), false );

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (AMQ-3273) Slave broker acquires lock file when Master is still alive (shared file system master/slave setup)

Posted by "Dariusz Szablinski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13016400#comment-13016400 ] 

Dariusz Szablinski commented on AMQ-3273:
-----------------------------------------

Index: kahadb/src/main/java/org/apache/kahadb/util/LockFile.java
===================================================================
--- kahadb/src/main/java/org/apache/kahadb/util/LockFile.java	(revision 1089459)
+++ kahadb/src/main/java/org/apache/kahadb/util/LockFile.java	(working copy)
@@ -63,7 +63,7 @@
             readFile = new RandomAccessFile(file, "rw");
             IOException reason = null;
             try {
-                lock = readFile.getChannel().tryLock(0, readFile.getChannel().size(), false);
+                lock = readFile.getChannel().tryLock(0, Math.max(1, readFile.getChannel().size()), false);
             } catch (OverlappingFileLockException e) {
                 reason = IOExceptionSupport.create("File '" + file + "' could not be locked.",e);
             } catch (IOException ioe) {


> Slave broker acquires lock file when Master is still alive (shared file system master/slave setup)
> --------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-3273
>                 URL: https://issues.apache.org/jira/browse/AMQ-3273
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>    Affects Versions: 5.5.0
>         Environment: Windows 7, Windows Server 2008 
>            Reporter: Dariusz Szablinski
>            Priority: Critical
>             Fix For: 5.5.0, 5.6.0
>
>         Attachments: LockFile.java.patch
>
>
> The change introduced in AMQ-3237 has triggered issue with LockFile.lock() on Win7 and Win2k8. See comments to the JRE issue http://bugs.sun.com/view_bug.do?bug_id=6628575 (bottom of the page).  
> Suggested solution is to use this construction instead:
> fc.lock( 0, Math.max( 1, fc.size() ), false );

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (AMQ-3273) Slave broker acquires lock file when Master is still alive (shared file system master/slave setup)

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

Dariusz Szablinski updated AMQ-3273:
------------------------------------

    Comment: was deleted

(was: Index: kahadb/src/main/java/org/apache/kahadb/util/LockFile.java
===================================================================
--- kahadb/src/main/java/org/apache/kahadb/util/LockFile.java	(revision 1089459)
+++ kahadb/src/main/java/org/apache/kahadb/util/LockFile.java	(working copy)
@@ -63,7 +63,7 @@
             readFile = new RandomAccessFile(file, "rw");
             IOException reason = null;
             try {
-                lock = readFile.getChannel().tryLock(0, readFile.getChannel().size(), false);
+                lock = readFile.getChannel().tryLock(0, Math.max(1, readFile.getChannel().size()), false);
             } catch (OverlappingFileLockException e) {
                 reason = IOExceptionSupport.create("File '" + file + "' could not be locked.",e);
             } catch (IOException ioe) {
)

> Slave broker acquires lock file when Master is still alive (shared file system master/slave setup)
> --------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-3273
>                 URL: https://issues.apache.org/jira/browse/AMQ-3273
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>    Affects Versions: 5.5.0
>         Environment: Windows 7, Windows Server 2008 
>            Reporter: Dariusz Szablinski
>            Priority: Critical
>             Fix For: 5.5.0, 5.6.0
>
>         Attachments: LockFile.java.patch
>
>
> The change introduced in AMQ-3237 has triggered issue with LockFile.lock() on Win7 and Win2k8. See comments to the JRE issue http://bugs.sun.com/view_bug.do?bug_id=6628575 (bottom of the page).  
> Suggested solution is to use this construction instead:
> fc.lock( 0, Math.max( 1, fc.size() ), false );

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (AMQ-3273) Slave broker acquires lock file when Master is still alive (shared file system master/slave setup)

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

Dariusz Szablinski updated AMQ-3273:
------------------------------------

    Attachment: LockFile.java.patch

> Slave broker acquires lock file when Master is still alive (shared file system master/slave setup)
> --------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-3273
>                 URL: https://issues.apache.org/jira/browse/AMQ-3273
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>    Affects Versions: 5.5.0
>         Environment: Windows 7, Windows Server 2008 
>            Reporter: Dariusz Szablinski
>            Priority: Critical
>             Fix For: 5.5.0, 5.6.0
>
>         Attachments: LockFile.java.patch
>
>
> The change introduced in AMQ-3237 has triggered issue with LockFile.lock() on Win7 and Win2k8. See comments to the JRE issue http://bugs.sun.com/view_bug.do?bug_id=6628575 (bottom of the page).  
> Suggested solution is to use this construction instead:
> fc.lock( 0, Math.max( 1, fc.size() ), false );

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (AMQ-3273) Slave broker acquires lock file when Master is still alive (shared file system master/slave setup)

Posted by "PK Tan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13080766#comment-13080766 ] 

PK Tan commented on AMQ-3273:
-----------------------------

I encountered a similar problem but the problem happens upon startup. I would like to know if it is due to the same problem cause. I have logged an issue [AMQ-3432] Slave broker able to start together with Master broker (shared file system master/slave setup). Can anyone familiar with this issue enlighten me on whether the two issues (this issue and AMQ-3432) are the same?

Thank you very much.

> Slave broker acquires lock file when Master is still alive (shared file system master/slave setup)
> --------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-3273
>                 URL: https://issues.apache.org/jira/browse/AMQ-3273
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Message Store
>    Affects Versions: 5.5.0
>         Environment: Windows 7, Windows Server 2008 
>            Reporter: Dariusz Szablinski
>            Assignee: Dejan Bosanac
>            Priority: Critical
>             Fix For: 5.6.0
>
>         Attachments: LockFile.java.patch
>
>
> The change introduced in AMQ-3237 has triggered issue with LockFile.lock() on Win7 and Win2k8. See comments to the JRE issue http://bugs.sun.com/view_bug.do?bug_id=6628575 (bottom of the page).  
> Suggested solution is to use this construction instead:
> fc.lock( 0, Math.max( 1, fc.size() ), false );

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira