I always get this error with easy install

i awlway get this err with easy install

TASK [common : install pillow prerequisites for Ubuntu < 14.04] **************************************************
task path: /tmp/.bench/playbooks/roles/common/tasks/ubuntu.yml:3
[DEPRECATION WARNING]: Invoking “apt” only once while using a loop via squash_actions is deprecated. Instead of
using a loop to supply multiple items and specifying pkg: "{{ item }}", please use pkg: ['libjpeg8-dev', 'libtiff4-dev', 'tcl8.5-dev', 'tk8.5-dev'] and remove the loop. This feature will be removed in version 2.11.
Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
fatal: [localhost]: FAILED! => {
“msg”: “The conditional check ‘ansible_distribution_version | version_compare(‘14.04’, ‘lt’)’ failed. The error was: template error while templating string: no filter named ‘version_compare’. String: {% if ansible_distribution_version | version_compare(‘14.04’, ‘lt’) %} True {% else %} False {% endif %}\n\nThe error appears to be in ‘/tmp/.bench/playbooks/roles/common/tasks/ubuntu.yml’: line 3, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: install pillow prerequisites for Ubuntu < 14.04\n ^ here\n”
}

PLAY RECAP *******************************************************************************************************
localhost : ok=4 changed=1 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0

Traceback (most recent call last):
File “install.py”, line 413, in
install_bench(args)
File “install.py”, line 135, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 327, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python3.5/subprocess.py”, line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=erpnext’]’ returned non-zero exit status 2

Ubuntu 16.04 lts
new installation
apt update and upgrade done
fix ip
on virtualbox last version of it

I am also having the same issue on both Ubuntu 16.04 / Ubuntu 18.04 server, installed on my VM

Can anyone help with this issue ?

TASK [common : install pillow prerequisites for Ubuntu < 14.04] *****************
task path: /tmp/.bench/playbooks/roles/common/tasks/ubuntu.yml:3
[DEPRECATION WARNING]: Invoking “apt” only once while using a loop via
squash_actions is deprecated. Instead of using a loop to supply multiple items
and specifying pkg: "{{ item }}", please use pkg: ['libjpeg8-dev', 'libtiff4-dev', 'tcl8.5-dev', 'tk8.5-dev'] and remove the loop. This feature
will be removed in version 2.11. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
fatal: [localhost]: FAILED! => {
“msg”: “The conditional check ‘ansible_distribution_version | version_compare (‘14.04’, ‘lt’)’ failed. The error was: template error while templating string: n o filter named ‘version_compare’. String: {% if ansible_distribution_version | ve rsion_compare(‘14.04’, ‘lt’) %} True {% else %} False {% endif %}\n\nThe error ap pears to be in ‘/tmp/.bench/playbooks/roles/common/tasks/ubuntu.yml’: line 3, col umn 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n \nThe offending line appears to be:\n\n\n- name: install pillow prerequisites for Ubuntu < 14.04\n ^ here\n”
}

PLAY RECAP **********************************************************************
localhost : ok=4 changed=1 unreachable=0 failed=1 sk ipped=1 rescued=0 ignored=0

Traceback (most recent call last):
File “install.py”, line 413, in
install_bench(args)
File “install.py”, line 135, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 327, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site .yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=twinkli ng’]’ returned non-zero exit status 2

Am also having the same problem on Ubuntu 18.4.

Can any one please help. !!

After secular battles, we’ve just managed to install v12 on Ubuntu 18.04 so we followed the flow from here: Fool proof install - step by step - #19 by loftwah

And then we fixed a few things:

permission error
SUDO chown -cR erpnext:erpnext /home/erpnext/.cache
find . -type f -exec SUDO chmod 0644 {} \;
# correct folder permissions
find . -type d -exec chmod 0755 {} \;permission error
SUDO chown -cR erpnext:erpnext /home/erpnext/.cache
find . -type f -exec SUDO chmod 0644 {} \;
# correct folder permissions
find . -type d -exec chmod 0755 {} \;

database cannot connect error

sudo service mysql restart

Login to Mysql & follow the command

mysql -u root

use mysql

select * from mysql where user = 'root'; - Look at the top to determine whether the password column is called password or authentication_string

UPDATE mysql.user set password_field from above = PASSWORD('your_new_password') where user = 'root' and host = 'localhost'; - Use the proper password column from above

SELECT User, Host, plugin FROM user;

If Plugin is not mysql_native_password, then set the plugin by the below command

UPDATE user SET plugin='mysql_native_password', password=PASSWORD('XXX') WHERE User='root';
FLUSH PRIVILEGES;
exit;database cannot connect error

sudo service mysql restart

Login to Mysql & follow the command

mysql -u root

use mysql

select * from mysql where user = 'root'; - Look at the top to determine whether the password column is called password or authentication_string

UPDATE mysql.user set password_field from above = PASSWORD('your_new_password') where user = 'root' and host = 'localhost'; - Use the proper password column from above

SELECT User, Host, plugin FROM user;

If Plugin is not mysql_native_password, then set the plugin by the below command

UPDATE user SET plugin='mysql_native_password', password=PASSWORD('XXX') WHERE User='root';
FLUSH PRIVILEGES;
exit;

redis connection refused error

bench setup production erpnextredis connection refused error
bench setup production erpnext

Kudos to @szufisher for the amazing job and dedication!

I submitted a bug request for this. Please submit your comments and +1 there.
https://github.com/frappe/erpnext/issues/19486

This might be the problem? This notes “In 2.5 version_compare was renamed to version”

@Goeppert @Mestoof @tanuj82685 what do you get for this?

(env) frappe@ubuntu:~/frappe-bench$ ansible --version
ansible 2.4.1.0

sudo ansible --version
ansible 2.9.0

I fixed this by replacing the following line in install.py

'pip': "sudo pip install --upgrade setuptools cryptography ansible pip"

with

'pip': "sudo pip install --upgrade setuptools cryptography ansible==2.8.5.0 pip"

Thanks @clarkej for the clue.

1 Like

i changed all ansible_distribution_version | version_compare to ansible_distribution_version is version according to ansible they changed version_compare with version function but now i am stuck with the mysql error access denied for roo@localhost using password No

I used this solution

extracted from Guide: Manual Install ERPNext on Ubuntu 17.xx & 18.xx - #3 by Parag_Kapoor

Parag_Kapoor
May '18
Database Login Issues
In some cases Database may not login, to rectify the issue Please Follow below steps

sudo vim /etc/mysql/my.cnf

Add the following lines at the end:

[mysqld]

skip-grant-tables

Then Restart the service

sudo service mysql restart

Login to Mysql & follow the command

mysql -u root

use mysql

select * from mysql where user = ‘root’; - Look at the top to determine whether the password column is called password or authentication_string

UPDATE mysql.user set password_field from above = PASSWORD(‘your_new_password’) where user = ‘root’ and host = ‘localhost’; - Use the proper password column from above

SELECT User, Host, plugin FROM user;

If Plugin is not mysql_native_password, then set the plugin by the below command

UPDATE user SET plugin=‘mysql_native_password’ WHERE User=‘root’;
FLUSH PRIVILEGES;
exit;

Remove the skip-grant-tables from /etc/mysql/my.cnf, restart the service & it’s Done

1 Like

Am getting this error now

Installing frappe…
Updating DocTypes for frappe : [========================================]
Traceback (most recent call last):
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/redis/connecti on.py”, line 484, in connect
sock = self._connect()
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/redis/connecti on.py”, line 541, in _connect
raise err
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/redis/connecti on.py”, line 529, in _connect
sock.connect(socket_address)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/redis/client.p y”, line 2879, in execute
return execute(conn, stack, raise_on_error)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/redis/client.p y”, line 2749, in _execute_transaction
connection.send_packed_command(all_cmds)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/redis/connecti on.py”, line 585, in send_packed_command
self.connect()
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/redis/connecti on.py”, line 489, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to localhost:11000. Conne ction refused.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/redis/connecti on.py”, line 484, in connect
sock = self._connect()
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/redis/connecti on.py”, line 541, in _connect
raise err
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/redis/connecti on.py”, line 529, in _connect
sock.connect(socket_address)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3.6/runpy.py”, line 193, in _run_module_as_main
main”, mod_spec)
File “/usr/lib/python3.6/runpy.py”, line 85, in _run_code
exec(code, run_globals)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, lin e 97, in
main()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py”, lin e 18, in main
click.Group(commands=commands)(prog_name=‘bench’)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py” , line 764, in call
return self.main(*args, **kwargs)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py” , line 717, in main
rv = self.invoke(ctx)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py” , line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py” , line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py” , line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py” , line 555, in invoke
return callback(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 32, in new_site
db_type=db_type)
File “/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py”, line 73, in _new_site
_install_app(app, verbose=verbose, set_as_patched=not source_sql)
File “/home/frappe/frappe-bench/apps/frappe/frappe/installer.py”, line 92, in install_app
frappe.get_attr(after_install)()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/install.py”, line 19, in after_install
install_basic_docs()
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/install.py”, line 77, in install_basic_docs
frappe.get_doc(d).insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 25 9, in insert
self.run_post_save_methods()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 91 9, in run_post_save_methods
self.run_method(“on_update”)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 78 7, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 10 58, in composer
return composed(self, method, *args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 10 41, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 78 1, in
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py”, line 93, in on_update
self.share_with_self()
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py”, line 177, in share_with_self
flags={“ignore_share_permission”: True})
File “/home/frappe/frappe-bench/apps/frappe/frappe/share.py”, line 44, in add
notify_assignment(user, doctype, name, everyone)
File “/home/frappe/frappe-bench/apps/frappe/frappe/share.py”, line 171, in not ify_assignment
enqueue_create_notification(shared_by, notification_doc)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/doctype/notification_l og/notification_log.py”, line 38, in enqueue_create_notification
now=frappe.flags.in_test
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1475, in enqueue
return frappe.utils.background_jobs.enqueue(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py”, line 69, in enqueue
kwargs=queue_args)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/queue.py”, line 258, in enqueue_call
job = self.enqueue_job(job, at_front=at_front)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/rq/queue.py”, line 331, in enqueue_job
pipe.execute()
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/redis/client.p y”, line 2894, in execute
return execute(conn, stack, raise_on_error)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/redis/client.p y”, line 2749, in _execute_transaction
connection.send_packed_command(all_cmds)
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/redis/connecti on.py”, line 585, in send_packed_command
self.connect()
File “/home/frappe/frappe-bench/env/lib/python3.6/site-packages/redis/connecti on.py”, line 489, in connect
raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to localhost:11000. Conne ction refused.

this my error now.

in next window use command

bench start

and then run

bench migrate

or

bench new-site

I used bench setup production fixed the error

@parthdt

PLAY RECAP *******************************************************************************************************
localhost : ok=4 changed=1 unreachable=0 failed=1 skipped=1 rescued=0 ignored=0

Traceback (most recent call last):
File “install.py”, line 413, in
install_bench(args)
File “install.py”, line 135, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 327, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python3.5/subprocess.py”, line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2

I also have this error. The Easyinstall script keeps failing. (Ubuntu 18.04)

RUNNING HANDLER [mariadb : restart mysql] **************************************
task path: /tmp/.bench/playbooks/roles/mariadb/handlers/main.yml:2

PLAY RECAP *********************************************************************
localhost : ok=30 changed=20 unreachable=0 failed=1 skipped=21 rescued=0 ignored=0

Traceback (most recent call last):
File “install.py”, line 413, in
install_bench(args)
File “install.py”, line 135, in install_bench
run_playbook(‘site.yml’, sudo=True, extra_vars=extra_vars)
File “install.py”, line 327, in run_playbook
success = subprocess.check_call(args, cwd=os.path.join(cwd, ‘playbooks’))
File “/usr/lib/python2.7/subprocess.py”, line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ansible-playbook’, ‘-c’, ‘local’, ‘site.yml’, ‘-vvvv’, ‘-e’, ‘@/tmp/extra_vars.json’, ‘–become’, ‘–become-user=frappe’]’ returned non-zero exit status 2
erp@erp:~$

Issue was closed, but the error persists (further along the installation though)