Getting zctl.py To Start ftpd-- Was: Is Anyone Listening?? Port 8021 Isn't!
It (finally) strikes me that the reason I can't get my ftpd started on port 8021 is because I'm using InstanceHome and zctl.py, not the standard *start* script in the distro. So...How do I get ftpd started from zctl.py? Here's what the script has: I'm trying to figure out how to pass a flag or tweak the script. Suggestions? for client in clients: args = list(zope_args) if client != 'default': ZOPE_PORT = ZOPE_LOG = ZOPE_OPTS = '' CLIENT_HOME = pjoin(HERE, client) conf = pjoin(CLIENT_HOME, 'conf.py') if not (isdir(CLIENT_HOME) and isfile(conf)): print 'Client configuration file "%s" was not found.' % conf continue execfile(conf, globals()) args.append('"CLIENT_HOME=%s"' % CLIENT_HOME) if ZOPE_OPTS: args.insert(0, ZOPE_OPTS) if ZOPE_PORT: args.insert(0, '-P %s' % ZOPE_PORT) if ZOPE_LOG: args.append('"STUPID_LOG_FILE=%s"' % ZOPE_LOG) for k,v in ZOPE_ENV.items(): env[k] = str(v) if ZEO: start_zeo(zeo_args) print 'Starting %s Zope...' % client run(cmd % string.join(args)) At 07:33 PM 10/2/2002 -0400, you wrote:
the $@ just gathers all the command line stuff you typed after "start"
Thanks.
the Z2.log file is your standard web log, it should be in the var directory. you don't see it? weird
Oops. It's under InstanceHome/var
how are you verifying that 8021 is not working? can you telnet to that port?
I can't telnet into my box (I could within the box, but forget how <:-) I can't use WS_FTP to get in on that port. Also, *netstat -n -a* doesn't show the port as being listened to.
is it possible that 8021 is somehow locked down? you could verify that 8021 is operational by restarting zope to run on that port and surf to it -- edit your start script and give it a shot.
I'm almost certain the problem is with the zctl.py script at this point. Thanks! beno
On Wednesday 02 October 2002 8:53 pm, beno wrote:
It (finally) strikes me that the reason I can't get my ftpd started on port 8021 is because I'm using InstanceHome and zctl.py, not the standard *start* script in the distro. So...How do I get ftpd started from zctl.py?
The zctl.py script just calls z2.py. You can pass options to z2.py by defining ZOPE_OPTS in zope.conf, inside your InstanceHome. I've got an ftp service running on my site, and here's my zope.conf: $ cat zope.conf """zope.conf - zctl.py Zope/ZEO startup settings This is execfile'd in the context of the zctl.py script. Here are a few handy python var settings (see 'zctl.py for more): HERE - the absoluted path of zctl.py's working directory pjoin - os.path.join """ ## Zope ## ZOPE_HOME = pjoin(HERE, '..', 'Zope-2.5.1-src') ZOPE_OPTS = '-p -' ZOPE_PORT = 8000 ZOPE_LOG = pjoin(HERE, 'var', 'debug.log') ZOPE_ENV['PRODUCTS_PATH'] = ("%(SOFTWARE_PRODUCTS)s:" + pjoin(HERE, '..', 'OtherProducts') + ":%(INSTANCE_PRODUCTS)s") ## ZEO ## # 'localhost' will be used if ZEO_SERVER_NAME has no setting. #ZEO['ZEO_SERVER_NAME'] = 'www.zeohost.com' # You must specify a ZEO_SERVER_PORT. ZEO['ZEO_SERVER_PORT'] = 8500 ZEO['STUPID_LOG_FILE'] = pjoin(HERE, 'var', 'ZEO_Server.log') ZEO_WAIT_BAILOUT = 200 # Don't try for more than num seconds Hope that helps. Doug
Geez. I must be thick as a brick, but I still don't see how to get my ftp client talking to Zope. In your zope.conf I see no reference to ftp or port 8021. Your file is almost identical to mine. How is it you have ftp running? Which port? Or, am I missing something else altogether (which is what I suspect). TIA, beno At 08:45 AM 10/3/2002 -0400, you wrote:
On Wednesday 02 October 2002 8:53 pm, beno wrote:
It (finally) strikes me that the reason I can't get my ftpd started on port 8021 is because I'm using InstanceHome and zctl.py, not the standard *start* script in the distro. So...How do I get ftpd started from zctl.py?
The zctl.py script just calls z2.py. You can pass options to z2.py by defining ZOPE_OPTS in zope.conf, inside your InstanceHome.
I've got an ftp service running on my site, and here's my zope.conf:
$ cat zope.conf """zope.conf - zctl.py Zope/ZEO startup settings
This is execfile'd in the context of the zctl.py script. Here are a few handy python var settings (see 'zctl.py for more): HERE - the absoluted path of zctl.py's working directory pjoin - os.path.join """ ## Zope ##
ZOPE_HOME = pjoin(HERE, '..', 'Zope-2.5.1-src') ZOPE_OPTS = '-p -' ZOPE_PORT = 8000 ZOPE_LOG = pjoin(HERE, 'var', 'debug.log') ZOPE_ENV['PRODUCTS_PATH'] = ("%(SOFTWARE_PRODUCTS)s:" + pjoin(HERE, '..', 'OtherProducts') + ":%(INSTANCE_PRODUCTS)s") ## ZEO ## # 'localhost' will be used if ZEO_SERVER_NAME has no setting. #ZEO['ZEO_SERVER_NAME'] = 'www.zeohost.com' # You must specify a ZEO_SERVER_PORT. ZEO['ZEO_SERVER_PORT'] = 8500 ZEO['STUPID_LOG_FILE'] = pjoin(HERE, 'var', 'ZEO_Server.log') ZEO_WAIT_BAILOUT = 200 # Don't try for more than num seconds
Hope that helps.
Doug
On Thu, Oct 03, 2002 at 10:53:54AM -0400, beno wrote:
Geez. I must be thick as a brick, but I still don't see how to get my ftp client talking to Zope. In your zope.conf I see no reference to ftp or port 8021. Your file is almost identical to mine. How is it you have ftp running? Which port? Or, am I missing something else altogether (which is what I suspect).
Zope runs ftp on 8021 by default. You could add "-f 9999" to the ZOPE_OPTS to force it to 9999 or whatever you like... -- Paul Winkler "Welcome to Muppet Labs, where the future is made - today!"
On Thursday 03 October 2002 10:53 am, beno wrote:
Geez. I must be thick as a brick, but I still don't see how to get my ftp client talking to Zope. In your zope.conf I see no reference to ftp or port 8021. Your file is almost identical to mine. How is it you have ftp running? Which port? Or, am I missing something else altogether (which is what I suspect).
It's running on port 8021, just like you want. Instead of passing port info as an argument in ZOPE_OPTS, I am specifying the ZOPE_PORT, which is really the *base* port for all services. Since ftp is normally 21, the ZServer ftp port is ZOPE_BASE + 21 = 8021. Doug
TIA, beno
At 08:45 AM 10/3/2002 -0400, you wrote:
On Wednesday 02 October 2002 8:53 pm, beno wrote:
It (finally) strikes me that the reason I can't get my ftpd started on port 8021 is because I'm using InstanceHome and zctl.py, not the standard *start* script in the distro. So...How do I get ftpd started from zctl.py?
The zctl.py script just calls z2.py. You can pass options to z2.py by defining ZOPE_OPTS in zope.conf, inside your InstanceHome.
I've got an ftp service running on my site, and here's my zope.conf:
$ cat zope.conf """zope.conf - zctl.py Zope/ZEO startup settings
This is execfile'd in the context of the zctl.py script. Here are a few handy python var settings (see 'zctl.py for more): HERE - the absoluted path of zctl.py's working directory pjoin - os.path.join """ ## Zope ##
ZOPE_HOME = pjoin(HERE, '..', 'Zope-2.5.1-src') ZOPE_OPTS = '-p -' ZOPE_PORT = 8000 ZOPE_LOG = pjoin(HERE, 'var', 'debug.log') ZOPE_ENV['PRODUCTS_PATH'] = ("%(SOFTWARE_PRODUCTS)s:" + pjoin(HERE, '..', 'OtherProducts') + ":%(INSTANCE_PRODUCTS)s") ## ZEO ## # 'localhost' will be used if ZEO_SERVER_NAME has no setting. #ZEO['ZEO_SERVER_NAME'] = 'www.zeohost.com' # You must specify a ZEO_SERVER_PORT. ZEO['ZEO_SERVER_PORT'] = 8500 ZEO['STUPID_LOG_FILE'] = pjoin(HERE, 'var', 'ZEO_Server.log') ZEO_WAIT_BAILOUT = 200 # Don't try for more than num seconds
Hope that helps.
Doug
participants (3)
-
beno -
Doug Hellmann -
Paul Winkler