Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
#645: A value of 0 for socket_port should cause CP to bind to an avaibale unused port
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
CherryPy  
View profile  
 More options Jan 16 2007, 12:56 pm
From: CherryPy <t...@cherrypy.org>
Date: Tue, 16 Jan 2007 17:56:31 -0000
Local: Tues, Jan 16 2007 12:56 pm
Subject: [CherryPy] #645: A value of 0 for socket_port should cause CP to bind to an avaibale unused port

#645: A value of 0 for socket_port should cause CP to bind to an avaibale unused
port
---------------------------------+----------------------------------------- -
 Reporter:  draghu...@gmail.com  |       Owner:  rdelon
     Type:  enhancement          |      Status:  new  
 Priority:  normal               |   Milestone:        
Component:  CherryPy code        |    Keywords:        
---------------------------------+----------------------------------------- -
 When socket_port is specified as 0, an exception is thrown as follows:

 {{{
 File
 "/localhome/raghu/localwork/cherrypy/svn.cherrypy.org/trunk/cherrypy/_cpser ver.py",
 line 69, in quickstart
     self.start()
   File
 "/localhome/raghu/localwork/cherrypy/svn.cherrypy.org/trunk/cherrypy/_cpser ver.py",
 line 95, in start
     self._start_http(httpserver)
   File
 "/localhome/raghu/localwork/cherrypy/svn.cherrypy.org/trunk/cherrypy/_cpser ver.py",
 line 118, in _start_http
     self.wait(httpserver)
   File
 "/localhome/raghu/localwork/cherrypy/svn.cherrypy.org/trunk/cherrypy/_cpser ver.py",
 line 159, in wait
     wait_for_occupied_port(*bind_addr)
   File
 "/localhome/raghu/localwork/cherrypy/svn.cherrypy.org/trunk/cherrypy/_cpser ver.py",
 line 247, in wait_for_occupied_port
     raise IOError(msg)
 IOError: Port 0 not bound on 'localhost'
 }}}

 I am using the latest code from the trunk. It appears to me that even
 though wsgiserver is properly passing 0 to socket.bind (and hence binding
 to an unused port), other parts of the code still use "configured" port
 which is 0.

--
Ticket URL: <http://www.cherrypy.org/ticket/645>
CherryPy <http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
CherryPy  
View profile  
 More options Jan 25 2007, 3:28 pm
From: CherryPy <t...@cherrypy.org>
Date: Thu, 25 Jan 2007 20:28:06 -0000
Local: Thurs, Jan 25 2007 3:28 pm
Subject: Re: [CherryPy] #645: A value of 0 for socket_port should cause CP to bind to an avaibale unused port

#645: A value of 0 for socket_port should cause CP to bind to an avaibale unused
port
---------------------------------+----------------------------------------- -
 Reporter:  draghu...@gmail.com  |        Owner:  rdelon
     Type:  enhancement          |       Status:  new  
 Priority:  normal               |    Milestone:        
Component:  CherryPy code        |   Resolution:        
 Keywords:                       |  
---------------------------------+----------------------------------------- -
Comment (by draghu...@gmail.com):

 I am attaching a small patch that seems to work with port 0. My only
 intention in uploading the patch is to suggest it as a starting point. It
 will take more time for me to understand all its implications and suggest
 a more thorough solution.

 The web server will update its bind_addr after doing socket.bind() so that
 correct port can be obtained. This port will obviously be different from
 the original port if the original port was 0. Unfortunately, the code that
 started the web server needs to wait for this setting before proceeding
 further. Right now, I just added time.sleep(5) as I don't know of a better
 solution.

--
Ticket URL: <http://www.cherrypy.org/ticket/645>
CherryPy <http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
CherryPy  
View profile  
 More options Jan 26 2007, 1:12 am
From: CherryPy <t...@cherrypy.org>
Date: Fri, 26 Jan 2007 06:12:43 -0000
Local: Fri, Jan 26 2007 1:12 am
Subject: Re: [CherryPy] #645: A value of 0 for socket_port should cause CP to bind to an avaibale unused port

#645: A value of 0 for socket_port should cause CP to bind to an avaibale unused
port
---------------------------------+----------------------------------------- -
 Reporter:  draghu...@gmail.com  |        Owner:  fumanchu
     Type:  enhancement          |       Status:  assigned
 Priority:  normal               |    Milestone:  3.0    
Component:  CherryPy code        |   Resolution:          
 Keywords:                       |  
---------------------------------+----------------------------------------- -
Changes (by fumanchu):

  * milestone:  => 3.0
  * owner:  rdelon => fumanchu
  * status:  new => assigned

Comment:

 That's a good start, but there's no API guarantee that a given httpserver
 will possess a "bind_addr" attribute. So we'd either need to add that to
 the API (which is fine, just needs to be decided) or use some other method
 of passing that information back up to the Server object.

 If we ''did'' add a "bind_addr" requirement, that would mean we could stop
 using a dict for httpservers and use a list instead (and consumers could
 inspect [server.bind_addr for server in httpservers] if they cared). That
 might be the way to go.

--
Ticket URL: <http://www.cherrypy.org/ticket/645>
CherryPy <http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
CherryPy  
View profile  
 More options Oct 26 2007, 3:13 am
From: CherryPy <t...@cherrypy.org>
Date: Fri, 26 Oct 2007 07:13:58 -0000
Local: Fri, Oct 26 2007 3:13 am
Subject: Re: [CherryPy] #645: A value of 0 for socket_port should cause CP to bind to an avaibale unused port

#645: A value of 0 for socket_port should cause CP to bind to an avaibale unused
port
---------------------------------+----------------------------------------- -
 Reporter:  draghu...@gmail.com  |        Owner:  fumanchu
     Type:  enhancement          |       Status:  assigned
 Priority:  normal               |    Milestone:  3.2    
Component:  CherryPy code        |   Resolution:          
 Keywords:                       |  
---------------------------------+----------------------------------------- -
Changes (by fumanchu):

  * milestone:  3.0 => 3.2

--
Ticket URL: <http://www.cherrypy.org/ticket/645>
CherryPy <http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
CherryPy  
View profile  
 More options Jul 4, 1:38 pm
From: CherryPy <t...@cherrypy.org>
Date: Sat, 04 Jul 2009 17:38:49 -0000
Local: Sat, Jul 4 2009 1:38 pm
Subject: Re: [CherryPy] #645: A value of 0 for socket_port should cause CP to bind to an avaibale unused port

#645: A value of 0 for socket_port should cause CP to bind to an avaibale unused
port
---------------------------------+----------------------------------------- -
 Reporter:  draghu...@gmail.com  |        Owner:  fumanchu
     Type:  enhancement          |       Status:  assigned
 Priority:  normal               |    Milestone:          
Component:  wsgiserver           |   Resolution:          
 Keywords:                       |  
---------------------------------+----------------------------------------- -
Changes (by fumanchu):

  * milestone:  3.2 =>

--
Ticket URL: <http://www.cherrypy.org/ticket/645>
CherryPy <http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google