error while setup erpnext

the command (sudo bash setup_frappe.sh --setup-production)
i found this message

Adding ubuntu mariadb repo
Installing packages for Ubuntu. This might take time…
Reading package lists…
Building dependency tree…
Reading state information…
libxext6 is already the newest version (2:1.3.3-1).
screen is already the newest version (4.3.1-2build1).
git is already the newest version (1:2.7.4-0ubuntu1.3).
libxslt1.1 is already the newest version (1.1.28-2.1ubuntu0.1).
libxslt1.1 set to manually installed.
nginx is already the newest version (1.10.3-0ubuntu0.16.04.2).
vim is already the newest version (2:7.4.1689-3ubuntu1.2).
nodejs is already the newest version (4.2.6~dfsg-1ubuntu4.1).
The following package was automatically installed and is no longer required:
grub-pc-bin
Use ‘sudo apt autoremove’ to remove it.
The following additional packages will be installed:
binutils cpp cpp-5 dpkg-dev fakeroot g++ g+±5 gcc gcc-5 gcc-5-base
icu-devtools libaio1 libalgorithm-diff-perl libalgorithm-diff-xs-perl
libalgorithm-merge-perl libasan2 libatomic1 libc-dev-bin libc6-dev libcc1-0
libcgi-fast-perl libcgi-pm-perl libcilkrts5 libcrypto++9v5 libdbd-mysql-perl
libdbi-perl libdpkg-perl libencode-locale-perl libexpat1-dev libfakeroot
libfcgi-perl libfile-fcntllock-perl libfontenc1 libgcc-5-dev libgomp1
libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl
libhttp-date-perl libhttp-message-perl libicu-dev libio-html-perl libisl15
libitm1 libjemalloc1 liblsan0 liblwp-mediatypes-perl libmariadbclient18
libmpc3 libmpx0 libmysqlclient18 libmysqlclient20 libopts25
libpython-all-dev libpython-dev libpython2.7 libpython2.7-dev libquadmath0
libssl-doc libstdc+±5-dev libstdc++6 libtimedate-perl libtsan0 libubsan0
liburi-perl libxfont1 libxml2-dev linux-libc-dev make manpages-dev
mariadb-client-10.0 mariadb-client-core-10.0 mariadb-server-10.0
mariadb-server-core-10.0 mysql-common python-all python-all-dev python-meld3
python-pip-whl python-pkg-resources python-wheel python2.7-dev redis-tools
ssl-cert x11-common xfonts-encodings xfonts-utils zlib1g-dev
Suggested packages:
binutils-doc cpp-doc gcc-5-locales debian-keyring g+±multilib
g+±5-multilib gcc-5-doc libstdc++6-5-dbg gcc-multilib autoconf automake
libtool flex bison gdb gcc-doc gcc-5-multilib libgcc1-dbg libgomp1-dbg
libitm1-dbg libatomic1-dbg libasan2-dbg liblsan0-dbg libtsan0-dbg
libubsan0-dbg libcilkrts5-dbg libmpx0-dbg libquadmath0-dbg glibc-doc
libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl
libdata-dump-perl libipc-sharedcache-perl icu-doc libstdc+±5-doc
libwww-perl pkg-config make-doc libterm-readkey-perl mailx mariadb-test
tinyca ntp-doc procmail postfix-mysql postfix-pgsql postfix-ldap
postfix-pcre sasl2-bin dovecot-common postfix-cdb mail-reader postfix-doc
python-egenix-mxdatetime python-mysqldb-dbg python-setuptools-doc ruby-redis
openssl-blacklist supervisor-doc xfs | xserver
The following NEW packages will be installed:
binutils build-essential cpp cpp-5 dpkg-dev fakeroot fontconfig g++ g+±5
gcc gcc-5 htop icu-devtools libaio1 libalgorithm-diff-perl
libalgorithm-diff-xs-perl libalgorithm-merge-perl libasan2 libatomic1
libc-dev-bin libc6-dev libcc1-0 libcgi-fast-perl libcgi-pm-perl libcilkrts5
libcrypto+±dev libcrypto++9v5 libdbd-mysql-perl libdbi-perl libdpkg-perl
libencode-locale-perl libexpat1-dev libfakeroot libfcgi-perl
libfile-fcntllock-perl libfontenc1 libgcc-5-dev libgomp1 libhtml-parser-perl
libhtml-tagset-perl libhtml-template-perl libhttp-date-perl
libhttp-message-perl libicu-dev libio-html-perl libisl15 libitm1
libjemalloc1 liblsan0 liblwp-mediatypes-perl libmariadbclient-dev
libmariadbclient18 libmpc3 libmpx0 libmysqlclient18 libmysqlclient20
libopts25 libpython-all-dev libpython-dev libpython2.7 libpython2.7-dev
libquadmath0 libssl-dev libssl-doc libstdc+±5-dev libtimedate-perl libtsan0
libubsan0 liburi-perl libxfont1 libxml2-dev libxrender1 libxslt1-dev
linux-libc-dev make manpages-dev mariadb-client-10.0
mariadb-client-core-10.0 mariadb-common mariadb-server mariadb-server-10.0
mariadb-server-core-10.0 mysql-common ntp postfix python-all python-all-dev
python-dev python-meld3 python-mysqldb python-pip python-pip-whl
python-pkg-resources python-setuptools python-wheel python2.7-dev
redis-server redis-tools ssl-cert supervisor x11-common xfonts-75dpi
xfonts-base xfonts-encodings xfonts-utils zlib1g-dev
The following packages will be upgraded:
gcc-5-base libstdc++6
2 upgraded, 106 newly installed, 0 to remove and 2 not upgraded.
Need to get 114 MB of archives.
After this operation, 442 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
mysql-common mariadb-common libmysqlclient18 libmariadbclient18
mariadb-client-core-10.0 mariadb-client-10.0 mariadb-server-core-10.0
mariadb-server-10.0 libmariadbclient-dev mariadb-server
E: There were unauthenticated packages and -y was used without --allow-unauthenticated

can anyone please help me to setup erpnext?

Same error :frowning:

Can you try running

sudo apt-key update
sudo apt update

And then re-run the script

Ubuntu 16.04

cd ~
apt-get update
apt-get -y upgrade
apt-get install -y python-minimal build-essential python-setuptools
wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
sudo python install.py --production --user frappe --mysql-root-password mariadb_password --admin-password admin_password

after i run the commands
i try sudo bash setup_frappe.sh --setup-production
and it shows (installing wkhtmltopdf)
i dont know it is stopped or will take along or what …?

–2018-02-01 10:40:06-- http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-xenial-amd64.deb
Resolving download.gna.org (download.gna.org)… 78.40.125.79
Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80… failed: Connection timed out.
Retrying.

–2018-02-01 10:42:14-- (try: 2) http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-xenial-amd64.deb
Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80… failed: Connection timed out.
Retrying.

–2018-02-01 10:44:24-- (try: 3) http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-xenial-amd64.deb
Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80… failed: Connection timed out.
Retrying.

–2018-02-01 10:46:34-- (try: 4) http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-xenial-amd64.deb
Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80… failed: Connection timed out.
Retrying.

–2018-02-01 10:48:45-- (try: 5) http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-xenial-amd64.deb
Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80… failed: Connection timed out.
Retrying.

–2018-02-01 10:50:57-- (try: 6) http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-xenial-amd64.deb
Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80… failed: Connection timed out.
Retrying.

–2018-02-01 10:53:11-- (try: 7) http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-xenial-amd64.deb
Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80… failed: Connection timed out.
Retrying.

–2018-02-01 10:55:25-- (try: 8) http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-xenial-amd64.deb
Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80… failed: Connection timed out.
Retrying.

–2018-02-01 10:57:40-- (try: 9) http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-xenial-amd64.deb
Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80… failed: Connection timed out.
Retrying.

–2018-02-01 10:59:56-- (try:10) http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-xenial-amd64.deb
Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80… failed: Connection timed out.
Retrying.

–2018-02-01 11:02:14-- (try:11) http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-xenial-amd64.deb
Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80… failed: Connection timed out.
Retrying.

–2018-02-01 11:04:31-- (try:12) http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-xenial-amd64.deb
Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80… failed: Connection timed out.
Retrying.

–2018-02-01 11:06:48-- (try:13) http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-xenial-amd64.deb
Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80… failed: Connection timed out.
Retrying.

–2018-02-01 11:09:05-- (try:14) http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-xenial-amd64.deb
Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80… failed: Connection timed out.
Retrying.

–2018-02-01 11:11:22-- (try:15) http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-xenial-amd64.deb
Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80… failed: Connection timed out.
Retrying.

–2018-02-01 11:13:40-- (try:16) http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-xenial-amd64.deb
Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80… failed: Connection timed out.
Retrying.

–2018-02-01 11:15:57-- (try:17) http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-xenial-amd64.deb
Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80… failed: Connection timed out.
Retrying.

–2018-02-01 11:18:14-- (try:18) http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-xenial-amd64.deb
Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80… failed: Connection timed out.
Retrying.

–2018-02-01 11:20:31-- (try:19) http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-xenial-amd64.deb
Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80… failed: Connection timed out.
Retrying.

–2018-02-01 11:22:48-- (try:20) http://download.gna.org/wkhtmltopdf/0.12/0.12.2.1/wkhtmltox-0.12.2.1_linux-xenial-amd64.deb
Connecting to download.gna.org (download.gna.org)|78.40.125.79|:80… failed: Connection timed out.
Giving up.

this message appear after install wkhtmltopdf
what next?

It seems that the mirror for your distributions repository is timing out.
can you try choosing a different mirror for apt. Ideally the recent apt should automatically choose the nearest local mirror for you but for some reason it is timing out. This is not the problem of the script.

You can also check if it installs by doing

apt install wkhtmltopdf

@hemapope Also there is no need to execute the setup_frappe.sh install script. The command provided above are sufficiant to get a production setup up and running.

hi @codingCoffee ,
i sis rebuild for the server and run the commands above but the erpnext not working and i found welcom message from ngnix

(Welcome to nginx!
If you see this page, the nginx web server is successfully installed and working. Further configuration is required.

For online documentation and support please refer to nginx.org.
Commercial support is available at nginx.com.

Thank you for using nginx.)

could u please help me

On a black server execute the commands mentioned above and if errors pop up, please post them here

@codingCoffee

i did and last command give this in last

RUNNING HANDLER [mariadb : restart mysql] **************************************
fatal: [localhost]: FAILED! => {“changed”: false, “failed”: true, “msg”: “Unable to restart service mysql: Job for mariadb.service failed because the control process exited with error code. See "systemctl status mariadb.service" and "journalctl -xe" for details.\n”}

RUNNING HANDLER [nginx : restart nginx] ****************************************

RUNNING HANDLER [fail2ban : restart fail2ban] **********************************
to retry, use: --limit @/tmp/.bench/playbooks/site.retry

PLAY RECAP *********************************************************************
localhost : ok=65 changed=42 unreachable=0 failed=1

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

and also welcome message from nginx on the website says (Further configuration is required.)

Try running systemctl status mariadb.service and post the output.
Also which OS are you trying to run this on?

@codingCoffee the os is ubuntu 16.04.4 x32

● mariadb.service - MariaDB 10.2.13 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset:
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: exit-code) since Thu 2018-03-08 12:57:49 UTC; 9min ag
Docs: man:mysqld(8)
systemd - MariaDB Knowledge Base
Process: 19649 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_W
Process: 19365 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VA
Process: 19358 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_STAR
Process: 19356 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/r
Main PID: 19649 (code=exited, status=1/FAILURE)
Status: “MariaDB server is down”

Mar 08 12:57:49 sag systemd[1]: Starting MariaDB 10.2.13 database server…
Mar 08 12:57:49 sag mysqld[19649]: 2018-03-08 12:57:49 3069224896 [Note] /usr/sb
Mar 08 12:57:49 sag mysqld[19649]: 2018-03-08 12:57:49 3069224896 [Warning] Coul
Mar 08 12:57:49 sag systemd[1]: mariadb.service: Main process exited, code=exite
Mar 08 12:57:49 sag systemd[1]: Failed to start MariaDB 10.2.13 database server.
Mar 08 12:57:49 sag systemd[1]: mariadb.service: Unit entered failed state.
Mar 08 12:57:49 sag systemd[1]: mariadb.service: Failed with result ‘exit-code’.
lines 1-21/21 (END)…skipping…
● mariadb.service - MariaDB 10.2.13 database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: failed (Result: exit-code) since Thu 2018-03-08 12:57:49 UTC; 9min ago
Docs: man:mysqld(8)
systemd - MariaDB Knowledge Base
Process: 19649 ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POS
Process: 19365 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`/
Process: 19358 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (co
Process: 19356 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (cod
Main PID: 19649 (code=exited, status=1/FAILURE)
Status: “MariaDB server is down”

Mar 08 12:57:49 sag systemd[1]: Starting MariaDB 10.2.13 database server…
Mar 08 12:57:49 sag mysqld[19649]: 2018-03-08 12:57:49 3069224896 [Note] /usr/sbin/mysqld (mys
Mar 08 12:57:49 sag mysqld[19649]: 2018-03-08 12:57:49 3069224896 [Warning] Could not increase
Mar 08 12:57:49 sag systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FA
Mar 08 12:57:49 sag systemd[1]: Failed to start MariaDB 10.2.13 database server.
Mar 08 12:57:49 sag systemd[1]: mariadb.service: Unit entered failed state.
Mar 08 12:57:49 sag systemd[1]: mariadb.service: Failed with result ‘exit-code’.
~
~
~
~
~
~
~
~
~
~
~
~
~
~

root@sag:~#

shows you that you don’t have a DB service running

To start it, run
sudo systemctl restart mariadb.service

It also looks like you are installing as root (root@sag:~#), which is very dangerous

@trentmu @codingCoffee

this what shows when i run the command sudo systemctl restart mariadb.service

root@sag:~# sudo systemctl restart mariadb.service
Job for mariadb.service failed because the control process exited with error code. See “systemctl status mariadb.service” and “journalctl -xe” for details.
root@sag:~#

and about the root should i make another user and make the above commands

My personal preference would be to create a user called frappe, and run the install as that user

Can you try running on a 64-bit system Ubuntu 16.04

@codingCoffee is right - there are problems with installation of node on 32bit

@codingCoffee
thank you its working now with ubuntu 64 bit

1 Like