[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)'

2013-06-19 Thread ASF subversion and git services (JIRA)

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

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

Commit 1494606 from [~aconway]
[ https://svn.apache.org/r1494606 ]

QPID-4745: Remove spurious --port option in qpidd-p0

 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



[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)'

2013-06-19 Thread Alan Conway (JIRA)

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

Alan Conway commented on QPID-4745:
---

I can't recall why I put that --port option in there so I'll take it out, as it 
does appear incorrect.

Currently the broker for the python system tests is externally launched so 
qpidd-p0 can be a drop in replacement. We could move that into the python tests 
if there's benefit in doing so. ha_tests.py already such a launcher built in, 
but in that case it is doing more work than qpidd-p0, it holds onto ports so 
brokers can be restarted on the same port.

 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



[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)'

2013-06-18 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-4745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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



[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)'

2013-06-18 Thread Alan Conway (JIRA)

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

Alan Conway commented on QPID-4745:
---

Updating changes to use qpidd-p0 is less urgent given this alternative fix to 
port-clash problems:


r1492778 | gsim | 2013-06-13 13:45:56 -0400 (Thu, 13 Jun 2013) | 2 lines

NO-JIRA: restrict broker to listen only on loopback interface (which is all 
that gets used by clients) in order to avoid port collisions




 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



[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)'

2013-06-18 Thread Andrew Stitcher (JIRA)

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

Andrew Stitcher commented on QPID-4745:
---

I think the new qpidd-p0.py has a mistake - the command line it uses is:

qpidd --socket-fd n --disable-listen tcp --port port of fd n

I think the --port ... is in error is seems to try to listen to the same port 
as the socket it was passed in!

Also I think that for the python system tests it would make more sense to make 
this a qpidd launching class that is used as part of the test setup. This would 
create a socket pair and pass one end to the broker and pass the other to the 
tests to use directly (I think this last part will need a small amount of 
implementation in the python code).

 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



[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)'

2013-05-15 Thread Alan Conway (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-4745?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[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)'

2013-05-03 Thread Alan Conway (JIRA)

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

Alan Conway commented on QPID-4745:
---

Another part of this fix: a flag to disable TCP listening on the broker, is 
reviewed in https://reviews.apache.org/r/10894/

 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



[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)'

2013-05-02 Thread Alan Conway (JIRA)

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

Alan Conway commented on QPID-4745:
---

Part of the fix (a wrapper to allocate ports instead of qpidd) is reviewed at: 
https://reviews.apache.org/r/10872/

 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