You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Kevin Earls (JIRA)" <ji...@apache.org> on 2013/07/08 17:57:48 UTC

[jira] [Updated] (AMQ-4588) org.apache.activemq.util.IdGenerator calls non-configurable new ServerSocket(0);

     [ https://issues.apache.org/jira/browse/AMQ-4588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Earls updated AMQ-4588:
-----------------------------

    Attachment: AMQ-4588.patch

Here's a patch that does the following:

- adds JVM parameter activemq.idgenerator.port which can be used to set a port other than 0
- changed the logging to only print the stack trace if trace logging is enabled.

I did not add a test because of the difficulty of properly unit testing things that happen in static initializers and logs.  I manually tested these cases:

- default, activemq.idgenerator.port not set
- activemq.idgenerator.port set to a valid port
- activemq.idgenerator.port set to invalid values, such as 12345678 or foo

I also changed logging levels and checked for proper output in the logs.
                
> org.apache.activemq.util.IdGenerator calls non-configurable new ServerSocket(0);
> --------------------------------------------------------------------------------
>
>                 Key: AMQ-4588
>                 URL: https://issues.apache.org/jira/browse/AMQ-4588
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: JMS client
>    Affects Versions: 5.8.0
>            Reporter: Bill DeCoste
>            Priority: Minor
>         Attachments: AMQ-4588.patch
>
>
> In order to have the AMQ client run on OpenShift the IdGenerator call 'new ServerSocket(0);' needs to be configurable to be avoided. OpenShift only allows binding to a specific, provided, unique loopback address and a limited set of ports. Ideally there would be a configuration option that allows the stub prefix to be set via a JVM param. The current logic doesn't break OpenShift as the PermissionDenied exception is caught and swallowed but the stack trace is ugly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira