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


Groups > comp.lang.python > #15898

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

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed20.multikabel.net!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.006
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'socket': 0.04; 'subject:when': 0.07; 'python': 0.08; 'it;': 0.09; 'port,': 0.09; 'sockets': 0.09; 'subject:report': 0.09; 'subject:error': 0.10; 'am,': 0.12; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; "haven't": 0.20; 'trying': 0.21; "doesn't": 0.23; 'header:In-Reply-To:1': 0.23; 'creating': 0.25; 'separate': 0.28; 'sat,': 0.28; 'bit': 0.28; 'script.': 0.28; 'message- id:@mail.gmail.com': 0.29; 'problem': 0.29; 'module': 0.30; 'binding': 0.30; 'can,': 0.30; 'easier.': 0.30; 'nov': 0.31; 'to:addr:python-list': 0.32; 'actually': 0.33; 'things': 0.35; 'received:209.85.161': 0.35; 'before.': 0.36; 'subject:skip:m 10': 0.36; 'but': 0.37; 'think': 0.37; 'subject:with': 0.38; 'received:google.com': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.39; 'might': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.40; '2011': 0.62; 'share': 0.66; 'processes,': 0.67; '19,': 0.68; ',the': 0.84; 'subject:always': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=TDX3QGuloEqHuX9+BDDV9Za4nU+E7WOeqJt9jVkRCME=; b=AvGI9EmQkrUZSmkqjORdeudy+6XagaFZc48l8kgd5n058Vb/QT57iFLvwr4C0MokYQ gnInuyXEbEgKLmcEegG9AKLwvoUf13f4Hxh/w94Ss37en2U3WrpM+EgXPiL2eqWtb4Hy pCpIb3yw3Quulbtq4T6RyHxWxtvCljOpW9JfE=
MIME-Version 1.0
In-Reply-To <674531.1586.1321631509432.JavaMail.geo-discussion-forums@yqhd1>
References <12715937.830.1321611809592.JavaMail.geo-discussion-forums@yqoo7> <mailman.2829.1321630394.27778.python-list@python.org> <14330307.286.1321631316567.JavaMail.geo-discussion-forums@yqcm23> <674531.1586.1321631509432.JavaMail.geo-discussion-forums@yqhd1>
Date Sat, 19 Nov 2011 03:04:11 +1100
Subject Re: Why sock.bind is always report 10048 error when in a script with multiprocessing
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2832.1321632261.27778.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1321632261 news.xs4all.nl 6893 [2001:888:2000:d::a6]:48328
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:15898

Show key headers only | View raw


On Sat, Nov 19, 2011 at 2:51 AM, Junfeng Hu <hujunfeng@gmail.com> wrote:
> And actually ,the socket hadn't been used in this script.

Doesn't matter that you haven't used it; you're binding to the port,
that's what causes the 10048.

I think the main problem is that you're trying to share sockets across
processes, but I haven't used the Python multiprocessing module with
sockets before. I would recommend, if you can, creating separate
sockets in each subprocess; that might make things a bit easier.

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