Error after os upgrade Ubuntu 17.04

Hello,

I have upgraded the os to Ubuntu 17.04 and erpnext / frappe is not working and showing sorry we will…

i have checked the worker.error.log and the last lines after bench restart are:

File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/redis/connection.py", line 538, in send_packed_command
    self.connect()
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/redis/connection.py", line 442, in connect
    self.connect()
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/redis/connection.py", line 442, in connect
    raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to localhost:11000. Connection refused.
    self.connect()
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/redis/connection.py", line 442, in connect
    raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to localhost:11000. Connection refused.
    raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to localhost:11000. Connection refused.

i tried bench update --patch and it returns:

/home/frappe/frappe-bench/env/bin/python: libmysqlclient.so.18: cannot open shared object file: No such file or directory

Hi, Reinstalling mysqlclient should fix this.
Please backup
In you bench folder run

./env/bin/pip uninstall mysqlclient
./env/bin/pip install mysqlclient

Thanks

Hi @Ranjith,

I had the same problem after upgrading my Debian from Jessie to Stretch and your solution worked for me.

Thanks !

1 Like

I tried it no errors but still getting the same error on bench commands

/home/frappe/frappe-bench/env/bin/python: libmysqlclient.so.18: cannot open shared object file: No such file or directory

Maybe try this -

pip uninstall mysql-python
apt-get install libmysqlclient-dev
pip install mysql-python

You will find the above here Error while installing erpnext bench init frappe-bench && cd frappe-bench - #3 by ninjas

Just tried it out but still getting the same error, i rebooted and restarted mysql service but still no success.

If you are on MacOS that may explain the problem?

Excuse me you are on Ubuntu!

Maybe try apt-get install python-mysqldb ?
Also try bench update --requirements to check your python virtual env.
Then do ./env/bin/pip list and check that these 2 python packages are installed :

  • MySQL-python (1.2.5)
  • mysqlclient (1.3.12)

There is a complete thread here to check your packages :

1 Like

I am on ubuntu

1 Like

There is a problem with the frappe requirements on Debian 9 : if you run bench update --requirements it changes the regular mysqlclient 1.3.12 to the one of this project :

And we get the error back in Debian 9, I 've just send a PR :

https://github.com/frappe/frappe/pull/4393

1 Like

Hey britlog, i did update the requirements and now im using 1.3.10 but when i try bench update it shows the error while trying to connect to the database to back databases up.

Backing up sites...
/home/frappe/frappe-bench/env/bin/python: libmysqlclient.so.18: cannot open shared object file: No such file or directory