[ 
https://issues.apache.org/jira/browse/QPID-4745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13687201#comment-13687201
 ] 

ASF subversion and git services commented on QPID-4745:
-------------------------------------------------------

Commit 1494306 from [~aconway]
[ https://svn.apache.org/r1494306 ]

QPID-4745: Alternative port allocation for tests, instead of 'qpidd --port=0'

qpidd-p0 script binds a new port to a socket using bind(0), and then
execs qpidd using the --socket-fd option to pass the socket to qpidd.

It is intended to replace
  /path/to/qpidd --port 0 <args...>
with
  qpidd-p0 /path/to/qpidd <args...>

Most tests do not yet use qpidd-p0, they will be updated in a future commit.

Changes:
- Added qpidd-p0
- Fixed qpidd port printing logic: print port only if --port=0, regardless of 
--transport.
                
> qpidd --port 0 sometimes fails with 'Can't bind to port 0.0.0.0:49337: 
> Address already in use (qpid/sys/posix/Socket.cpp:206)' 
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-4745
>                 URL: https://issues.apache.org/jira/browse/QPID-4745
>             Project: Qpid
>          Issue Type: Improvement
>          Components: C++ Clustering
>    Affects Versions: 0.22
>            Reporter: Alan Conway
>            Assignee: Alan Conway
>            Priority: Minor
>
> Many of the tests use "qpidd --port=0" to start a broker on an available port.
> Thhis sporadically fails with: Can't bind to port 0.0.0.0:49337: Address 
> already in use (qpid/sys/posix/Socket.cpp:206)
> Many HA tests use --port=0 to start a broker on an available port, but then 
> need to shutdown and restart the broker _on the same port_. This is not safe, 
> on a busy system it is possible for another process  to take the port between 
> the time the broker is shut down and the time it is restarted.
> See also https://bugzilla.redhat.com/show_bug.cgi?id=906277

--
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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to