Re: Working ZEO server startup script for current ZEO (5.1.0)
Jens Vagelpohl <[email protected]>
| Newsgroups | gmane.comp.web.zope.zodb |
|---|---|
| Message-ID | <[email protected]> |
If you look at the traceback you’ll notice zeoctl calls up runzeo (/opt/zope/buildout/parts/zeoserver/bin/runzeo), which is also generated by plone.recipe.zeoserver. If I use runzeo from the command line I get the same issue. jens > On 19. Apr 2017, at 14:01 , Etienne Robillard <[email protected]> wrote: > > Whats wrong with using runzeo? > > I use runzeo script managed by supervisord. > > Hope this helps. > > Etienne > > Le 2017-04-19 à 07:26, Jens Vagelpohl a écrit : >> Hi all, >> >> Does anyone have a buildout example snippet that generates a working script to start/stop a standalone ZEO server under ZEO 5.1.0? As already mentioned on the list, the old script generating recipes such as plone.recipe.zeoserver and the zope.mkzeoinstance script no longer work. >> >> As an example, here’s the traceback from a current (v. 1.3.1) plone.recipe.zeoserver-generated script: >> >> $ bin/zeoserver fg >> /opt/zope/buildout/parts/zeoserver/bin/runzeo >> Traceback (most recent call last): >> File "/opt/zope/buildout/eggs/ZEO-5.1.0-py2.7.egg/ZEO/runzeo.py", line 401, in <module> >> main() >> File "/opt/zope/buildout/eggs/ZEO-5.1.0-py2.7.egg/ZEO/runzeo.py", line 392, in main >> s.main() >> File "/opt/zope/buildout/eggs/ZEO-5.1.0-py2.7.egg/ZEO/runzeo.py", line 155, in main >> self.create_server() >> File "/opt/zope/buildout/eggs/ZEO-5.1.0-py2.7.egg/ZEO/runzeo.py", line 251, in create_server >> self.server = create_server(self.storages, self.options) >> File "/opt/zope/buildout/eggs/ZEO-5.1.0-py2.7.egg/ZEO/runzeo.py", line 345, in create_server >> from .StorageServer import StorageServer >> ValueError: Attempted relative import in non-package >> >> bin/zeoserver looks like this: >> >> “”” >> #!/opt/zope/Python-2.7.13/bin/python2.7 >> >> import sys >> sys.path[0:0] = [ >> '/opt/zope/buildout/eggs/plone.recipe.zeoserver-1.3.1-py2.7.egg', >> '/opt/zope/buildout/eggs/ZopeUndo-4.1-py2.7.egg', >> '/opt/zope/buildout/eggs/ZODB3-3.11.0-py2.7.egg', >> '/opt/zope/buildout/eggs/zope.mkzeoinstance-3.9.5-py2.7.egg', >> '/opt/zope/buildout/eggs/zc.recipe.egg-2.0.3-py2.7.egg', >> '/opt/zope/buildout/eggs/setuptools-34.3.0-py2.7.egg', >> '/opt/zope/buildout/eggs/zc.buildout-2.8.0-py2.7.egg', >> '/opt/zope/buildout/eggs/transaction-2.1.2-py2.7.egg', >> '/opt/zope/buildout/eggs/BTrees-4.4.1-py2.7-linux-x86_64.egg', >> '/opt/zope/buildout/eggs/persistent-4.2.4-py2.7-linux-x86_64.egg', >> '/opt/zope/buildout/eggs/ZODB-5.2.0-py2.7.egg', >> '/opt/zope/buildout/eggs/ZEO-5.1.0-py2.7.egg', >> '/opt/zope/buildout/eggs/appdirs-1.4.3-py2.7.egg', >> '/opt/zope/buildout/eggs/six-1.10.0-py2.7.egg', >> '/opt/zope/buildout/eggs/packaging-16.8-py2.7.egg', >> '/opt/zope/buildout/eggs/zope.interface-4.2.0-py2.7-linux-x86_64.egg', >> '/opt/zope/buildout/eggs/zodbpickle-0.6.0-py2.7-linux-x86_64.egg', >> '/opt/zope/buildout/eggs/zc.lockfile-1.0.2-py2.7.egg', >> '/opt/zope/buildout/eggs/ZConfig-3.1.0-py2.7.egg', >> '/opt/zope/buildout/eggs/trollius-2.1-py2.7.egg', >> '/opt/zope/buildout/eggs/futures-3.0.5-py2.7.egg', >> '/opt/zope/buildout/eggs/zdaemon-4.2.0-py2.7.egg', >> '/opt/zope/buildout/eggs/pyparsing-2.2.0-py2.7.egg', >> ] >> >> import os; os.environ['PYTHONPATH'] = '/opt/zope/buildout/eggs/plone.recipe.zeoserver-1.3.1-py2.7.egg:/opt/zope/buildout/eggs/ZopeUndo-4.1-py2.7.egg:/opt/zope/buildout/eggs/ZODB3-3.11.0-py2.7.egg:/opt/zope/buildout/eggs/zope.mkzeoinstance-3.9.5-py2.7.egg:/opt/zope/buildout/eggs/zc.recipe.egg-2.0.3-py2.7.egg:/opt/zope/buildout/eggs/setuptools-34.3.0-py2.7.egg:/opt/zope/buildout/eggs/zc.buildout-2.8.0-py2.7.egg:/opt/zope/buildout/eggs/transaction-2.1.2-py2.7.egg:/opt/zope/buildout/eggs/BTrees-4.4.1-py2.7-linux-x86_64.egg:/opt/zope/buildout/eggs/persistent-4.2.4-py2.7-linux-x86_64.egg:/opt/zope/buildout/eggs/ZODB-5.2.0-py2.7.egg:/opt/zope/buildout/eggs/ZEO-5.1.0-py2.7.egg:/opt/zope/buildout/eggs/appdirs-1.4.3-py2.7.egg:/opt/zope/buildout/eggs/six-1.10.0-py2.7.egg:/opt/zope/buildout/eggs/packaging-16.8-py2.7.egg:/opt/zope/buildout/eggs/zope.interface-4.2.0-py2.7-linux-x86_64.egg:/opt/zope/buildout/eggs/zodbpickle-0.6.0-py2.7-linux-x86_64.egg:/opt/zope/buildout/eggs/zc.lockfile-1.0.2-py2.7.egg:/opt/zope/buildout/eggs/ZConfig-3.1.0-py2.7.egg:/opt/zope/buildout/eggs/trollius-2.1-py2.7.egg:/opt/zope/buildout/eggs/futures-3.0.5-py2.7.egg:/opt/zope/buildout/eggs/zdaemon-4.2.0-py2.7.egg:/opt/zope/buildout/eggs/pyparsing-2.2.0-py2.7.egg:’ >> >> import plone.recipe.zeoserver.ctl >> >> if __name__ == '__main__': >> sys.exit(plone.recipe.zeoserver.ctl.main( >> ["-C", '/opt/zope/buildout/parts/zeoserver/etc/zeo.conf'] >> + sys.argv[1:])) >> “”” >> >> /opt/zope/buildout/parts/zeoserver/bin/runzeo looks like this: >> >> “”” >> #!/bin/sh >> # ZEO instance start script >> >> PYTHON="/opt/zope/Python-2.7.13/bin/python2.7" >> INSTANCE_HOME="/opt/zope/buildout/parts/zeoserver" >> ZODB3_HOME="/opt/zope/buildout/eggs/ZEO-5.1.0-py2.7.egg" >> >> CONFIG_FILE="/opt/zope/buildout/parts/zeoserver/etc/zeo.conf" >> >> PYTHONPATH="/opt/zope/buildout/eggs/plone.recipe.zeoserver-1.3.1-py2.7.egg:/opt/zope/buildout/eggs/ZopeUndo-4.1-py2.7.egg:/opt/zope/buildout/eggs/ZODB3-3.11.0-py2.7.egg:/opt/zope/buildout/eggs/zope.mkzeoinstance-3.9.5-py2.7.egg:/opt/zope/buildout/eggs/zc.recipe.egg-2.0.3-py2.7.egg:/opt/zope/buildout/eggs/setuptools-34.3.0-py2.7.egg:/opt/zope/buildout/eggs/zc.buildout-2.8.0-py2.7.egg:/opt/zope/buildout/eggs/transaction-2.1.2-py2.7.egg:/opt/zope/buildout/eggs/BTrees-4.4.1-py2.7-linux-x86_64.egg:/opt/zope/buildout/eggs/persistent-4.2.4-py2.7-linux-x86_64.egg:/opt/zope/buildout/eggs/ZODB-5.2.0-py2.7.egg:/opt/zope/buildout/eggs/ZEO-5.1.0-py2.7.egg:/opt/zope/buildout/eggs/appdirs-1.4.3-py2.7.egg:/opt/zope/buildout/eggs/six-1.10.0-py2.7.egg:/opt/zope/buildout/eggs/packaging-16.8-py2.7.egg:/opt/zope/buildout/eggs/zope.interface-4.2.0-py2.7-linux-x86_64.egg:/opt/zope/buildout/eggs/zodbpickle-0.6.0-py2.7-linux-x86_64.egg:/opt/zope/buildout/eggs/zc.lockfile-1.0.2-py2.7.egg:/opt/zope/buildout/eggs/ZConfig-3.1.0-py2.7.egg:/opt/zope/buildout/eggs/trollius-2.1-py2.7.egg:/opt/zope/buildout/eggs/futures-3.0.5-py2.7.egg:/opt/zope/buildout/eggs/zdaemon-4.2.0-py2.7.egg:/opt/zope/buildout/eggs/pyparsing-2.2.0-py2.7.egg:" >> export PYTHONPATH INSTANCE_HOME >> >> RUNZEO="$ZODB3_HOME/ZEO/runzeo.py" >> >> exec "$PYTHON" "$RUNZEO" -C "$CONFIG_FILE" ${1+"$@“} >> “”” >> >> Thanks for any help! >> >> jens >> >> >> > > -- > Etienne Robillard > [email protected] > http://www.isotopesoftware.ca/ -- You received this message because you are subscribed to the Google Groups "zodb" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
signature.asc
(application/pgp-signature, 801 B)
-----BEGIN PGP SIGNATURE----- iQIcBAEBCgAGBQJY92ePAAoJEMG3TVmYpfZXWWYP/36cDVJ3jP1q80o13i1rnh2i q7XQFKKJgjCBc75vZdDdNSiCzDZ72cY996EUi8eWM46wqTioQdQ22a6PUbvt/OFD XOPn17iKqbHbbRJPkTKW49bsyUAY4S/7Y4H5yjCzcO2amLCilOhJS9Z1XNOGT9HZ 8uy2XVncIUM6SulXSzpB3cpFQRBKlIUDeL15Wbl2xt+YNOOelVK1Lfn46IMFIsLa ra+tIRS+217DM48P/MVKrEBShAY0cANdXIw5wWA9Om6crTSQ7VdoXLHgnXr1DRrU zxsQvPEibN7lfjbG9zzYkSvwpc3KOzHY+4abrX7T2wBnxPhnGo3pvGrTDf4Z8VH6 en+vNEpbenAxbryYImHfhdThRq3Ci/6DWzo/djyvZVmuGITysGuMzyUlv7ODw9sy Cq/oelVwTxus0iNkR8+zdlyo7yHuDDc+60wG73wxHtyhYV6DIKwyDmohmWgNBR3N /ctT1NMuv/LstIW5k0VzuPp+Sb7E1Uo4R9ICV6HNtsNqzajIdvfkgI5ANmlfBxTt 7ctlSQTKbQ90lmCM3D+Rco4USxm4zfTQxG8PO5CfhF2nmEhl9mIDWyKdCFdIn6xt PturWgIwbkvBeWxwODUAuOv52yRVFpAAZGwBb9znMn1PXjFTFSY5tTLAJs9jYpdf ualD5egRto9z3RYsvBfx =5aBO -----END PGP SIGNATURE-----