Plone Start and buildout doesn't work after migration to new server

We are on the way to migrate all our Plone Sites to a new Linux Server.
After having rsynced to Zope Instances to the new server we tried to start them with
./bin/plonectl start
Then we get the message:
Traceback (most recent call last):
File "./bin/plonectl", line 10, in
import plone.recipe.unifiedinstaller.ctl
File "/home/users/mlpd/Plone5_mlpd_dev/buildout-cache/eggs/plone.recipe.unifiedinstaller-4.3.2-py2.7.egg/plone/recipe/unifiedinstaller/init.py", line 3, in
import zc.recipe.egg
ImportError: No module named recipe.egg

When we try a buildout, it does work with this message:
Traceback (most recent call last):
File "./bin/buildout", line 6, in
from zc.buildout.buildout import main
File "/home/users/mlpd/Plone5_mlpd_dev/zinstance/local/lib/python2.7/site-packages/zc/buildout/buildout.py", line 17, in
from zc.buildout.rmtree import rmtree
File "/home/users/mlpd/Plone5_mlpd_dev/zinstance/local/lib/python2.7/site-packages/zc/buildout/rmtree.py", line 18, in
import doctest
File "/usr/lib/python2.7/doctest.py", line 99, in
import unittest, difflib, pdb, tempfile
File "/usr/lib/python2.7/unittest/init.py", line 64, in
from .main import TestProgram, main
File "/usr/lib/python2.7/unittest/main.py", line 7, in
from . import loader, runner
File "/usr/lib/python2.7/unittest/runner.py", line 7, in
from .signals import registerResult
File "/usr/lib/python2.7/unittest/signals.py", line 2, in
import weakref
File "/usr/lib/python2.7/weakref.py", line 14, in
from _weakref import (
ImportError: cannot import name _remove_dead_weakref

When we make new PLONE Installation on the new server, it works fine, so the basic requirements should be there. (?)
The old Linux Version was Debian 8.11, the new one is Debian 10

Any Hints? Thank you.

It is related to the python venv, try to recreate it or replace the python binary in the bin directory:

1 Like

Thanks a lot Yuri,
replacing the python binary in the bin directory with the locally installed python made it.

1 Like

But in meantime we have another Problem:
After copying more PLONE Instances from the old to the new server (and replacing the python binary) those Instances that have PLONE 5 bring the error listed below when starting ./bin/plonectl fg, while the PLONE 4 instances work fine.
Error messages:
"2021-07-07 18:26:22 ERROR Application Could not import Products.ATContentTypes"
... Traceback ...
"ImportError: /home/users/mlpd/Plone5_newlinux/buildout-cache/eggs/lxml-3.5.0-py2.7-linux-x86_64.egg/lxml/etree.so: undefined symbol: PyFPE_jbuf"

I coud not find any explanation for that.

reinstalling local lxml should solve it. Maybe using buildout o pip uninstall/install. Check this:

How can I make reinstalling local lxml ?
Buildout did not help.
lxml is globally installed in /usr/lib/python2.7/dist-packages.
I hhave no experience with virtual_env

Delete this and re-run buildout, it should download it again and rebuild it:

/home/users/mlpd/Plone5_newlinux/buildout-cache/eggs/lxml-3.5.0-py2.7-linux-x86_64.egg/

Note: make a copy/backup, every disclaimer apply.

1 Like

Yes, that was it. Now it works.
Thanks a lot Yuri.

1 Like

Glad I actually helped someone :slight_smile:

1 Like