I have a problem when trying to install Let’s Encryption by using bench.
I got this error when I ran command “sudo bench setup lets-encrypt erp.mysite.com”
Here is an errors
Running this will stop the nginx service temporarily causing your sites to go offline
Do you want to continue? [y/N]: y
INFO:bench.utils:sudo systemctl stop nginx
INFO:bench.utils:/opt/certbot-auto --config /etc/letsencrypt/configs/erp.mysite.com.cfg certonly
Bootstrapping dependencies for RedHat-based OSes… (you can skip this with --no-bootstrap)
yum is /bin/yum
yum is hashed (/bin/yum)
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package gcc-4.8.5-28.el7_5.1.x86_64 already installed and latest version
Package augeas-libs-1.4.0-5.el7_5.1.x86_64 already installed and latest version
Package 1:openssl-1.0.2k-12.el7.x86_64 already installed and latest version
Package 1:openssl-devel-1.0.2k-12.el7.x86_64 already installed and latest version
Package libffi-devel-3.0.13-18.el7.x86_64 already installed and latest version
Package redhat-rpm-config-9.1.0-80.el7.centos.noarch already installed and latest version
Package ca-certificates-2018.2.22-70.0.el7_5.noarch already installed and latest version
Package python-devel-2.7.5-69.el7_5.x86_64 already installed and latest version
Package python-virtualenv-15.1.0-2.el7.noarch already installed and latest version
Package python-tools-2.7.5-69.el7_5.x86_64 already installed and latest version
Package python2-pip-8.1.2-6.el7.noarch already installed and latest version
Nothing to do
Creating virtual environment…
Traceback (most recent call last):
File “/usr/lib/python2.7/site-packages/virtualenv.py”, line 2327, in
main()
File “/usr/lib/python2.7/site-packages/virtualenv.py”, line 712, in main
symlink=options.symlink)
File “/usr/lib/python2.7/site-packages/virtualenv.py”, line 944, in create_environment
download=download,
File “/usr/lib/python2.7/site-packages/virtualenv.py”, line 900, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File “/usr/lib/python2.7/site-packages/virtualenv.py”, line 796, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /opt/eff.org/certbot/venv/bin/python2.7 - setuptools pip wheel failed with error code 1
INFO:bench.utils:sudo systemctl start nginx
There was a problem trying to setup SSL for your site
I try to remove “/etc/letsencrypt/configs/*.cfg” before run above command, it’s still not work.
Hey could you tell me how I can check the wheel settings?
I too have these problems setting up letsencrypt.
Here is my output:
Lets ENcrypt Error
[root@MyERP frappe-bench]# sudo bench setup lets-encrypt erp.mydomain.com
Running this will stop the nginx service temporarily causing your sites to go offline
Do you want to continue? [y/N]: y
INFO:bench.utils:sudo systemctl stop nginx
INFO:bench.utils:/opt/certbot-auto --config /etc/letsencrypt/configs/erp.mydomain.com.cfg certonly
Bootstrapping dependencies for RedHat-based OSes… (you can skip this with --no-bootstrap)
yum is /bin/yum
yum is hashed (/bin/yum)
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
updates: mirror.imt-systems.com
Package gcc-4.8.5-28.el7_5.1.x86_64 already installed and latest version
Package augeas-libs-1.4.0-5.el7_5.1.x86_64 already installed and latest version
Package 1:openssl-1.0.2k-12.el7.x86_64 already installed and latest version
Package 1:openssl-devel-1.0.2k-12.el7.x86_64 already installed and latest version
Package libffi-devel-3.0.13-18.el7.x86_64 already installed and latest version
Package redhat-rpm-config-9.1.0-80.el7.centos.noarch already installed and latest version
Package ca-certificates-2018.2.22-70.0.el7_5.noarch already installed and latest version
Package python-devel-2.7.5-69.el7_5.x86_64 already installed and latest version
Package python-virtualenv-15.1.0-2.el7.noarch already installed and latest version
Package python-tools-2.7.5-69.el7_5.x86_64 already installed and latest version
Package python2-pip-8.1.2-6.el7.noarch already installed and latest version
Nothing to do
Creating virtual environment…
Traceback (most recent call last):
File “/usr/lib/python2.7/site-packages/virtualenv.py”, line 2327, in
main()
File “/usr/lib/python2.7/site-packages/virtualenv.py”, line 712, in main
symlink=options.symlink)
File “/usr/lib/python2.7/site-packages/virtualenv.py”, line 944, in create_environment
download=download,
File “/usr/lib/python2.7/site-packages/virtualenv.py”, line 900, in install_wheel
call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
File “/usr/lib/python2.7/site-packages/virtualenv.py”, line 796, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /opt/eff.org/certbot/venv/bin/python2.7 - setuptools pip wheel failed with error code 1
INFO:bench.utils:sudo systemctl start nginx There was a problem trying to setup SSL for your site
Normally you would not do this from root. On initial server setup your would create a new user (in this case frappe) and then do all ERPNext/Frappe install & operation from the frappe user account. Read this tut for more info.
You should always disable root login.
Once user frappe has been added to wheel and you have logged into server as frappe you shouldn’t receive this issue.
You are also running an old version of pip. Install the latest version with:
Disabled root, added frappe user to wheel.
Currently I upgraded to V11.
I havent done the upgrade of pip so far - why is there not the newest build in the setup process?
Do I have to upgrade pip now? Everything is working fine now except ssl and I dont want to start from scratch now - that’s why I want to make sure that this is the next step.
Just checking that:
Your registrars zone file has an A record added to it erp.mydomain.com pointing to your Digital ocean droplet IP.
Digital Ocean droplet settings are all erp.mydomain.com
Your erpnext site is called erp.mydomain.com
From within your droplet /frappe-bench/ folder you call sudo -H bench setup lets-encrypt erp.mydomain.com
Updating pip shouldn’t harm anything. Before you do this can you post the results you get from:
python2.7 -V
and nvm --version
and npm -v
and node -v
I haven’t used the frappe installer in a long while so npm or nvm might not show up as installed depending on how it is currently configured.
Im not sure why but even sudo yum update/grade doesn’t fully update some python/node modules.
I answered this issue in another post on this forum about a year ago
This is an annoying bash setting…
The short answer is:
$ sudo nano /etc/profile.d/bashrc.sh
Add the line below
export PS1="\u@\h:\w$:”
save / exit file
$ exit
close terminal window and ssh in again and all should look good.
Let’s find the root cause of the issue. Can you execute the sudo systemctl start nginx and systemctl status application.service?
If there’re error then post the error traceback so that someone can assist you to fix error.
Thanks for helping me with this, I installed now nvm and edited the file according to your suggestion - tought this would prevent the “Hey! USE SCREEN” Message but even if I change a typo? "\u@\h:\w$:” to " this seems not to work.
Anyway here is the latest output:
HEY! USE SCREEN -bash-4.2$ sudo systemctl start nginx
HEY! USE SCREEN -bash-4.2$ systemctl status application.service Unit application.service could not be found.
HEY! USE SCREEN -bash-4.2$