You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Russell E Glaue (JIRA)" <ji...@apache.org> on 2011/06/01 16:50:47 UTC
[jira] [Created] (GERONIMO-5987) The lock file in ActiveMQ is not
referenced correctly
The lock file in ActiveMQ is not referenced correctly
-----------------------------------------------------
Key: GERONIMO-5987
URL: https://issues.apache.org/jira/browse/GERONIMO-5987
Project: Geronimo
Issue Type: Bug
Security Level: public (Regular issues)
Components: ActiveMQ
Affects Versions: 3.0
Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
Reporter: Russell E Glaue
I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" , and does not cooperate with multi-server configurations. This is the use of the "org.apache.geronimo.server.name" option. (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
Steps to repeat:
1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
2. Create the server instances:
-- 2A. cd ${GERONIMO_HOME}
-- 2B-1. mkdir gserver1
-- 2B-2. cp -rp var gserver1/
-- 2B-3. cp -rp etc gserver1/
-- 2B-4. cp -rp repository gserver1/
-- 2C-1. mkdir gserver1
-- 2C-2. cp -rp var gserver1/
-- 2C-3. cp -rp etc gserver1/
-- 2C-4. cp -rp repository gserver1/
-- (the "deploy:new-server-instance" only does step 1 and 2, create base
directory and var/ directory, you still have to manually copy/create etc and
repository)
3. update the "PortOffset" parameter in var/config/config-substitutions.properties in each instance
4. Start the server instances:
-- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=server1 bin/startup
-- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=server2 bin/startup
5. `tail -f server2/var/logs/geronimo.log` and you will see this as the last line that outputs:
"2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
The server waits here indefinitely.
6. Shutdown the "server1" instance and you will see the "server2" instance continue on in the startup procedures.
* When I first start the "server1" instance, the directory "$org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
* Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (GERONIMO-5987) The ActiveMQ working
directory and port are not referenced correctly - multiple instances not
possible
Posted by "Russell E Glaue (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13113509#comment-13113509 ]
Russell E Glaue edited comment on GERONIMO-5987 at 9/23/11 5:53 PM:
--------------------------------------------------------------------
I just tested geronimo-tomcat7-javaee6-3.0-20110923.091022-350-bin
PortOffset is now working with ActiveMQ, and I am able to startup multiple instances of the javaee6 bundle within the same runtime OS - IFF I follow a certain startup procedure. Yes, there is one more issue - regarding the ActiveMQ lock file.
I have created an example for running multiple instances within the Geronimo Wiki, here: https://cwiki.apache.org/confluence/display/GMOxDOC30/Running+multiple+Geronimo+instances
Now, if you follow this example, you can follow me in the issue I am able to reproduce with a conflict of the ActiveMQ lock file.
Follow the example in the wiki to setup two separate instance. In both start scripts, uncomment the interactive startup (bin/geronimo run), and comment out the "Normal startup" (bin/startup).
Now the steps to reproduce an issue where two Geronimo instances conflict over the same ActiveMQ lock file:
1. system$ cd /opt/geronimo3
2. system$ gserv1/start.sh
3. system$ gserv2/start.sh
In these three steps, gserv1 will startup successfully (ActiveMQ binds to port 61716), but ActiveMQ uses the lockfile "/opt/geronimo3/var/activemq/lock".
When you start gserv2, its ActiveMQ wants to use the lockfile "/opt/geronimo3/var/activemq/lock" too. As a result, gserv2 never starts up because it enters an infinite loop waiting for the ActiveMQ lock file to be available.
Now the successful steps to a current workaround to the above issue
1. system$ cd /opt/geronimo3
2. system$ cd gserv1
3. system$ ./start.sh
4. system$ cd ../gserv2
5. system$ ./start.sh
In these three steps, gserv1 will startup successfully (ActiveMQ binds to port 61716), AND (unlike the above issue) ActiveMQ uses the lockfile "/opt/geronimo3/gserv1/var/activemq/lock".
Similarly, gserv2 starts up successfully (ActiveMQ binds to port 61816), AND (unlike the above issue) ActiveMQ uses the lockfile "/opt/geronimo3/gserv2/var/activemq/lock".
So it appears that ActiveMQ uses the lock file of {cwd}/var/activemq/lock , but instead ActiveMQ should be using the lock file of {org.apache.geronimo.home.dir}/{org.apache.geronimo.server.name}/var/activemq/lock (a.k.a {org.apache.geronimo.server.dir}/var/activemq/lock).
The workaround works because ActiveMQ (surprisingly) does not use the lock file of ${GERONIMO_HOME}/var/activemq/lock which was what I was expecting to be the root of the problem when I first encountered this issue.
And just for fun (to verify this is what is really happening) I tried this:
(GERONIMO_HOME := /opt/geronimo3/ and the instance is /opt/geronimo3/gserv1)
{noformat:borderStyle=solid}
1. system$ ls -d /opt/var
ls: /opt/var: No such file or directory
2. system$ cd /opt
3. system$ geronimo3/gserv1/start.sh
4. system$ ls -d /opt/var
/opt/var
5. system$ tree /opt/var
/opt/var
`-- activemq
|-- journal
| |-- data-1
| `-- data-control
|-- kr-store
| |-- data
| | |-- index-container-roots
| | `-- lock
| `-- state
| |-- data-kaha-1
| |-- data-store-state-1
| |-- hash-index-store-state_state
| |-- index-kaha
| |-- index-store-state
| |-- index-transactions-state
| `-- lock
`-- lock
{noformat}
was (Author: rglaue):
I just tested geronimo-tomcat7-javaee6-3.0-20110923.091022-350-bin
PortOffset is now working with ActiveMQ, and I am able to startup multiple instances of the javaee6 bundle within the same runtime OS - IFF I follow a certain startup procedure. Yes, there is one more issue - regarding the ActiveMQ lock file.
I have created an example for running multiple instances within the Geronimo Wiki, here: https://cwiki.apache.org/confluence/display/GMOxDOC30/Running+multiple+Geronimo+instances
Now, if you follow this example, you can follow me in the issue I am able to reproduce with a conflict of the ActiveMQ lock file.
Follow the example in the wiki to setup two separate instance. In both start scripts, uncomment the interactive startup (bin/geronimo run), and comment out the "Normal startup (bin/startup).
Now the steps to reproduce an issue where two Geronimo instances conflict over the same ActiveMQ lock file:
1. system$ cd /opt/geronimo3
2. system$ gserv1/start.sh
3. system$ gserv2/start.sh
In these three steps, gserv1 will startup successfully (ActiveMQ binds to port 61716), but ActiveMQ uses the lockfile "/opt/geronimo3/var/activemq/lock".
When you start gserv2, its ActiveMQ wants to use the lockfile "/opt/geronimo3/var/activemq/lock" too. As a result, gserv2 never startsup because it enters an infinite loop waiting for the ActiveMQ lock file to be available.
Now the successful steps to a current workaround to the above issue
1. system$ cd /opt/geronimo3
2. system$ cd gserv1
3. system$ ./start.sh
4. system$ cd gserv2
5. system$ ./start.sh
In these three steps, gserv1 will startup successfully (ActiveMQ binds to port 61716), AND (unlike the above issue) ActiveMQ uses the lockfile "/opt/geronimo3/gserv1/var/activemq/lock".
Similarly, gserv2 starts up successfully (ActiveMQ binds to port 61816), AND (unlike the above issue) ActiveMQ uses the lockfile "/opt/geronimo3/gserv2/var/activemq/lock".
So it appears that ActiveMQ uses the lock file of {cwd}/var/activemq/lock , but instead ActiveMQ should be using the lock file of {org.apache.geronimo.server.dir}/{org.apache.geronimo.server.name}/var/activemq/lock .
The workaround works because ActiveMQ (surprisingly) does not use the lock file of GERONIMO_HOME/var/activemq/lock which was what I was expecting to be the root of the problem when I first encountered this issue.
And just for fun (to verify this is what is really happening) I tried this:
(GERONIMO_HOME := /opt/geronimo3/ and the instance is /opt/geronimo3/gserv1)
{noformat:borderStyle=solid}
1. system$ ls -d /opt/var
ls: /opt/var: No such file or directory
2. system$ cd /opt
3. system$ geronimo3/gserv1/start.sh
4. system$ ls -d /opt/var
/opt/var
4. system$ tree /opt/var
/opt/var
`-- activemq
|-- journal
| |-- data-1
| `-- data-control
|-- kr-store
| |-- data
| | |-- index-container-roots
| | `-- lock
| `-- state
| |-- data-kaha-1
| |-- data-store-state-1
| |-- hash-index-store-state_state
| |-- index-kaha
| |-- index-store-state
| |-- index-transactions-state
| `-- lock
`-- lock
{noformat}
> The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible
> ------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Assignee: Rex Wang
> Labels: geronimo
> Attachments: GERONIMO-5987-detail.patch, GERONIMO-5987-new.patch, GERONIMO-5987.patch
>
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> First, Problem with working directory
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Second, Problem with PortOffset
> When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
> Steps to repeat working directory problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
> 4. Start the default instance and gserver1 instance:
> -- bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> 5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
> * If I first start the "gserver1" instance by itself (before starting the default instance), the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
> Steps to repeat PortOffset problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
> 4. Start the server instance:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
> -
> 2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
> javax.resource.ResourceException: Could not create connection.
> at
> org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
> ...
> Caused by: java.net.ConnectException: Connection refused
> ...
> -
> This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
> -
> 2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
> XAResource for recovery for mcf:
> geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
> 2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
> javax.resource.ResourceException: Could not create connection.
> ...
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
> ...
> -
> In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GERONIMO-5987) The ActiveMQ working directory
and port are not referenced correctly - multiple instances not possible
Posted by "Rex Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13084942#comment-13084942 ]
Rex Wang commented on GERONIMO-5987:
------------------------------------
Thanks Kevan, I think we'd better open a separate jira, so I filed it in GERONIMO-6110.
> The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible
> ------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0-M2, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Assignee: Rex Wang
> Labels: geronimo
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> First, Problem with working directory
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Second, Problem with PortOffset
> When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
> Steps to repeat working directory problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
> 4. Start the default instance and gserver1 instance:
> -- bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> 5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
> * If I first start the "gserver1" instance by itself (before starting the default instance), the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
> Steps to repeat PortOffset problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
> 4. Start the server instance:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
> -
> 2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
> javax.resource.ResourceException: Could not create connection.
> at
> org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
> ...
> Caused by: java.net.ConnectException: Connection refused
> ...
> -
> This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
> -
> 2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
> XAResource for recovery for mcf:
> geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
> 2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
> javax.resource.ResourceException: Could not create connection.
> ...
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
> ...
> -
> In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (GERONIMO-5987) The ActiveMQ working directory
and port are not referenced correctly - multiple instances not possible
Posted by "Rex Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rex Wang reassigned GERONIMO-5987:
----------------------------------
Assignee: Rex Wang (was: Shenghao Fang)
> The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible
> ------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0-M2, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Assignee: Rex Wang
> Labels: geronimo
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> First, Problem with working directory
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Second, Problem with PortOffset
> When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
> Steps to repeat working directory problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
> 4. Start the default instance and gserver1 instance:
> -- bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> 5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
> * If I first start the "gserver1" instance by itself (before starting the default instance), the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
> Steps to repeat PortOffset problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
> 4. Start the server instance:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
> -
> 2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
> javax.resource.ResourceException: Could not create connection.
> at
> org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
> ...
> Caused by: java.net.ConnectException: Connection refused
> ...
> -
> This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
> -
> 2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
> XAResource for recovery for mcf:
> geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
> 2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
> javax.resource.ResourceException: Could not create connection.
> ...
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
> ...
> -
> In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GERONIMO-5987) The ActiveMQ working directory
and port are not referenced correctly - multiple instances not possible
Posted by "Russell E Glaue (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043447#comment-13043447 ]
Russell E Glaue commented on GERONIMO-5987:
-------------------------------------------
After executing `bin/geronimo run`, when Geronimo 3.0-SNAPSHOT completes its startup procedures it lists the ports it listens on (i.e. "Listening on Ports:"). However ActiveMQ is not in that list.
> The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible
> ------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0-M2, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Labels: geronimo
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> First, Problem with working directory
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Second, Problem with PortOffset
> When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
> Steps to repeat working directory problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
> 4. Start the default instance and gserver1 instance:
> -- bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> 5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
> * If I first start the "gserver1" instance by itself (before starting the default instance), the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
> Steps to repeat PortOffset problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
> 4. Start the server instance:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
> -
> 2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
> javax.resource.ResourceException: Could not create connection.
> at
> org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
> ...
> Caused by: java.net.ConnectException: Connection refused
> ...
> -
> This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
> -
> 2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
> XAResource for recovery for mcf:
> geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
> 2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
> javax.resource.ResourceException: Could not create connection.
> ...
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
> ...
> -
> In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GERONIMO-5987) The ActiveMQ working directory
and port are not referenced correctly - multiple instances not possible
Posted by "Shawn Jiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13059673#comment-13059673 ]
Shawn Jiang commented on GERONIMO-5987:
---------------------------------------
Adding the discussion record on this jira between Russell and David.Jencks here.
http://apache-geronimo.328035.n3.nabble.com/ActiveMQ-config-substitution-change-G2-2-vs-G3-0-td3020443.html
> The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible
> ------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0-M2, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Assignee: Shenghao Fang
> Labels: geronimo
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> First, Problem with working directory
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Second, Problem with PortOffset
> When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
> Steps to repeat working directory problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
> 4. Start the default instance and gserver1 instance:
> -- bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> 5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
> * If I first start the "gserver1" instance by itself (before starting the default instance), the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
> Steps to repeat PortOffset problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
> 4. Start the server instance:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
> -
> 2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
> javax.resource.ResourceException: Could not create connection.
> at
> org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
> ...
> Caused by: java.net.ConnectException: Connection refused
> ...
> -
> This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
> -
> 2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
> XAResource for recovery for mcf:
> geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
> 2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
> javax.resource.ResourceException: Could not create connection.
> ...
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
> ...
> -
> In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (GERONIMO-5987) The ActiveMQ working directory is
not referenced correctly
Posted by "Russell E Glaue (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Russell E Glaue updated GERONIMO-5987:
--------------------------------------
Description:
I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" , and does not cooperate with multi-server configurations. This is the use of the "org.apache.geronimo.server.name" option. (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
Steps to repeat:
1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
2. Create the server instances:
-- 2A. cd ${GERONIMO_HOME}
-- 2B-1. mkdir gserver1
-- 2B-2. cp -rp var gserver1/
-- 2B-3. cp -rp etc gserver1/
-- 2B-4. cp -rp repository gserver1/
-- 2C-1. mkdir gserver2
-- 2C-2. cp -rp var gserver2/
-- 2C-3. cp -rp etc gserver2/
-- 2C-4. cp -rp repository gserver2/
-- (the "deploy:new-server-instance" only does step 1 and 2, create base
directory and var/ directory, you still have to manually copy/create etc and
repository)
3. update the "PortOffset" parameter in var/config/config-substitutions.properties in each instance
4. Start the server instances:
-- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
-- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver2 bin/startup
5. `tail -f gserver2/var/logs/geronimo.log` and you will see this as the last line that outputs:
"2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
The server waits here indefinitely.
6. Shutdown the "gserver1" instance and you will see the "gserver2" instance continue on in the startup procedures.
* When I first start the "gserver1" instance, the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
* Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
was:
I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" , and does not cooperate with multi-server configurations. This is the use of the "org.apache.geronimo.server.name" option. (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
Steps to repeat:
1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
2. Create the server instances:
-- 2A. cd ${GERONIMO_HOME}
-- 2B-1. mkdir gserver1
-- 2B-2. cp -rp var gserver1/
-- 2B-3. cp -rp etc gserver1/
-- 2B-4. cp -rp repository gserver1/
-- 2C-1. mkdir gserver1
-- 2C-2. cp -rp var gserver1/
-- 2C-3. cp -rp etc gserver1/
-- 2C-4. cp -rp repository gserver1/
-- (the "deploy:new-server-instance" only does step 1 and 2, create base
directory and var/ directory, you still have to manually copy/create etc and
repository)
3. update the "PortOffset" parameter in var/config/config-substitutions.properties in each instance
4. Start the server instances:
-- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=server1 bin/startup
-- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=server2 bin/startup
5. `tail -f server2/var/logs/geronimo.log` and you will see this as the last line that outputs:
"2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
The server waits here indefinitely.
6. Shutdown the "server1" instance and you will see the "server2" instance continue on in the startup procedures.
* When I first start the "server1" instance, the directory "$org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
* Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
Summary: The ActiveMQ working directory is not referenced correctly (was: The lock file in ActiveMQ is not referenced correctly)
> The ActiveMQ working directory is not referenced correctly
> ----------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0-M2, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Labels: geronimo
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" , and does not cooperate with multi-server configurations. This is the use of the "org.apache.geronimo.server.name" option. (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Steps to repeat:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> -- 2C-1. mkdir gserver2
> -- 2C-2. cp -rp var gserver2/
> -- 2C-3. cp -rp etc gserver2/
> -- 2C-4. cp -rp repository gserver2/
> -- (the "deploy:new-server-instance" only does step 1 and 2, create base
> directory and var/ directory, you still have to manually copy/create etc and
> repository)
> 3. update the "PortOffset" parameter in var/config/config-substitutions.properties in each instance
> 4. Start the server instances:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver2 bin/startup
> 5. `tail -f gserver2/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the "gserver1" instance and you will see the "gserver2" instance continue on in the startup procedures.
> * When I first start the "gserver1" instance, the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (GERONIMO-5987) The lock file in ActiveMQ is not
referenced correctly
Posted by "Russell E Glaue (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Russell E Glaue updated GERONIMO-5987:
--------------------------------------
Affects Version/s: 3.0-M2
3.0-M1
> The lock file in ActiveMQ is not referenced correctly
> -----------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0-M2, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Labels: geronimo
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" , and does not cooperate with multi-server configurations. This is the use of the "org.apache.geronimo.server.name" option. (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Steps to repeat:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> -- 2C-1. mkdir gserver1
> -- 2C-2. cp -rp var gserver1/
> -- 2C-3. cp -rp etc gserver1/
> -- 2C-4. cp -rp repository gserver1/
> -- (the "deploy:new-server-instance" only does step 1 and 2, create base
> directory and var/ directory, you still have to manually copy/create etc and
> repository)
> 3. update the "PortOffset" parameter in var/config/config-substitutions.properties in each instance
> 4. Start the server instances:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=server1 bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=server2 bin/startup
> 5. `tail -f server2/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the "server1" instance and you will see the "server2" instance continue on in the startup procedures.
> * When I first start the "server1" instance, the directory "$org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (GERONIMO-5987) The ActiveMQ working directory
and port are not referenced correctly - multiple instances not possible
Posted by "Shenghao Fang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shenghao Fang reassigned GERONIMO-5987:
---------------------------------------
Assignee: Shenghao Fang
> The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible
> ------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0-M2, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Assignee: Shenghao Fang
> Labels: geronimo
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> First, Problem with working directory
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Second, Problem with PortOffset
> When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
> Steps to repeat working directory problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
> 4. Start the default instance and gserver1 instance:
> -- bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> 5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
> * If I first start the "gserver1" instance by itself (before starting the default instance), the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
> Steps to repeat PortOffset problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
> 4. Start the server instance:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
> -
> 2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
> javax.resource.ResourceException: Could not create connection.
> at
> org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
> ...
> Caused by: java.net.ConnectException: Connection refused
> ...
> -
> This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
> -
> 2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
> XAResource for recovery for mcf:
> geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
> 2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
> javax.resource.ResourceException: Could not create connection.
> ...
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
> ...
> -
> In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (GERONIMO-5987) The ActiveMQ working directory and
port are not referenced correctly - multiple instances not possible
Posted by "Russell E Glaue (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Russell E Glaue updated GERONIMO-5987:
--------------------------------------
Description:
I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
First, Problem with working directory
When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
Second, Problem with PortOffset
When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
Steps to repeat working directory problem:
1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
2. Create the server instances:
-- 2A. cd ${GERONIMO_HOME}
-- 2B-1. mkdir gserver1
-- 2B-2. cp -rp var gserver1/
-- 2B-3. cp -rp etc gserver1/
-- 2B-4. cp -rp repository gserver1/
3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
4. Start the default instance and gserver1 instance:
-- bin/startup
-- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver2 bin/startup
5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
"2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
The server waits here indefinitely.
6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
* When I first start the "gserver1" instance, the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
* Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
Steps to repeat PortOffset problem:
1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
2. Create the server instances:
-- 2A. cd ${GERONIMO_HOME}
-- 2B-1. mkdir gserver1
-- 2B-2. cp -rp var gserver1/
-- 2B-3. cp -rp etc gserver1/
-- 2B-4. cp -rp repository gserver1/
3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
4. Start the server instance:
-- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
-
2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
ManagedConnection for handle: nullManagedConnectionInfo:
org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
javax.resource.ResourceException: Could not create connection.
at
org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
...
Caused by: java.net.ConnectException: Connection refused
...
-
This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
-
2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
XAResource for recovery for mcf:
geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
ManagedConnection for handle: nullManagedConnectionInfo:
org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
javax.resource.ResourceException: Could not create connection.
...
Caused by: javax.jms.JMSException: Could not connect to broker URL:
tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
...
-
In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
was:
I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" , and does not cooperate with multi-server configurations. This is the use of the "org.apache.geronimo.server.name" option. (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
Steps to repeat:
1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
2. Create the server instances:
-- 2A. cd ${GERONIMO_HOME}
-- 2B-1. mkdir gserver1
-- 2B-2. cp -rp var gserver1/
-- 2B-3. cp -rp etc gserver1/
-- 2B-4. cp -rp repository gserver1/
-- 2C-1. mkdir gserver2
-- 2C-2. cp -rp var gserver2/
-- 2C-3. cp -rp etc gserver2/
-- 2C-4. cp -rp repository gserver2/
-- (the "deploy:new-server-instance" only does step 1 and 2, create base
directory and var/ directory, you still have to manually copy/create etc and
repository)
3. update the "PortOffset" parameter in var/config/config-substitutions.properties in each instance
4. Start the server instances:
-- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
-- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver2 bin/startup
5. `tail -f gserver2/var/logs/geronimo.log` and you will see this as the last line that outputs:
"2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
The server waits here indefinitely.
6. Shutdown the "gserver1" instance and you will see the "gserver2" instance continue on in the startup procedures.
* When I first start the "gserver1" instance, the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
* Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
Summary: The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible (was: The ActiveMQ working directory is not referenced correctly)
> The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible
> ------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0-M2, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Labels: geronimo
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> First, Problem with working directory
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Second, Problem with PortOffset
> When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
> Steps to repeat working directory problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
> 4. Start the default instance and gserver1 instance:
> -- bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver2 bin/startup
> 5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
> * When I first start the "gserver1" instance, the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
> Steps to repeat PortOffset problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
> 4. Start the server instance:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
> -
> 2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
> javax.resource.ResourceException: Could not create connection.
> at
> org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
> ...
> Caused by: java.net.ConnectException: Connection refused
> ...
> -
> This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
> -
> 2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
> XAResource for recovery for mcf:
> geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
> 2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
> javax.resource.ResourceException: Could not create connection.
> ...
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
> ...
> -
> In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (GERONIMO-5987) The ActiveMQ working directory and
port are not referenced correctly - multiple instances not possible
Posted by "Rex Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rex Wang updated GERONIMO-5987:
-------------------------------
Attachment: GERONIMO-5987-detail.patch
> The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible
> ------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0-M2, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Assignee: Rex Wang
> Labels: geronimo
> Attachments: GERONIMO-5987-detail.patch, GERONIMO-5987.patch
>
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> First, Problem with working directory
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Second, Problem with PortOffset
> When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
> Steps to repeat working directory problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
> 4. Start the default instance and gserver1 instance:
> -- bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> 5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
> * If I first start the "gserver1" instance by itself (before starting the default instance), the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
> Steps to repeat PortOffset problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
> 4. Start the server instance:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
> -
> 2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
> javax.resource.ResourceException: Could not create connection.
> at
> org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
> ...
> Caused by: java.net.ConnectException: Connection refused
> ...
> -
> This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
> -
> 2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
> XAResource for recovery for mcf:
> geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
> 2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
> javax.resource.ResourceException: Could not create connection.
> ...
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
> ...
> -
> In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (GERONIMO-5987) The ActiveMQ working
directory and port are not referenced correctly - multiple instances not
possible
Posted by "Russell E Glaue (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13113509#comment-13113509 ]
Russell E Glaue edited comment on GERONIMO-5987 at 9/23/11 3:38 PM:
--------------------------------------------------------------------
I just tested geronimo-tomcat7-javaee6-3.0-20110923.091022-350-bin
PortOffset is now working with ActiveMQ, and I am able to startup multiple instances of the javaee6 bundle within the same runtime OS - IFF I follow a certain startup procedure. Yes, there is one more issue - regarding the ActiveMQ lock file.
I have created an example for running multiple instances within the Geronimo Wiki, here: https://cwiki.apache.org/confluence/display/GMOxDOC30/Running+multiple+Geronimo+instances
Now, if you follow this example, you can follow me in the issue I am able to reproduce with a conflict of the ActiveMQ lock file.
Follow the example in the wiki to setup two separate instance. In both start scripts, uncomment the interactive startup (bin/geronimo run), and comment out the "Normal startup (bin/startup).
Now the steps to reproduce an issue where two Geronimo instances conflict over the same ActiveMQ lock file:
1. system$ cd /opt/geronimo3
2. system$ gserv1/start.sh
3. system$ gserv2/start.sh
In these three steps, gserv1 will startup successfully (ActiveMQ binds to port 61716), but ActiveMQ uses the lockfile "/opt/geronimo3/var/activemq/lock".
When you start gserv2, its ActiveMQ wants to use the lockfile "/opt/geronimo3/var/activemq/lock" too. As a result, gserv2 never startsup because it enters an infinite loop waiting for the ActiveMQ lock file to be available.
Now the successful steps to a current workaround to the above issue
1. system$ cd /opt/geronimo3
2. system$ cd gserv1
3. system$ ./start.sh
4. system$ cd gserv2
5. system$ ./start.sh
In these three steps, gserv1 will startup successfully (ActiveMQ binds to port 61716), AND (unlike the above issue) ActiveMQ uses the lockfile "/opt/geronimo3/gserv1/var/activemq/lock".
Similarly, gserv2 starts up successfully (ActiveMQ binds to port 61816), AND (unlike the above issue) ActiveMQ uses the lockfile "/opt/geronimo3/gserv2/var/activemq/lock".
So it appears that ActiveMQ uses the lock file of {cwd}/var/activemq/lock , but instead ActiveMQ should be using the lock file of {org.apache.geronimo.server.dir}/{org.apache.geronimo.server.name}/var/activemq/lock .
The workaround works because ActiveMQ (surprisingly) does not use the lock file of GERONIMO_HOME/var/activemq/lock which was what I was expecting to be the root of the problem when I first encountered this issue.
And just for fun (to verify this is what is really happening) I tried this:
(GERONIMO_HOME := /opt/geronimo3/ and the instance is /opt/geronimo3/gserv1)
{noformat:borderStyle=solid}
1. system$ ls -d /opt/var
ls: /opt/var: No such file or directory
2. system$ cd /opt
3. system$ geronimo3/gserv1/start.sh
4. system$ ls -d /opt/var
/opt/var
4. system$ tree /opt/var
/opt/var
`-- activemq
|-- journal
| |-- data-1
| `-- data-control
|-- kr-store
| |-- data
| | |-- index-container-roots
| | `-- lock
| `-- state
| |-- data-kaha-1
| |-- data-store-state-1
| |-- hash-index-store-state_state
| |-- index-kaha
| |-- index-store-state
| |-- index-transactions-state
| `-- lock
`-- lock
{noformat}
was (Author: rglaue):
I just tested geronimo-tomcat7-javaee6-3.0-20110923.091022-350-bin
PortOffset is now working with ActiveMQ, and I am able to startup multiple instances of the javaee6 bundle within the same runtime OS - IFF I follow a certain startup procedure. Yes, there is one more issue - regarding the ActiveMQ lock file.
I have created an example for running multiple instances within the Geronimo Wiki, here: https://cwiki.apache.org/confluence/display/GMOxDOC30/Running+multiple+Geronimo+instances
Now, if you follow this example, you can follow me in the issue I am able to reproduce with a conflict of the ActiveMQ lock file.
Follow the example in the wiki to setup two separate instance. In both start scripts, uncomment the interactive startup (bin/geronimo run), and comment out the "Normal startup (bin/startup).
Now the steps to reproduce an issue where two Geronimo instances conflict over the same ActiveMQ lock file:
1. system$ cd /opt/geronimo3
2. system$ gserv1/start.sh
3. system$ gserv2/start.sh
In these three steps, gserv1 will startup successfully (ActiveMQ binds to port 61716), but ActiveMQ uses the lockfile "/opt/geronimo3/var/activemq/lock".
When you start gserv2, its ActiveMQ wants to use the lockfile "/opt/geronimo3/var/activemq/lock" too. As a result, gserv2 never startsup because it enters an infinite loop waiting for the ActiveMQ lock file to be available.
Now the successful steps to a current workaround to the above issue
1. system$ cd /opt/geronimo3
2. system$ cd gserv1
3. system$ ./start.sh
4. system$ cd gserv2
5. system$ ./start.sh
In these three steps, gserv1 will startup successfully (ActiveMQ binds to port 61716), AND (unlike the above issue) ActiveMQ uses the lockfile "/opt/geronimo3/gserv1/var/activemq/lock".
Similarly, gserv2 starts up successfully (ActiveMQ binds to port 61816), AND (unlike the above issue) ActiveMQ uses the lockfile "/opt/geronimo3/gserv2/var/activemq/lock".
So it appears that ActiveMQ uses the lock file of {cwd}/var/activemq/lock , but instead ActiveMQ should be using the lock file of {org.apache.geronimo.server.dir}/{org.apache.geronimo.server.name}/var/activemq/lock .
The workaround works because ActiveMQ (surprisingly) does not use the lock file of GERONIMO_HOME/var/activemq/lock which was what I was expecting to be the root of the problem when I first encountered this issue.
And just for fun (to verify this is what is really happening) I tried this:
(GERONIMO_HOME := /opt/geronimo3/ and the instance is /opt/geronimo3/gserv1)
1. system$ ls -d /opt/var
ls: /opt/var: No such file or directory
2. system$ cd /opt
3. system$ geronimo3/gserv1/start.sh
4. system$ ls -d /opt/var
/opt/var
4. system$ tree /opt/var
/opt/var
`-- activemq
|-- journal
| |-- data-1
| `-- data-control
|-- kr-store
| |-- data
| | |-- index-container-roots
| | `-- lock
| `-- state
| |-- data-kaha-1
| |-- data-store-state-1
| |-- hash-index-store-state_state
| |-- index-kaha
| |-- index-store-state
| |-- index-transactions-state
| `-- lock
`-- lock
> The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible
> ------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Assignee: Rex Wang
> Labels: geronimo
> Attachments: GERONIMO-5987-detail.patch, GERONIMO-5987-new.patch, GERONIMO-5987.patch
>
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> First, Problem with working directory
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Second, Problem with PortOffset
> When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
> Steps to repeat working directory problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
> 4. Start the default instance and gserver1 instance:
> -- bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> 5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
> * If I first start the "gserver1" instance by itself (before starting the default instance), the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
> Steps to repeat PortOffset problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
> 4. Start the server instance:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
> -
> 2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
> javax.resource.ResourceException: Could not create connection.
> at
> org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
> ...
> Caused by: java.net.ConnectException: Connection refused
> ...
> -
> This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
> -
> 2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
> XAResource for recovery for mcf:
> geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
> 2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
> javax.resource.ResourceException: Could not create connection.
> ...
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
> ...
> -
> In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (GERONIMO-5987) The ActiveMQ working directory and
port are not referenced correctly - multiple instances not possible
Posted by "Rex Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rex Wang updated GERONIMO-5987:
-------------------------------
Attachment: GERONIMO-5987-new.patch
> The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible
> ------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0-M2, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Assignee: Rex Wang
> Labels: geronimo
> Attachments: GERONIMO-5987-detail.patch, GERONIMO-5987-new.patch, GERONIMO-5987.patch
>
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> First, Problem with working directory
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Second, Problem with PortOffset
> When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
> Steps to repeat working directory problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
> 4. Start the default instance and gserver1 instance:
> -- bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> 5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
> * If I first start the "gserver1" instance by itself (before starting the default instance), the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
> Steps to repeat PortOffset problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
> 4. Start the server instance:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
> -
> 2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
> javax.resource.ResourceException: Could not create connection.
> at
> org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
> ...
> Caused by: java.net.ConnectException: Connection refused
> ...
> -
> This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
> -
> 2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
> XAResource for recovery for mcf:
> geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
> 2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
> javax.resource.ResourceException: Could not create connection.
> ...
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
> ...
> -
> In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GERONIMO-5987) The ActiveMQ working directory
and port are not referenced correctly - multiple instances not possible
Posted by "Rex Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13089316#comment-13089316 ]
Rex Wang commented on GERONIMO-5987:
------------------------------------
With my new patch in ARIES-727 and GERONIMO-5987-new.patch, we manage to get the settings unified in config-substitutions.properties like before.
-Rex
> The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible
> ------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0-M2, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Assignee: Rex Wang
> Labels: geronimo
> Attachments: GERONIMO-5987-detail.patch, GERONIMO-5987-new.patch, GERONIMO-5987.patch
>
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> First, Problem with working directory
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Second, Problem with PortOffset
> When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
> Steps to repeat working directory problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
> 4. Start the default instance and gserver1 instance:
> -- bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> 5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
> * If I first start the "gserver1" instance by itself (before starting the default instance), the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
> Steps to repeat PortOffset problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
> 4. Start the server instance:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
> -
> 2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
> javax.resource.ResourceException: Could not create connection.
> at
> org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
> ...
> Caused by: java.net.ConnectException: Connection refused
> ...
> -
> This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
> -
> 2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
> XAResource for recovery for mcf:
> geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
> 2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
> javax.resource.ResourceException: Could not create connection.
> ...
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
> ...
> -
> In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GERONIMO-5987) The ActiveMQ working directory
and port are not referenced correctly - multiple instances not possible
Posted by "Rex Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13113236#comment-13113236 ]
Rex Wang commented on GERONIMO-5987:
------------------------------------
At revision: 1174568, I update server to use our fork aries blueprint(0.3.0.1-SNAPSHOT) in ext, with the patch in ARIES-727.
At revision: 1174575, I commit the fix to set the activemq port and offset in config-substitutions.properties.
You could try it again in latest build.
-Rex
> The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible
> ------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Assignee: Rex Wang
> Labels: geronimo
> Attachments: GERONIMO-5987-detail.patch, GERONIMO-5987-new.patch, GERONIMO-5987.patch
>
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> First, Problem with working directory
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Second, Problem with PortOffset
> When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
> Steps to repeat working directory problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
> 4. Start the default instance and gserver1 instance:
> -- bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> 5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
> * If I first start the "gserver1" instance by itself (before starting the default instance), the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
> Steps to repeat PortOffset problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
> 4. Start the server instance:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
> -
> 2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
> javax.resource.ResourceException: Could not create connection.
> at
> org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
> ...
> Caused by: java.net.ConnectException: Connection refused
> ...
> -
> This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
> -
> 2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
> XAResource for recovery for mcf:
> geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
> 2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
> javax.resource.ResourceException: Could not create connection.
> ...
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
> ...
> -
> In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GERONIMO-5987) The ActiveMQ working directory
and port are not referenced correctly - multiple instances not possible
Posted by "Russell E Glaue (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043024#comment-13043024 ]
Russell E Glaue commented on GERONIMO-5987:
-------------------------------------------
Apparently there are two places in which the ActiveMQ Host and Port could be configured in a bundle deployment.
1. var/config/config-substitutions.properties
2. etc/blueprint-activemq-placeholder.cfg
(The fact that the second file has the word "placeholder" in the file name makes me curious about the developer's status of the ActiveMQ plugin.)
Configuring the port in either file is not utilized by ActiveMQ
Also, the "activemq.data" working directory can be configured in the second file. But ActiveMQ does not utilize that either.
> The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible
> ------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0-M2, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Labels: geronimo
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> First, Problem with working directory
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Second, Problem with PortOffset
> When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
> Steps to repeat working directory problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
> 4. Start the default instance and gserver1 instance:
> -- bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> 5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
> * If I first start the "gserver1" instance by itself (before starting the default instance), the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
> Steps to repeat PortOffset problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
> 4. Start the server instance:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
> -
> 2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
> javax.resource.ResourceException: Could not create connection.
> at
> org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
> ...
> Caused by: java.net.ConnectException: Connection refused
> ...
> -
> This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
> -
> 2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
> XAResource for recovery for mcf:
> geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
> 2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
> javax.resource.ResourceException: Could not create connection.
> ...
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
> ...
> -
> In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GERONIMO-5987) The ActiveMQ working directory
and port are not referenced correctly - multiple instances not possible
Posted by "Russell E Glaue (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13113509#comment-13113509 ]
Russell E Glaue commented on GERONIMO-5987:
-------------------------------------------
I just tested geronimo-tomcat7-javaee6-3.0-20110923.091022-350-bin
PortOffset is now working with ActiveMQ, and I am able to startup multiple instances of the javaee6 bundle within the same runtime OS - IFF I follow a certain startup procedure. Yes, there is one more issue - regarding the ActiveMQ lock file.
I have created an example for running multiple instances within the Geronimo Wiki, here: https://cwiki.apache.org/confluence/display/GMOxDOC30/Running+multiple+Geronimo+instances
Now, if you follow this example, you can follow me in the issue I am able to reproduce with a conflict of the ActiveMQ lock file.
Follow the example in the wiki to setup two separate instance. In both start scripts, uncomment the interactive startup (bin/geronimo run), and comment out the "Normal startup (bin/startup).
Now the steps to reproduce an issue where two Geronimo instances conflict over the same ActiveMQ lock file:
1. system$ cd /opt/geronimo3
2. system$ gserv1/start.sh
3. system$ gserv2/start.sh
In these three steps, gserv1 will startup successfully (ActiveMQ binds to port 61716), but ActiveMQ uses the lockfile "/opt/geronimo3/var/activemq/lock".
When you start gserv2, its ActiveMQ wants to use the lockfile "/opt/geronimo3/var/activemq/lock" too. As a result, gserv2 never startsup because it enters an infinite loop waiting for the ActiveMQ lock file to be available.
Now the successful steps to a current workaround to the above issue
1. system$ cd /opt/geronimo3
2. system$ cd gserv1
3. system$ ./start.sh
4. system$ cd gserv2
5. system$ ./start.sh
In these three steps, gserv1 will startup successfully (ActiveMQ binds to port 61716), AND (unlike the above issue) ActiveMQ uses the lockfile "/opt/geronimo3/gserv1/var/activemq/lock".
Similarly, gserv2 starts up successfully (ActiveMQ binds to port 61816), AND (unlike the above issue) ActiveMQ uses the lockfile "/opt/geronimo3/gserv2/var/activemq/lock".
So it appears that ActiveMQ uses the lock file of {cwd}/var/activemq/lock , but instead ActiveMQ should be using the lock file of {org.apache.geronimo.server.dir}/{org.apache.geronimo.server.name}/var/activemq/lock .
The workaround works because ActiveMQ (surprisingly) does not use the lock file of GERONIMO_HOME/var/activemq/lock which was what I was expecting to be the root of the problem when I first encountered this issue.
And just for fun (to verify this is what is really happening) I tried this:
(GERONIMO_HOME := /opt/geronimo3/ and the instance is /opt/geronimo3/gserv1)
1. system$ ls -d /opt/var
ls: /opt/var: No such file or directory
2. system$ cd /opt
3. system$ geronimo3/gserv1/start.sh
4. system$ ls -d /opt/var
/opt/var
4. system$ tree /opt/var
/opt/var
`-- activemq
|-- journal
| |-- data-1
| `-- data-control
|-- kr-store
| |-- data
| | |-- index-container-roots
| | `-- lock
| `-- state
| |-- data-kaha-1
| |-- data-store-state-1
| |-- hash-index-store-state_state
| |-- index-kaha
| |-- index-store-state
| |-- index-transactions-state
| `-- lock
`-- lock
> The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible
> ------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Assignee: Rex Wang
> Labels: geronimo
> Attachments: GERONIMO-5987-detail.patch, GERONIMO-5987-new.patch, GERONIMO-5987.patch
>
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> First, Problem with working directory
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Second, Problem with PortOffset
> When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
> Steps to repeat working directory problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
> 4. Start the default instance and gserver1 instance:
> -- bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> 5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
> * If I first start the "gserver1" instance by itself (before starting the default instance), the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
> Steps to repeat PortOffset problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
> 4. Start the server instance:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
> -
> 2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
> javax.resource.ResourceException: Could not create connection.
> at
> org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
> ...
> Caused by: java.net.ConnectException: Connection refused
> ...
> -
> This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
> -
> 2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
> XAResource for recovery for mcf:
> geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
> 2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
> javax.resource.ResourceException: Could not create connection.
> ...
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
> ...
> -
> In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (GERONIMO-5987) The ActiveMQ working directory
and port are not referenced correctly - multiple instances not possible
Posted by "Forrest Xia (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Forrest Xia resolved GERONIMO-5987.
-----------------------------------
Resolution: Fixed
Fix Version/s: 3.0-beta-1
3.0
This change is released with 3.0-beta-1, so close this jira. If there is still problem around multiple server instance support, please open another jira to track. thanks!
> The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible
> ------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Assignee: Rex Wang
> Labels: geronimo
> Fix For: 3.0, 3.0-beta-1
>
> Attachments: GERONIMO-5987-detail.patch, GERONIMO-5987-new.patch, GERONIMO-5987.patch
>
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> First, Problem with working directory
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Second, Problem with PortOffset
> When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
> Steps to repeat working directory problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
> 4. Start the default instance and gserver1 instance:
> -- bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> 5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
> * If I first start the "gserver1" instance by itself (before starting the default instance), the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
> Steps to repeat PortOffset problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
> 4. Start the server instance:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
> -
> 2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
> javax.resource.ResourceException: Could not create connection.
> at
> org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
> ...
> Caused by: java.net.ConnectException: Connection refused
> ...
> -
> This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
> -
> 2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
> XAResource for recovery for mcf:
> geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
> 2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
> javax.resource.ResourceException: Could not create connection.
> ...
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
> ...
> -
> In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GERONIMO-5987) The ActiveMQ working directory
and port are not referenced correctly - multiple instances not possible
Posted by "Kevan Miller (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13084094#comment-13084094 ]
Kevan Miller commented on GERONIMO-5987:
----------------------------------------
Rex, since this may be related -- two things about ActiveMQ that I noticed, yesterday. If you don't feel these are related enough, let's get a separate Jira to track these.
# we're not currently displaying the ActiveMQ listening port during server startup.
# the server socket is listening on 127.0.0.1, not 0.0.0.0
Here's output for a 2.1.x server start:
{code}
Listening on Ports:
1050 0.0.0.0 CORBA Naming Service
1099 0.0.0.0 RMI Naming
1527 0.0.0.0 Derby Connector
2001 0.0.0.0 OpenEJB ORB Adapter
4201 0.0.0.0 OpenEJB Daemon
6882 0.0.0.0 OpenEJB ORB Adapter
8009 0.0.0.0 Tomcat Connector AJP AJP
8080 0.0.0.0 Tomcat Connector HTTP BIO HTTP
8443 0.0.0.0 Tomcat Connector HTTPS BIO HTTPS
9998 0.0.0.0 JMX Secure Remoting Connector
9999 0.0.0.0 JMX Remoting Connector
61613 0.0.0.0 ActiveMQ Transport Connector
61616 0.0.0.0 ActiveMQ Transport Connector
{code}
We no longer start the Stomp connector (61613) by default. Which is good I think. However, on 3.0 we don't register the 61616 port and the IP address for the server socket is not correct.
> The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible
> ------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0-M2, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Assignee: Rex Wang
> Labels: geronimo
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> First, Problem with working directory
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Second, Problem with PortOffset
> When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
> Steps to repeat working directory problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
> 4. Start the default instance and gserver1 instance:
> -- bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> 5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
> * If I first start the "gserver1" instance by itself (before starting the default instance), the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
> Steps to repeat PortOffset problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
> 4. Start the server instance:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
> -
> 2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
> javax.resource.ResourceException: Could not create connection.
> at
> org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
> ...
> Caused by: java.net.ConnectException: Connection refused
> ...
> -
> This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
> -
> 2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
> XAResource for recovery for mcf:
> geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
> 2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
> javax.resource.ResourceException: Could not create connection.
> ...
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
> ...
> -
> In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GERONIMO-5987) The ActiveMQ working directory
and port are not referenced correctly - multiple instances not possible
Posted by "Russell E Glaue (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13112669#comment-13112669 ]
Russell E Glaue commented on GERONIMO-5987:
-------------------------------------------
Update from testing with geronimo-tomcat7-javaee6-3.0-20110922.084001-348-bin SNAPSHOT
ActiveMQ does show up in the list of "Listening on Ports", and lists the port it is actually listening on and not the port it is configured to be listening on - which is good because that is the correct information to report. This actually resolves part of the reported issue requesting that the service and port be listed at startup.
But as this suggests, though I have PortOffset set to 100 in var/config/config-substitutions.properties, the ActiveMQ service still binds to the default port 61616, and all other dependent services are attempting to bind to ActiveMQ at the configured port 61716.
So ActiveMQ's configuration is not unified into config-substitutions yet.
Also, the etc/blueprint-activemq-placeholder.cfg file still exists in the latest snapshot which contains supposed configuration for ActiveMQ. However, as before, setting the activemq.port or the portOffset in this config file does not change anything either.
> The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible
> ------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Assignee: Rex Wang
> Labels: geronimo
> Attachments: GERONIMO-5987-detail.patch, GERONIMO-5987-new.patch, GERONIMO-5987.patch
>
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> First, Problem with working directory
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Second, Problem with PortOffset
> When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
> Steps to repeat working directory problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
> 4. Start the default instance and gserver1 instance:
> -- bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> 5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
> * If I first start the "gserver1" instance by itself (before starting the default instance), the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
> Steps to repeat PortOffset problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
> 4. Start the server instance:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
> -
> 2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
> javax.resource.ResourceException: Could not create connection.
> at
> org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
> ...
> Caused by: java.net.ConnectException: Connection refused
> ...
> -
> This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
> -
> 2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
> XAResource for recovery for mcf:
> geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
> 2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
> javax.resource.ResourceException: Could not create connection.
> ...
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
> ...
> -
> In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (GERONIMO-5987) The ActiveMQ working directory
and port are not referenced correctly - multiple instances not possible
Posted by "Russell E Glaue (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13210652#comment-13210652 ]
Russell E Glaue commented on GERONIMO-5987:
-------------------------------------------
The ActiveMQ Lock File conflict issue is now filed in GERONIMO-6281
> The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible
> ------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Assignee: Rex Wang
> Labels: geronimo
> Fix For: 3.0, 3.0-beta-1
>
> Attachments: GERONIMO-5987-detail.patch, GERONIMO-5987-new.patch, GERONIMO-5987.patch
>
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> First, Problem with working directory
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Second, Problem with PortOffset
> When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
> Steps to repeat working directory problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
> 4. Start the default instance and gserver1 instance:
> -- bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> 5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
> * If I first start the "gserver1" instance by itself (before starting the default instance), the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
> Steps to repeat PortOffset problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
> 4. Start the server instance:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
> -
> 2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
> javax.resource.ResourceException: Could not create connection.
> at
> org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
> ...
> Caused by: java.net.ConnectException: Connection refused
> ...
> -
> This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
> -
> 2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
> XAResource for recovery for mcf:
> geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
> 2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
> javax.resource.ResourceException: Could not create connection.
> ...
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
> ...
> -
> In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (GERONIMO-5987) The ActiveMQ working directory and
port are not referenced correctly - multiple instances not possible
Posted by "Russell E Glaue (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Russell E Glaue updated GERONIMO-5987:
--------------------------------------
Description:
I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
First, Problem with working directory
When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
Second, Problem with PortOffset
When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
Steps to repeat working directory problem:
1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
2. Create the server instances:
-- 2A. cd ${GERONIMO_HOME}
-- 2B-1. mkdir gserver1
-- 2B-2. cp -rp var gserver1/
-- 2B-3. cp -rp etc gserver1/
-- 2B-4. cp -rp repository gserver1/
3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
4. Start the default instance and gserver1 instance:
-- bin/startup
-- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
"2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
The server waits here indefinitely.
6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
* If I first start the "gserver1" instance by itself (before starting the default instance), the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
* Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
Steps to repeat PortOffset problem:
1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
2. Create the server instances:
-- 2A. cd ${GERONIMO_HOME}
-- 2B-1. mkdir gserver1
-- 2B-2. cp -rp var gserver1/
-- 2B-3. cp -rp etc gserver1/
-- 2B-4. cp -rp repository gserver1/
3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
4. Start the server instance:
-- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
-
2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
ManagedConnection for handle: nullManagedConnectionInfo:
org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
javax.resource.ResourceException: Could not create connection.
at
org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
...
Caused by: java.net.ConnectException: Connection refused
...
-
This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
-
2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
XAResource for recovery for mcf:
geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
ManagedConnection for handle: nullManagedConnectionInfo:
org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
javax.resource.ResourceException: Could not create connection.
...
Caused by: javax.jms.JMSException: Could not connect to broker URL:
tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
...
-
In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
was:
I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
First, Problem with working directory
When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
Second, Problem with PortOffset
When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
Steps to repeat working directory problem:
1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
2. Create the server instances:
-- 2A. cd ${GERONIMO_HOME}
-- 2B-1. mkdir gserver1
-- 2B-2. cp -rp var gserver1/
-- 2B-3. cp -rp etc gserver1/
-- 2B-4. cp -rp repository gserver1/
3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
4. Start the default instance and gserver1 instance:
-- bin/startup
-- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver2 bin/startup
5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
"2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
The server waits here indefinitely.
6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
* When I first start the "gserver1" instance, the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
* Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
Steps to repeat PortOffset problem:
1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
2. Create the server instances:
-- 2A. cd ${GERONIMO_HOME}
-- 2B-1. mkdir gserver1
-- 2B-2. cp -rp var gserver1/
-- 2B-3. cp -rp etc gserver1/
-- 2B-4. cp -rp repository gserver1/
3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
4. Start the server instance:
-- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
-
2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
ManagedConnection for handle: nullManagedConnectionInfo:
org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
javax.resource.ResourceException: Could not create connection.
at
org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
...
Caused by: java.net.ConnectException: Connection refused
...
-
This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
-
2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
XAResource for recovery for mcf:
geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
ManagedConnection for handle: nullManagedConnectionInfo:
org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
javax.resource.ResourceException: Could not create connection.
...
Caused by: javax.jms.JMSException: Could not connect to broker URL:
tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
...
-
In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
> The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible
> ------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0-M2, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Labels: geronimo
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> First, Problem with working directory
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Second, Problem with PortOffset
> When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
> Steps to repeat working directory problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
> 4. Start the default instance and gserver1 instance:
> -- bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> 5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
> * If I first start the "gserver1" instance by itself (before starting the default instance), the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
> Steps to repeat PortOffset problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
> 4. Start the server instance:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
> -
> 2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
> javax.resource.ResourceException: Could not create connection.
> at
> org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
> ...
> Caused by: java.net.ConnectException: Connection refused
> ...
> -
> This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
> -
> 2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
> XAResource for recovery for mcf:
> geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
> 2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
> javax.resource.ResourceException: Could not create connection.
> ...
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
> ...
> -
> In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (GERONIMO-5987) The ActiveMQ working directory and
port are not referenced correctly - multiple instances not possible
Posted by "Rex Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/GERONIMO-5987?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rex Wang updated GERONIMO-5987:
-------------------------------
Attachment: GERONIMO-5987.patch
> The ActiveMQ working directory and port are not referenced correctly - multiple instances not possible
> ------------------------------------------------------------------------------------------------------
>
> Key: GERONIMO-5987
> URL: https://issues.apache.org/jira/browse/GERONIMO-5987
> Project: Geronimo
> Issue Type: Bug
> Security Level: public(Regular issues)
> Components: ActiveMQ
> Affects Versions: 3.0-M1, 3.0-M2, 3.0
> Environment: Linux x86, Red Hat Enterprise Linux Server release 5.4 (Tikanga)
> Reporter: Russell E Glaue
> Assignee: Rex Wang
> Labels: geronimo
> Attachments: GERONIMO-5987.patch
>
>
> I am testing with geronimo-tomcat7-javaee6-web-3.0-SNAPSHOT, geronimo-tomcat7-javaee6-web-3.0-20110523.171218-97
> ActiveMQ is configured to run as "org.apache.geronimo.home.dir/var/activemq" and port 61616, and does not cooperate with multi-server configurations, nor does it use the PortOffset. This is the use of the "org.apache.geronimo.server.name" option and PortOffset in "var/config/config-substitutions.properties". (see: https://cwiki.apache.org/GMOxDOC30/running-multiple-geronimo-instances.html)
> First, Problem with working directory
> When wanting to run more than a single server instance, the ActiveMQ startup will block waiting for the lock file "$GERONIMO_HOME/var/activemq/lock" to become available.
> Obviously this causes any server instance started after the first server instance is started to block during startup while waiting for the lock file to become available.
> Second, Problem with PortOffset
> When configuring the PortOffset in "var/config/config-substitutions.properties", all Geroniomo components expect and attempt to connect to ActiveMQ at the port {ActiveMQ + PortOffset}. However, regardless of what you set the PortOffset to be, the ActiveMQ service only ever binds to port 61616, the default configured port (or whatever you have the port set as for this service).
> Steps to repeat working directory problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties for the gserver1 instance.
> 4. Start the default instance and gserver1 instance:
> -- bin/startup
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> 5. `tail -f gserver1/var/logs/geronimo.log` and you will see this as the last line that outputs:
> "2011-05-31 16:26:39,609 WARN [AMQPersistenceAdapter] Waiting to Lock the Store var/activemq"
> The server waits here indefinitely.
> 6. Shutdown the default instance and you will see the "gserver1" instance continue on in the startup procedures. (of course you will see errors due to the PortOffset problem)
> * If I first start the "gserver1" instance by itself (before starting the default instance), the directory "org.apache.geronimo.home.dir/var/activemq" is created and populated. Instead it should be "org.apache.geronimo.home.dir/org.apache.geronimo.server.name/var/activemq" that is created and populated.
> * Probably the patch should be to reference the ActiveMQ working directory as "org.apache.geronimo.server.dir/var/activemq"
> Steps to repeat PortOffset problem:
> 1. Download and unpack G3.0 SNAPSHOT (3.0-20110523 tested)
> 2. Create the server instances:
> -- 2A. cd ${GERONIMO_HOME}
> -- 2B-1. mkdir gserver1
> -- 2B-2. cp -rp var gserver1/
> -- 2B-3. cp -rp etc gserver1/
> -- 2B-4. cp -rp repository gserver1/
> 3. update the "PortOffset" parameter in gserver1/var/config/config-substitutions.properties in the instance
> 4. Start the server instance:
> -- env GERONIMO_OPTS=-Dorg.apache.geronimo.server.name=gserver1 bin/startup
> This is the two error messages you receive when configuring PortOffset to 100 (for example). The second error message, regarding XAResource, repeats:
> -
> 2011-06-01 16:26:49,883 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@1c211b3. mc: null]
> javax.resource.ResourceException: Could not create connection.
> at
> org.apache.activemq.ra.ActiveMQManagedConnectionFactory.createManagedConnection(ActiveMQManagedConnectionFactory.java:171)
> ...
> Caused by: java.net.ConnectException: Connection refused
> ...
> -
> This one reveals the problem that ActiveMQ ia not using PortOffset. RecoveryController wants to connect to ${ActiveMQ + PortOffset} (61616 + 100).
> -
> 2011-06-01 16:26:49,885 ERROR [RecoveryController] Recovery error: Could not get
> XAResource for recovery for mcf:
> geronimo:J2EEApplication=null,J2EEServer=geronimo,JCAConnectionFactory=DefaultActiveMQConnectionFactory,JCAManagedConnectionFactory=DefaultActiveMQConnectionFactory,JCAResource=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapter=geronimo-activemq-ra-3.0-SNAPSHOT,ResourceAdapterModule=org.apache.geronimo.configs/activemq-ra/3.0-SNAPSHOT/car,j2eeType=JCAConnectionManager,name=DefaultActiveMQConnectionFactory
> 2011-06-01 16:27:05,894 ERROR [MCFConnectionInterceptor] Error occurred creating
> ManagedConnection for handle: nullManagedConnectionInfo:
> org.apache.geronimo.connector.outbound.ManagedConnectionInfo@287dba. mc: null]
> javax.resource.ResourceException: Could not create connection.
> ...
> Caused by: javax.jms.JMSException: Could not connect to broker URL:
> tcp://localhost:61716. Reason: java.net.ConnectException: Connection refused
> ...
> -
> In this tested scenario, ActiveMQ is binding to port 61616, even though the PortOffset value is 100.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira