Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #15891

Re: Why sock.bind is always report 10048 error when in a script with multiprocessing

References <12715937.830.1321611809592.JavaMail.geo-discussion-forums@yqoo7>
Date 2011-11-19 02:33 +1100
Subject Re: Why sock.bind is always report 10048 error when in a script with multiprocessing
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.2829.1321630394.27778.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Nov 18, 2011 at 9:23 PM, Junfeng Hu <hujunfeng@gmail.com> wrote:
> Hi All, I'm trying to leverage my core i5 to send more UDP packets with multiprocssing, but I found a interesting thing is that the socket.bind is always reporting 10048 error even the process didn't do anything about the socket.
> sock.bind((localIP,localPort))
> socket.error: [Errno 10048] Only one usage of each socket address (protocol/netw
> ork address/port) is normally permitted

Try setting the socket to SO_REUSEADDR.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Why sock.bind is always report 10048 error when in a script with multiprocessing Junfeng Hu <hujunfeng@gmail.com> - 2011-11-18 02:23 -0800
  Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Junfeng Hu <hujunfeng@gmail.com> - 2011-11-18 07:20 -0800
  Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Chris Angelico <rosuav@gmail.com> - 2011-11-19 02:33 +1100
    Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Junfeng Hu <hujunfeng@gmail.com> - 2011-11-18 07:48 -0800
    Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Junfeng Hu <hujunfeng@gmail.com> - 2011-11-18 07:48 -0800
      Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Junfeng Hu <hujunfeng@gmail.com> - 2011-11-18 07:51 -0800
      Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Junfeng Hu <hujunfeng@gmail.com> - 2011-11-18 07:51 -0800
        Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Chris Angelico <rosuav@gmail.com> - 2011-11-19 03:04 +1100
          Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Junfeng Hu <hujunfeng@gmail.com> - 2011-11-18 08:11 -0800
          Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Junfeng Hu <hujunfeng@gmail.com> - 2011-11-18 08:11 -0800
            Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Chris Angelico <rosuav@gmail.com> - 2011-11-19 03:16 +1100
      Re: Why sock.bind is always report 10048 error when in a script with multiprocessing MRAB <python@mrabarnett.plus.com> - 2011-11-18 16:55 +0000
        Re: Why sock.bind is always report 10048 error when in a script with multiprocessing Junfeng Hu <hujunfeng@gmail.com> - 2011-11-18 18:45 -0800

csiph-web