qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Conway (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-4745) 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)'
Date Wed, 15 May 2013 15:13:16 GMT

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

Alan Conway commented on QPID-4745:
-----------------------------------

Comitted to trunk: solution for the HA tests. Still need fix for other tests.

------------------------------------------------------------------------   
r1482882 | aconway | 2013-05-15 11:05:05 -0400 (Wed, 15 May 2013) | 2 lines

QPID-4745: Clean up test_backup_acquired to use HaCluster.

------------------------------------------------------------------------
r1482881 | aconway | 2013-05-15 11:03:44 -0400 (Wed, 15 May 2013) | 16 lines

QPID-4745: HA safe port allocation for brokers in HA tests.

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.

The solution is to do bind(0) and listen in the python test framework (class
HaPort) and let the broker use the socket using qpidd --socket-fd. When the
broker is shut down the port remains bound by the python process. When the  
broker is re-started it again is given access to the socket via --socket-fd.

Other changes
- move ha_store_tests into ha_tests.
- add heartbeats to avoid stalling.

------------------------------------------------------------------------

                
> 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-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message