[Zope-dev] Can I run 2 zope servers on one machine?

Jeffrey P Shell jeffrey@cuemedia.com
Mon, 13 Jan 2003 16:48:55 -0700


This is a question better served on the zope@zope.org mailing list.  
But to answer your question, z2.py (executed by the 'start' script) has 
many configuration options dealing with ports.  It's generally easiest 
to use the -P switch, like -P 9100 - that runs HTTP on 9180 and FTP on 
9121.  The options are:

   -P [ipaddress:]number

     Set the web, ftp and monitor port numbers simultaneously
     as offsets from the number.  The web port number will be number+80.
     The FTP port number will be number+21.  The monitor port number will
     be number+99.

     The number can be preeceeded by an ip address follwed by a colon
     to specify an address to listen on. This allows different servers
     to listen on different addresses.

     Multiple -P options can be provided to run multiple sets of servers.

   -w port

     The Web server (HTTP) port.  This defaults to %(HTTP_PORT)s. The
     standard port for HTTP services is 80.  If this is a dash
     (e.g. -w -), then HTTP is disabled.

     The number can be preeceeded by an ip address follwed by a colon
     to specify an address to listen on. This allows different servers
     to listen on different addresses.

     Multiple -w options can be provided to run multiple servers.

   -W port

     The "WebDAV source" port.  If this is a dash (e.g. -w -), then
     "WebDAV source" is disabled.  The default is disabled.  Note that
     this feature is a workaround for the lack of "source-link" support
     in standard WebDAV clients.

     The port can be preeceeded by an ip address follwed by a colon
     to specify an address to listen on. This allows different servers
     to listen on different addresses.

     Multiple -W options can be provided to run multiple servers.

   -f port

     The FTP port.  If this is a dash (e.g. -f -), then FTP
     is disabled.  The standard port for FTP services is 21.  The
     default is %(FTP_PORT)s.

     The port can be preeceeded by an ip address follwed by a colon
     to specify an address to listen on. This allows different servers
     to listen on different addresses.

So if you want to run your Zope 2.6's FTP on 7119 and HTTP on 7118, you 
could add the parameters to the start script (or when you started up):

  -w 7118 -f 7119


On Monday, January 13, 2003, at 04:38  PM, Tena Sakai wrote:

> Folks,
>
> Can I run 2 zope servers on one machine?
> I have a machine that runs zope 2.5.1.  I want to run zope 2.6
> on the same machine without taking 2.5.1 down.  Is this possible?
>
> 2.5.1 runs on port 7117 and I chose 7118 for 2.6. port.  What I got
> was:
>
>    2003-01-13T14:39:44 PANIC(300) z2 Startup exception
>    Traceback (innermost last):
>      Module __main__, line 726, in ?
>      Module ZServer.FTPServer, line 602, in __init__
>      Module ZServer.medusa.ftp_server, line 727, in __init__
>      Module ZServer.medusa.asyncore, line 306, in bind
>    error: (125, 'Address already in use')
>
> Would it be possible to run 2.6 on port 7118 and specify that
> ftp for this zope server to use a specific ftp port?
>
> [I'm just mumbling...  In the file ZServer/medusa.ftp_server
> there is a definition of port=21 (line 701).  What happens if
> I hack this and put some big number like 9221 instead?]
>
> Regards,
>
> Tena Sakai
>
>
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope )