New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not connect to ZEO server for packing #99

Closed
tmassman opened this Issue Oct 8, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@tmassman

tmassman commented Oct 8, 2017

Hi,

I'm running Plone and with the latest upgrade to 5.1b4 ZEO 5.1.0 is used which depends on trollius as a Python 2.7 backport of asyncio. Since that I get the following errors when trying to pack the ZODB:

plone.recipe.zeoserver.pack ERROR Could not connect to zeoserver. Please make sure it is running.
trollius ERROR Exception in callback done_connecting(<Task ca....py:562>>) at /opt/plone/default/5.1b4/buildout-cache/eggs/ZEO-5.1.0-py2.7.egg/ZEO/asyncio/client.py:127
handle: <Handle done_connecting(<Task ca....py:562>>) at /opt/plone/default/5.1b4/buildout-cache/eggs/ZEO-5.1.0-py2.7.egg/ZEO/asyncio/client.py:127>
Traceback (most recent call last):
  File "/opt/plone/default/5.1b4/buildout-cache/eggs/trollius-2.1-py2.7.egg/trollius/events.py", line 136, in _run
    self._callback(*self._args)
  File "/opt/plone/default/5.1b4/buildout-cache/eggs/ZEO-5.1.0-py2.7.egg/ZEO/asyncio/client.py", line 129, in done_connecting
    if future.exception() is not None:
  File "/opt/plone/default/5.1b4/buildout-cache/eggs/trollius-2.1-py2.7.egg/trollius/futures.py", line 299, in exception
    raise CancelledError
CancelledError

or

plone.recipe.zeoserver.pack ERROR Could not connect to zeoserver. Please make sure it is running.
concurrent.futures ERROR exception calling callback for <Future at 0x7f9f3064f890 state=finished returned list>
Traceback (most recent call last):
  File "/opt/plone/default/5.1b4/buildout-cache/eggs/futures-3.1.1-py2.7.egg/concurrent/futures/_base.py", line 301, in _invoke_callbacks
    callback(self)
  File "/opt/plone/default/5.1b4/buildout-cache/eggs/trollius-2.1-py2.7.egg/trollius/futures.py", line 449, in <lambda>
    new_future._copy_state, future))
  File "/opt/plone/default/5.1b4/buildout-cache/eggs/trollius-2.1-py2.7.egg/trollius/base_events.py", line 496, in call_soon_threadsafe
    handle = self._call_soon(callback, args)
  File "/opt/plone/default/5.1b4/buildout-cache/eggs/trollius-2.1-py2.7.egg/trollius/base_events.py", line 470, in _call_soon
    self._check_closed()
  File "/opt/plone/default/5.1b4/buildout-cache/eggs/trollius-2.1-py2.7.egg/trollius/base_events.py", line 297, in _check_closed
    raise RuntimeError('Event loop is closed')
RuntimeError: Event loop is closed

I'm using buildout to configure my setup and this is the zeoserver part:

###############################################################################
# ZEO-Server
# -----------------------------------------------------------------------------
# Use this section to install and configure a Zope Enterprise Objects server.
# For options see http://pypi.python.org/pypi/plone.recipe.zeoserver
[zeoserver]
recipe = plone.recipe.zeoserver
zeo-address = 127.0.0.1:8100

# If we try to start as root, Zope will switch to the user below.
effective-user = ${buildout:effective-user}

environment-vars = ${buildout:environment-vars}

# Set storage.
var = ${buildout:var-dir}
blob-storage = ${buildout:var-dir}/blobstorage

# Put the log, pid and socket files in var/zeoserver.
zeo-log     = ${buildout:var-dir}/zeoserver/zeoserver.log
pid-file    = ${buildout:var-dir}/zeoserver/zeoserver.pid
socket-name = ${buildout:var-dir}/zeoserver/zeo.zdsock

The generated script looks like this:

#!/opt/plone/default/Python-2.7/bin/python2.7

import sys
sys.path[0:0] = [
  '/opt/plone/default/5.1b4/buildout-cache/eggs/plone.recipe.zeoserver-1.4.0-py2.7.egg',
  '/opt/plone/default/5.1b4/buildout-cache/eggs/ZopeUndo-4.2-py2.7.egg',
  '/opt/plone/default/5.1b4/buildout-cache/eggs/zope.mkzeoinstance-4.1-py2.7.egg',
  '/opt/plone/default/5.1b4/buildout-cache/eggs/ZODB3-3.11.0-py2.7.egg',
  '/opt/plone/default/5.1b4/buildout-cache/eggs/zc.recipe.egg-2.0.3-py2.7.egg',
  '/opt/plone/default/Python-2.7/lib/python2.7/site-packages',
  '/opt/plone/default/5.1b4/buildout-cache/eggs/ZEO-5.1.0-py2.7.egg',
  '/opt/plone/default/5.1b4/buildout-cache/eggs/ZODB-5.2.4-py2.7.egg',
  '/opt/plone/default/5.1b4/buildout-cache/eggs/zdaemon-4.2.0-py2.7.egg',
  '/opt/plone/default/5.1b4/buildout-cache/eggs/transaction-2.1.2-py2.7.egg',
  '/opt/plone/default/5.1b4/buildout-cache/eggs/BTrees-4.4.1-py2.7-linux-x86_64.egg',
  '/opt/plone/default/5.1b4/buildout-cache/eggs/persistent-4.2.4.2-py2.7-linux-x86_64.egg',
  '/opt/plone/default/5.1b4/buildout-cache/eggs/trollius-2.1-py2.7.egg',
  '/opt/plone/default/5.1b4/buildout-cache/eggs/futures-3.1.1-py2.7.egg',
  '/opt/plone/default/5.1b4/buildout-cache/eggs/zope.interface-4.4.0-py2.7-linux-x86_64.egg',
  '/opt/plone/default/5.1b4/buildout-cache/eggs/ZConfig-3.1.0-py2.7.egg',
  '/opt/plone/default/5.1b4/buildout-cache/eggs/zc.lockfile-1.2.1-py2.7.egg',
  '/opt/plone/default/5.1b4/buildout-cache/eggs/six-1.10.0-py2.7.egg',
  '/opt/plone/default/5.1b4/buildout-cache/eggs/zodbpickle-0.6.0-py2.7-linux-x86_64.egg',
  ]

username = None
blob_dir = "/opt/plone/default/var/blobstorage"
realm = None
storage = "1"
days = "1"
unix = None
address = "127.0.0.1:8100"
host = "127.0.0.1"
password = None
port = "8100"
import getopt; opts = getopt.getopt(sys.argv[1:], 'S:B:D:W1')[0];
opts = dict(opts)
storage = opts.has_key('-S') and opts['-S'] or storage
blob_dir = opts.has_key('-B') and opts['-B'] or blob_dir
days = opts.has_key('-D') and opts['-D'] or days


import plone.recipe.zeoserver.pack

if __name__ == '__main__':
    sys.exit(plone.recipe.zeoserver.pack.main(host, port, unix, days, username, password, realm, blob_dir, storage))

Any hints what could be wrong?

@tmassman tmassman changed the title from Can not connect o ZEO server for packing to Can not connect to ZEO server for packing Oct 8, 2017

@kiorky

This comment has been minimized.

Show comment
Hide comment
@kiorky

kiorky Dec 17, 2017

We reproduce the exact same problem here.

cc @tdesvenain @Gagaro @qdelance

kiorky commented Dec 17, 2017

We reproduce the exact same problem here.

cc @tdesvenain @Gagaro @qdelance

@mamico

This comment has been minimized.

Show comment
Hide comment
@mamico

mamico Dec 17, 2017

Member

IMHO is a bug on plone.recipe.zeoserver, not here.
I had with zeopack script the same problem reported here, but using

parts/instance/bin/interpreter eggs/ZEO-5.1.0-py2.7.egg/ZEO/scripts/zeopack.py 127.0.0.1:8086

all work fine for me.

Member

mamico commented Dec 17, 2017

IMHO is a bug on plone.recipe.zeoserver, not here.
I had with zeopack script the same problem reported here, but using

parts/instance/bin/interpreter eggs/ZEO-5.1.0-py2.7.egg/ZEO/scripts/zeopack.py 127.0.0.1:8086

all work fine for me.

@tmassman

This comment has been minimized.

Show comment
Hide comment
@tmassman

tmassman Dec 18, 2017

@mamico, thanks for finding the cause for this error!

tmassman commented Dec 18, 2017

@mamico, thanks for finding the cause for this error!

@tmassman tmassman closed this Dec 18, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment