You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Robbie Gemmell (JIRA)" <ji...@apache.org> on 2019/05/07 14:31:00 UTC

[jira] [Updated] (PROTON-2039) [python] set listener socket reuseaddr option

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

Robbie Gemmell updated PROTON-2039:
-----------------------------------
    Summary: [python] set listener socket reuseaddr option  (was: Python listener.close leaves socket in time_wait)

> [python] set listener socket reuseaddr option
> ---------------------------------------------
>
>                 Key: PROTON-2039
>                 URL: https://issues.apache.org/jira/browse/PROTON-2039
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: python-binding
>    Affects Versions: proton-c-0.27.1
>         Environment: Fedora 29, python 3.7.3
> Fedora 28, python 2.7.15
>            Reporter: Chuck Rolke
>            Assignee: Chuck Rolke
>            Priority: Major
>             Fix For: proton-c-0.28.0
>
>         Attachments: PROTON-2039.patch
>
>
> To demonstrate: execute python/examples/helloworld_direct.py two times within a few seconds. The first time works and the second time fails with an 'Address already in use' error.
> The expectation is that this program can be run many times in quick succession.
>  
> {code:java}
> (M=713c3 ?7) chug@unused examples> pwd
> /home/chug/git/qpid-proton/python/examples
> (M=713c3 ?7) chug@unused examples> ./helloworld_direct.py
> Hello World!
> (M=713c3 ?7) chug@unused examples> ./helloworld_direct.py
> Traceback (most recent call last):
>   File "./helloworld_direct.py", line 48, in <module>
>     Container(HelloWorld("localhost:8888/examples")).run()
>   File "/opt/local/lib64/proton/bindings/python/proton/_reactor.py", line 181, in run
>     while self.process(): pass
>   File "/opt/local/lib64/proton/bindings/python/proton/_reactor.py", line 238, in process
>     event.dispatch(handler)
>   File "/opt/local/lib64/proton/bindings/python/proton/_events.py", line 138, in dispatch
>     self.dispatch(h, type)
>   File "/opt/local/lib64/proton/bindings/python/proton/_events.py", line 135, in dispatch
>     _dispatch(handler, type.method, self)
>   File "/opt/local/lib64/proton/bindings/python/proton/_events.py", line 115, in _dispatch
>     m(*args)
>   File "/opt/local/lib64/proton/bindings/python/proton/_handlers.py", line 476, in on_reactor_init
>     self.on_start(event)
>   File "./helloworld_direct.py", line 32, in on_start
>     self.acceptor = event.container.listen(self.url)
>   File "/opt/local/lib64/proton/bindings/python/proton/_reactor.py", line 1166, in listen
>     acceptor = self.acceptor(url.host, url.port)
>   File "/opt/local/lib64/proton/bindings/python/proton/_reactor.py", line 304, in acceptor
>     a = Acceptor(self, unicode2utf8(host), int(port), impl)
>   File "/opt/local/lib64/proton/bindings/python/proton/_reactor.py", line 678, in __init__
>     sock = IO.listen(host, port)
>   File "/opt/local/lib64/proton/bindings/python/proton/_io.py", line 46, in listen
>     s.bind((host, port))
> OSError: [Errno 98] Address already in use
> 1 (M=713c3 ?7) chug@unused examples> ss -t -a -n | grep 8888
> TIME-WAIT   0        0              127.0.0.1:8888            127.0.0.1:42648   
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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