One Click Install Script Didn't work #506

Closed
opened 2026-02-04 20:40:11 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @RayBB on GitHub (Nov 27, 2017).

For Bug Reports

Ran the instillation script from here: https://www.bookstackapp.com/docs/admin/installation/

Expected Behavior

Server would run

Current Behavior

Server not running

Steps to Reproduce

Install fresh ubuntu image on vm, run script

After running the script the following text shows:

Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.

Setup Finished, Your BookStack instance should now be installed.
You can login with the email 'admin@admin.com' and password of 'password'
MySQL was installed without a root password, It is recommended that you set a root MySQL password.

You can access your BookStack instance at: http://10.0.2.15/

Running systemctl status nginx.service shows:

ray@ray-VirtualBox:~$ systemctl status nginx.service
● nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2017-11-27 01:44:39 EST; 5min ago
  Process: 16724 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
  Process: 16727 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
 Main PID: 6553 (code=exited, status=0/SUCCESS)

Nov 27 01:44:39 ray-VirtualBox systemd[1]: Starting A high performance web server and a reverse proxy server...
Nov 27 01:44:39 ray-VirtualBox nginx[16727]: nginx: [emerg] invalid number of arguments in "server_name" directive in /etc/nginx/sites-enabled
Nov 27 01:44:39 ray-VirtualBox nginx[16727]: nginx: configuration file /etc/nginx/nginx.conf test failed
Nov 27 01:44:39 ray-VirtualBox systemd[1]: nginx.service: Control process exited, code=exited status=1
Nov 27 01:44:39 ray-VirtualBox systemd[1]: Failed to start A high performance web server and a reverse proxy server.
Nov 27 01:44:39 ray-VirtualBox systemd[1]: nginx.service: Unit entered failed state.
Nov 27 01:44:39 ray-VirtualBox systemd[1]: nginx.service: Failed with result 'exit-code'.

Running journalctl -xe shows

ray@ray-VirtualBox:~$ journalctl -xe
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit nginx.service has finished shutting down.
Nov 27 01:44:39 ray-VirtualBox systemd[1]: Starting A high performance web server and a reverse proxy server...
-- Subject: Unit nginx.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit nginx.service has begun starting up.
Nov 27 01:44:39 ray-VirtualBox nginx[16727]: nginx: [emerg] invalid number of arguments in "server_name" directive in /etc/nginx/sites-enabled
Nov 27 01:44:39 ray-VirtualBox nginx[16727]: nginx: configuration file /etc/nginx/nginx.conf test failed
Nov 27 01:44:39 ray-VirtualBox systemd[1]: nginx.service: Control process exited, code=exited status=1
Nov 27 01:44:39 ray-VirtualBox systemd[1]: Failed to start A high performance web server and a reverse proxy server.
-- Subject: Unit nginx.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit nginx.service has failed.
-- 
-- The result is failed.
Nov 27 01:44:39 ray-VirtualBox systemd[1]: nginx.service: Unit entered failed state.
Nov 27 01:44:39 ray-VirtualBox systemd[1]: nginx.service: Failed with result 'exit-code'.
Nov 27 01:44:39 ray-VirtualBox sudo[1859]: pam_unix(sudo:session): session closed for user root
Nov 27 01:45:10 ray-VirtualBox pkexec[16816]: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Nov 27 01:45:10 ray-VirtualBox pkexec[16816]: pam_systemd(polkit-1:session): Cannot create session: Already running in a session
Nov 27 01:45:10 ray-VirtualBox pkexec[16816]: ray: Executing command [USER=root] [TTY=unknown] [CWD=/home/ray] [COMMAND=/usr/lib/update-notifi
Nov 27 01:45:13 ray-VirtualBox anacron[705]: Job `cron.daily' started
Nov 27 01:45:13 ray-VirtualBox anacron[16828]: Updated timestamp for job `cron.daily' to 2017-11-27
Nov 27 01:45:13 ray-VirtualBox cracklib[16853]: no dictionary update necessary.
Nov 27 01:45:13 ray-VirtualBox /usr/lib/snapd/snapd[739]: snapmgr.go:496: DEBUG: Next refresh scheduled for 2017-11-27 10:20:31.95392786 -0500
Nov 27 01:45:20 ray-VirtualBox anacron[705]: Job `cron.daily' terminated
Nov 27 01:50:13 ray-VirtualBox anacron[705]: Job `cron.weekly' started
Nov 27 01:50:13 ray-VirtualBox anacron[17338]: Updated timestamp for job `cron.weekly' to 2017-11-27
Nov 27 01:50:15 ray-VirtualBox anacron[705]: Job `cron.weekly' terminated

I'll be looking more into the errors soon but wanted to post here to let you know it's not working out of the box.

Originally created by @RayBB on GitHub (Nov 27, 2017). ### For Bug Reports Ran the instillation script from here: https://www.bookstackapp.com/docs/admin/installation/ ##### Expected Behavior Server would run ##### Current Behavior Server not running ##### Steps to Reproduce Install fresh ubuntu image on vm, run script After running the script the following text shows: ``` Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details. Setup Finished, Your BookStack instance should now be installed. You can login with the email 'admin@admin.com' and password of 'password' MySQL was installed without a root password, It is recommended that you set a root MySQL password. You can access your BookStack instance at: http://10.0.2.15/ ``` Running systemctl status nginx.service shows: ``` ray@ray-VirtualBox:~$ systemctl status nginx.service ● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mon 2017-11-27 01:44:39 EST; 5min ago Process: 16724 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS) Process: 16727 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE) Main PID: 6553 (code=exited, status=0/SUCCESS) Nov 27 01:44:39 ray-VirtualBox systemd[1]: Starting A high performance web server and a reverse proxy server... Nov 27 01:44:39 ray-VirtualBox nginx[16727]: nginx: [emerg] invalid number of arguments in "server_name" directive in /etc/nginx/sites-enabled Nov 27 01:44:39 ray-VirtualBox nginx[16727]: nginx: configuration file /etc/nginx/nginx.conf test failed Nov 27 01:44:39 ray-VirtualBox systemd[1]: nginx.service: Control process exited, code=exited status=1 Nov 27 01:44:39 ray-VirtualBox systemd[1]: Failed to start A high performance web server and a reverse proxy server. Nov 27 01:44:39 ray-VirtualBox systemd[1]: nginx.service: Unit entered failed state. Nov 27 01:44:39 ray-VirtualBox systemd[1]: nginx.service: Failed with result 'exit-code'. ``` Running journalctl -xe shows ``` ray@ray-VirtualBox:~$ journalctl -xe -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit nginx.service has finished shutting down. Nov 27 01:44:39 ray-VirtualBox systemd[1]: Starting A high performance web server and a reverse proxy server... -- Subject: Unit nginx.service has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit nginx.service has begun starting up. Nov 27 01:44:39 ray-VirtualBox nginx[16727]: nginx: [emerg] invalid number of arguments in "server_name" directive in /etc/nginx/sites-enabled Nov 27 01:44:39 ray-VirtualBox nginx[16727]: nginx: configuration file /etc/nginx/nginx.conf test failed Nov 27 01:44:39 ray-VirtualBox systemd[1]: nginx.service: Control process exited, code=exited status=1 Nov 27 01:44:39 ray-VirtualBox systemd[1]: Failed to start A high performance web server and a reverse proxy server. -- Subject: Unit nginx.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit nginx.service has failed. -- -- The result is failed. Nov 27 01:44:39 ray-VirtualBox systemd[1]: nginx.service: Unit entered failed state. Nov 27 01:44:39 ray-VirtualBox systemd[1]: nginx.service: Failed with result 'exit-code'. Nov 27 01:44:39 ray-VirtualBox sudo[1859]: pam_unix(sudo:session): session closed for user root Nov 27 01:45:10 ray-VirtualBox pkexec[16816]: pam_unix(polkit-1:session): session opened for user root by (uid=1000) Nov 27 01:45:10 ray-VirtualBox pkexec[16816]: pam_systemd(polkit-1:session): Cannot create session: Already running in a session Nov 27 01:45:10 ray-VirtualBox pkexec[16816]: ray: Executing command [USER=root] [TTY=unknown] [CWD=/home/ray] [COMMAND=/usr/lib/update-notifi Nov 27 01:45:13 ray-VirtualBox anacron[705]: Job `cron.daily' started Nov 27 01:45:13 ray-VirtualBox anacron[16828]: Updated timestamp for job `cron.daily' to 2017-11-27 Nov 27 01:45:13 ray-VirtualBox cracklib[16853]: no dictionary update necessary. Nov 27 01:45:13 ray-VirtualBox /usr/lib/snapd/snapd[739]: snapmgr.go:496: DEBUG: Next refresh scheduled for 2017-11-27 10:20:31.95392786 -0500 Nov 27 01:45:20 ray-VirtualBox anacron[705]: Job `cron.daily' terminated Nov 27 01:50:13 ray-VirtualBox anacron[705]: Job `cron.weekly' started Nov 27 01:50:13 ray-VirtualBox anacron[17338]: Updated timestamp for job `cron.weekly' to 2017-11-27 Nov 27 01:50:15 ray-VirtualBox anacron[705]: Job `cron.weekly' terminated ``` I'll be looking more into the errors soon but wanted to post here to let you know it's not working out of the box.
Author
Owner

@Shackelford-Arden commented on GitHub (Nov 27, 2017):

So, I'll chime in here as I've had this problem every time I use the script. It seems to get Apache installed somewhere in the script so Apache is up and running instead of Nginx. I've had to disable/uninstall Apache and then enable Nginx post-script to get it all working. I'm currently writing my own edition of the script and will share it soon :P

@Shackelford-Arden commented on GitHub (Nov 27, 2017): So, I'll chime in here as I've had this problem every time I use the script. It seems to get Apache installed somewhere in the script so Apache is up and running instead of Nginx. I've had to disable/uninstall Apache and then enable Nginx post-script to get it all working. I'm currently writing my own edition of the script and will share it soon :P
Author
Owner

@obeardly commented on GitHub (Nov 30, 2017):

If you're building a fresh BookStack system, you could always use Devuan and my install script.

https://files.devuan.org/devuan_jessie.torrent

https://github.com/obeardly/devops/blob/master/scripts/installation-devuan-1.0.0.sh

I can verify that this install script works on Devuan. The only thing I've not been able to get working in LDAP (Samba) authentication.

@obeardly commented on GitHub (Nov 30, 2017): If you're building a fresh BookStack system, you could always use Devuan and my install script. https://files.devuan.org/devuan_jessie.torrent https://github.com/obeardly/devops/blob/master/scripts/installation-devuan-1.0.0.sh I can verify that this install script works on Devuan. The only thing I've not been able to get working in LDAP (Samba) authentication.
Author
Owner

@RayBB commented on GitHub (Dec 13, 2017):

@obeardly unfortunately, I'm trying to run it on a vps that's limited to Debian. Also, the same reason I can't use the docker image (vps is on an older kernel).

@Shackelford-Arden any luck getting that script working.

@RayBB commented on GitHub (Dec 13, 2017): @obeardly unfortunately, I'm trying to run it on a vps that's limited to Debian. Also, the same reason I can't use the docker image (vps is on an older kernel). @Shackelford-Arden any luck getting that script working.
Author
Owner

@obeardly commented on GitHub (Dec 13, 2017):

@RayBB Devuan is based on Debian. In fact, it still pulls a majority of the packages from the Debian ecosystem. I migrated all of my Debian Wheezy/Jessie production servers to Devuan. Just change the apt sources list. If it's already running Debian Jessie, you'll have to manually remove systemd so it will rebuild the dependencies properly, but I had no issues with it. If this server is already production, I would be careful, but as I said, I migrated all of mine without issue. YMMV.

@obeardly commented on GitHub (Dec 13, 2017): @RayBB Devuan is based on Debian. In fact, it still pulls a majority of the packages from the Debian ecosystem. I migrated all of my Debian Wheezy/Jessie production servers to Devuan. Just change the apt sources list. If it's already running Debian Jessie, you'll have to manually remove systemd so it will rebuild the dependencies properly, but I had no issues with it. If this server is already production, I would be careful, but as I said, I migrated all of mine without issue. YMMV.
Author
Owner

@ssddanbrown commented on GitHub (Sep 23, 2018):

Since the last comment on this issue is relatively old I'm going to close this. If the issue remains and is something you still require to be fixed please comment and this can be reopened if required.

Just as an extra note, I think this may have been fixed in BookStackApp/devops/pull/7 and the Ubuntu 18.04 script is set-up to use Apache by default so should avoid this issue. Sorry for the lack of reply at the time.

@ssddanbrown commented on GitHub (Sep 23, 2018): Since the last comment on this issue is relatively old I'm going to close this. If the issue remains and is something you still require to be fixed please comment and this can be reopened if required. Just as an extra note, I think this may have been fixed in BookStackApp/devops/pull/7 and the [Ubuntu 18.04 script](https://github.com/BookStackApp/devops/blob/master/scripts/installation-ubuntu-18.04.sh) is set-up to use Apache by default so should avoid this issue. Sorry for the lack of reply at the time.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#506