Was installing Wordpress along with the LEMP stack following a youtube tutorial here: https://www.youtube.com/watch?v=4beEybPzYqQ.
No errors per step except when running systemctl restart php7.2-fpm nginx returns error:
Job for nginx.service failed because the control process exited with error code.
See "systemctl status nginx.service" and "journalctl -xe" for details.
So, I did systemctl status nginx.service, which returns
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2019-01-09 16:30:12 EET; 34min ago
Docs: man:nginx(8)
Process: 18582 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCE
Process: 18584 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 18583 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 18585 (nginx)
Tasks: 9 (limit: 4915)
CGroup: /system.slice/nginx.service
├─18585 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
And journalctl -xe:
--
-- Unit anacron.service has finished starting up.
--
-- The start-up result is RESULT.
jaan 09 17:04:45 zae anacron[21177]: Anacron 2.3 started on 2019-01-09
jaan 09 17:04:45 zae anacron[21177]: Normal exit (0 jobs run)
jaan 09 17:09:01 zae CRON[21298]: pam_unix(cron:session): session opened for us
jaan 09 17:09:01 zae CRON[21299]: (root) CMD ( [ -x /usr/lib/php/sessionclean
jaan 09 17:09:01 zae systemd[1]: Starting Clean php session files...
-- Subject: Unit phpsessionclean.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit phpsessionclean.service has begun starting up.
jaan 09 17:09:01 zae CRON[21298]: pam_unix(cron:session): session closed for us
jaan 09 17:09:01 zae systemd[1]: Started Clean php session files.
-- Subject: Unit phpsessionclean.service has finished start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit phpsessionclean.service has finished starting up.
--
-- The start-up result is RESULT.
Everything looks fine to me?
I checked syslog but at the time of running systemctl status php7.2-fpm.service it doesn't show anything.
/var/log/nginx/error.log is completely empty for some reason too.
Where should I start looking for the cause of this?
Any help greatly appreciated.
Well. I simply removed all mysql-server, php, nginx related files including dependencies, rebooted... and somehow it works perfectly now.
Related
I am new to OpenVPN and to set up a server I followed this guide. I am using Ubuntu 18.04.4 LTS.
Here is what I get on starting OpenVPN
omayr#x556uqk:~$ sudo systemctl start openvpn#server
Job for openvpn#server.service failed because the control process exited with error code.
See "systemctl status openvpn#server.service" and "journalctl -xe" for details.
Status:
omayr#x556uqk:~$ sudo systemctl status openvpn#server
● openvpn#server.service - OpenVPN connection to server
Loaded: loaded (/etc/systemd/system/openvpn#.service; indirect; vendor preset
Active: activating (auto-restart) (Result: exit-code) since Sat 2020-02-22 23
Docs: man:openvpn(8)
https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage
https://community.openvpn.net/openvpn/wiki/HOWTO
Process: 3740 ExecStart=/usr/sbin/openvpn --daemon ovpn-server --status /run/o
Main PID: 3740 (code=exited, status=1/FAILURE)
I'm trying to run devstack on Ubuntu 16.04 VM using ./stack.sh
+lib/etcd3:start_etcd3:61 sudo systemctl daemon-reload
+lib/etcd3:start_etcd3:62 sudo systemctl enable devstack#etcd.service
Created symlink from /etc/systemd/system/multi-user.target.wants/devstack#etcd.service to
/etc/systemd/system/devstack#etcd.service.
+lib/etcd3:start_etcd3:63 sudo systemctl start devstack#etcd.service
Job for devstack#etcd.service failed because the control process exited with error code. See "systemctl status
devstack#etcd.service" and "journalctl -xe" for details.
+lib/etcd3:start_etcd3:1 exit_trap
+./stack.sh:exit_trap:515 local r=1
++./stack.sh:exit_trap:516 jobs -p
+./stack.sh:exit_trap:516 jobs=
+./stack.sh:exit_trap:519 [[ -n '' ]]
+./stack.sh:exit_trap:525 '[' -f /tmp/tmp.0IwC5vOcG5 ']'
+./stack.sh:exit_trap:526 rm /tmp/tmp.0IwC5vOcG5
+./stack.sh:exit_trap:530 kill_spinner
+./stack.sh:kill_spinner:425 '[' '!' -z '' ']'
+./stack.sh:exit_trap:532 [[ 1 -ne 0 ]]
+./stack.sh:exit_trap:533 echo 'Error on exit'
Error on exit
+./stack.sh:exit_trap:535 type -p generate-subunit
+./stack.sh:exit_trap:536 generate-subunit 1524706916 269 fail
+./stack.sh:exit_trap:538 [[ -z /opt/stack/logs ]]
+./stack.sh:exit_trap:541 /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs
World dumping... see /opt/stack/logs/worlddump-2018-04-26-014626.txt for details
+./stack.sh:exit_trap:550 exit 1
When i the run the command sudo systemctl status devstack#etcd.service:
stack#openstack-demo-vm:/opt/stack/devstack$ sudo systemctl status devstack#etcd.service
● devstack#etcd.service - Devstack devstack#etcd.service
Loaded: loaded (/etc/systemd/system/devstack#etcd.service; enabled; vendor preset: enabled)
Active: inactive (dead) (Result: exit-code) since Thu 2018-04-26 01:46:27 UTC; 1min 27s ago
Process: 122376 ExecStart=/opt/stack/bin/etcd --name openstack-demo-vm --data-dir /opt/stack/data/etcd --initial-
cluster-state new --initial-cluster-token etcd-cluster-01 --initial-cluster openst
Main PID: 122376 (code=exited, status=1/FAILURE)
Apr 26 01:46:26 openstack-demo-vm systemd[1]: devstack#etcd.service: Main process exited, code=exited, status=1/FAILURE
Apr 26 01:46:26 openstack-demo-vm systemd[1]: Failed to start Devstack devstack#etcd.service.
Apr 26 01:46:26 openstack-demo-vm systemd[1]: devstack#etcd.service: Unit entered failed state.
Apr 26 01:46:26 openstack-demo-vm systemd[1]: devstack#etcd.service: Failed with result 'exit-code'.
Apr 26 01:46:27 openstack-demo-vm systemd[1]: devstack#etcd.service: Service hold-off time over, scheduling restart.
Apr 26 01:46:27 openstack-demo-vm systemd[1]: Stopped Devstack devstack#etcd.service.
Apr 26 01:46:27 openstack-demo-vm systemd[1]: devstack#etcd.service: Start request repeated too quickly.
Apr 26 01:46:27 openstack-demo-vm systemd[1]: Failed to start Devstack devstack#etcd.service.
lines 1-14/14 (END)
While etcd runs on the VM:
stack#openstack-demo-vm:/opt/stack/devstack$ systemctl status etcd
● etcd.service - etcd - highly-available key value store
Loaded: loaded (/lib/systemd/system/etcd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2018-04-26 00:12:18 UTC; 1h 58min ago
Docs: https://github.com/coreos/etcd
man:etcd
Main PID: 4425 (etcd)
Tasks: 9
Memory: 9.3M
CPU: 22.020s
CGroup: /system.slice/etcd.service
└─4425 /usr/bin/etcd
What am i missing?
Well, you may simply add the following in your local.conf:
disable_service etcd3
And then, run stack.sh.
Afte some researcha nd asking aroundin Openstack forums and devstack, disabling etcd' instack.sh' helped to resole this.
Steps:
Edit the file /opt/stack/devstack/stach.sh
Comment the below lines (you will find them at around 1035 line)
# Start Services
# ==============
# Dstat
# -----
# A better kind of sysstat, with the top process per time slice
#start_dstat
# Etcd
# -----
# etcd is a distributed key value store that provides a reliable way
to store data across a cluster of machines
#if is_service_enabled etcd3; then
# start_etcd3
#fi
Save the above file.
Run ./unstack.sh
Run ./stack.sh
I have strange problem after I've installed Asterisk on my CentOS server. So, I have used tutorial step-by-step and didn't get any error or warnings. Whole installation went successfully.
When I try to log into Asterisk CLI with asterisk -r I've got this error
[root#asterisk-14.6.1]# asterisk -r
Unable to open specified master config file '/usr/local/etc/asterisk/asterisk.conf', using built-in defaults
Unable to connect to remote asterisk (does /usr/local/var/run/asterisk/asterisk.ctl exist?)
[root#asterisk-14.6.1]#
What does this means? I can't find anything about master config file. My asterisk.conf file is in /etc/asterisk
-rw-r--r-- 1 asterisk asterisk 5332 18 sep 12,15 asterisk.conf
not in '/usr/local/etc/asterisk/asterisk.conf'
Asterisk is 100% running
[root#asterisk-14.6.1]# systemctl status asterisk
● asterisk.service - LSB: Asterisk PBX
Loaded: loaded (/etc/rc.d/init.d/asterisk; bad; vendor preset: disabled)
Active: active (running) since mon 2017-09-18 12:36:16 EEST; 3s ago
Docs: man:systemd-sysv-generator(8)
Process: 33977 ExecStop=/etc/rc.d/init.d/asterisk stop (code=exited, status=0/SUCCESS)
Process: 34000 ExecStart=/etc/rc.d/init.d/asterisk start (code=exited, status=0/SUCCESS)
Main PID: 34025 (asterisk)
CGroup: /system.slice/asterisk.service
├─34023 /bin/sh /usr/sbin/safe_asterisk
└─34025 /usr/sbin/asterisk -f -vvvg -c
sep 18 12:36:16 systemd[1]: Starting LSB: Asterisk PBX...
sep 18 12:36:16 asterisk[34000]: Starting asterisk:
sep 18 12:36:16 systemd[1]: PID file /var/run/asterisk/asterisk.pid not readable (yet?) after start.
sep 18 12:36:16 systemd[1]: asterisk.service: Supervising process 34025 which is not our child. We'll most likely not notice when it exits.
sep 18 12:36:16 systemd[1]: Started LSB: Asterisk PBX.
I have changed also this permissions to asterisk user
[root#asterisk-14.6.1]# ls -l /var/run/asterisk/asterisk.ctl
srwxr-xr-x 1 asterisk asterisk 0 18 sep 12,36
/var/run/asterisk/asterisk.ctl
I was able to log into CLI with asterisk -vvvvc and I can see few errors
Unable to open specified master config file '/usr/local/etc/asterisk/asterisk.conf', using built-in defaults
[Sep 18 12:40:24] ERROR[34584]: logger.c:1823 init_logger: Errors detected in logger.conf. Default console logging is being used.
[Sep 18 12:40:24] WARNING[34584]: loader.c:1293 load_modules: No 'modules.conf' found, no modules will be loaded.
[Sep 18 12:40:24] WARNING[34584]: loader.c:1293 load_modules: No 'modules.conf' found, no modules will be loaded.
You did install with /usr/local/ prefix.
Now you have 2 choices
reinstall, do configure with --prefix=/
or do symlink
mkdir -p /usr/local/etc/
ln -s /etc/asterisk /usr/local/etc/
Running
make samples inside /usr/src/asterisk-<your version> resolved the issue for me
While login to Rstudio Server with my user name and password, I received the following
Rstudio Initilization Error
unable to connect to service
I installed Rstudio Server in the following way:
apt-get install gdebi-core r-base r-base-dev
wget -c https://download2.rstudio.org/rstudio-server-0.99.489-amd64.deb
sudo gdebi rstudio-server-0.99.489-amd64.deb
sudo usermod -a -G rstudio lorencm
sudo service rstudio-server start
id lorencm
uid=1000(lorencm) gid=1000(lorencm) groups=1000(lorencm),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),111(sambashare),999(docker),1001(rstudio)
What did I do wrong?
In my experience this might happen because of permission to your home directory or you don't have any home directory. possibly created by defauly with no home directory.
to solve this, just create a home directory for the username that you are tryin to use or use an exisiting username with valide home directory
usermod -md /home/username username
or just create one
sudo mkdir /home/username
sudo chown -R username /home/username
Good luck
I am running a Fedora server with SELinux, I used cockpit to look at the SELinux logs and could see that the Rhistory file was being blocked for access. In adding in the policy SELinux advised, I was then able to login without any issues.
I was facing same issue & resolved by following:
disabling SELinux and rebooting the server.
The user with which you are logging in should be part of "rstudio-server" group.
rstudio-server:x:986:rconnect_admin
to add that user to rstudio-server group use usermod -a -G rstudio-server <username>
Here is the test process.
I refer to the web page here: disable SELINUX ,
I tested the hypothesis about SELinux.
[testuser#third-test ~]$ sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Memory protection checking: actual (secure)
Max kernel policy version: 31
I changed the directive SELinux=enforcing to SELinux=disabled
[testuser#third-test ~]$ sudo vi /etc/sysconfig/selinux
Then I reboot my system.
[testuser#third-test ~]$ sudo shutdown -r now
Now the SELinux is disabled.
[testuser#third-test ~]$ sestatus
SELinux status: disabled
Then the rstudio-server status looks good.
[testuser#third-test ~]$ sudo rstudio-server status
● rstudio-server.service - RStudio Server
Loaded: loaded (/etc/systemd/system/rstudio-server.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2019-12-12 21:42:54 UTC; 2min 0s ago
Process: 1091 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=0/SUCCESS)
Main PID: 1135 (rserver)
Tasks: 3 (limit: 22408)
Memory: 58.7M
CGroup: /system.slice/rstudio-server.service
└─1135 /usr/lib/rstudio-server/bin/rserver
Dec 12 21:42:54 third-test systemd[1]: Starting RStudio Server...
Dec 12 21:42:54 third-test systemd[1]: Started RStudio Server.
[testuser#third-test ~]$ sudo rstudio-server status
● rstudio-server.service - RStudio Server
Loaded: loaded (/etc/systemd/system/rstudio-server.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2019-12-12 21:42:54 UTC; 3min 37s ago
Process: 1091 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=0/SUCCESS)
Main PID: 1135 (rserver)
Tasks: 8 (limit: 22408)
Memory: 141.0M
CGroup: /system.slice/rstudio-server.service
├─1135 /usr/lib/rstudio-server/bin/rserver
└─1662 /usr/lib/rstudio-server/bin/rsession -u testuser2 --launcher-token A8F380C6
Dec 12 21:42:54 third-test systemd[1]: Starting RStudio Server...
Dec 12 21:42:54 third-test systemd[1]: Started RStudio Server.
Another suggestion:
It's always prefer not to use local authentication for login & use LDAP, Googleauth etc for login to the server.
i experienced the same problem on fedora 32 and then i removed R packages & rstudio-server and reinstall them again and worked fine.
I am trying to install maria db and getting the following issue.
[root#localhost ~]# service mysqld start
Redirecting to /bin/systemctl start mysqld.service
Job for mariadb.service failed. See 'systemctl status mariadb.service' and 'journalctl -xn' for details.
I tried 'systemctl status mariadb.service' and 'journalctl -xn' and follows the details.
[root#localhost ~]# systemctl status mariadb.service
mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled)
Active: failed (Result: exit-code) since Sun 2014-09-21 17:19:44 IST; 23s ago
Process: 2712 ExecStartPost=/usr/libexec/mariadb-wait-ready $MAINPID (code=exited, status=1/FAILURE)
Process: 2711 ExecStart=/usr/bin/mysqld_safe --basedir=/usr (code=exited, status=0/SUCCESS)
Process: 2683 ExecStartPre=/usr/libexec/mariadb-prepare-db-dir %n (code=exited, status=0/SUCCESS)
Main PID: 2711 (code=exited, status=0/SUCCESS)
Sep 21 17:19:42 localhost.localdomain mysqld_safe[2711]: 140921 17:19:42 mysqld_safe Logging to '/var/lib/mysql/localhost.localdomain.err'.
Sep 21 17:19:42 localhost.localdomain mysqld_safe[2711]: 140921 17:19:42 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Sep 21 17:19:43 localhost.localdomain mysqld_safe[2711]: 140921 17:19:43 mysqld_safe mysqld from pid file /var/lib/mysql/localhost.localdoma...d ended
Sep 21 17:19:44 localhost.localdomain systemd[1]: mariadb.service: control process exited, code=exited status=1
Sep 21 17:19:44 localhost.localdomain systemd[1]: Failed to start MariaDB database server.
Sep 21 17:19:44 localhost.localdomain systemd[1]: Unit mariadb.service entered failed state.
[root#localhost ~]# journalctl -xn
-- Logs begin at Sun 2014-09-21 02:33:29 IST, end at Sun 2014-09-21 17:20:11 IST. --
Sep 21 17:16:26 localhost.localdomain systemd[1]: Started dnf makecache.
-- Subject: Unit dnf-makecache.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit dnf-makecache.service has finished starting up.
--
-- The start-up result is done.
Sep 21 17:18:11 localhost.localdomain NetworkManager[683]: <warn> nl_recvmsgs() error: (-33) Dump inconsistency detected, interrupted
Sep 21 17:19:42 localhost.localdomain systemd[1]: Starting MariaDB database server...
-- Subject: Unit mariadb.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mariadb.service has begun starting up.
Sep 21 17:19:42 localhost.localdomain mysqld_safe[2711]: 140921 17:19:42 mysqld_safe Logging to '/var/lib/mysql/localhost.localdomain.err'.
Sep 21 17:19:42 localhost.localdomain mysqld_safe[2711]: 140921 17:19:42 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
Sep 21 17:19:43 localhost.localdomain mysqld_safe[2711]: 140921 17:19:43 mysqld_safe mysqld from pid file /var/lib/mysql/localhost.localdomain.pid end
Sep 21 17:19:44 localhost.localdomain systemd[1]: mariadb.service: control process exited, code=exited status=1
Sep 21 17:19:44 localhost.localdomain systemd[1]: Failed to start MariaDB database server.
-- Subject: Unit mariadb.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit mariadb.service has failed.
--
-- The result is failed.
Sep 21 17:19:44 localhost.localdomain systemd[1]: Unit mariadb.service entered failed state.
Sep 21 17:20:11 localhost.localdomain NetworkManager[683]: <warn> nl_recvmsgs() error: (-33) Dump inconsistency detected, interrupted
Can any one please help?
I have tried uninstalling and installing many a times but received the same error.
Thanks in advance.
Most of the time if the system journal (journalctl) doesn't show what the problem was, the MariaDB error log (located in /var/lib/mysql/localhost.localdomain.err) does. Looking into that file you usually see what the problem is.
Most commonly errors that do not disappear after a reinstallation mean that your data directory (by default /var/lib/mysql/) is corrupted and the database needs to be reinstalled with mysql_install_db. To make sure you do a clean installation, remove all files located in the data directory and then run sudo mysql_install_db --user=mysql.
I solved as follows:
After installing
Run: > mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/
Then: > mysql_secure_installation
And then: systemctl start mariadb
with this this, I can resolved.
A quick update for anyone coming here through a Web search.
I had a "failed to start" message following a Debian 9 -> Debian 10 (Buster) in-place server upgrade, and after a bit of digging I found that the following line in /etc/mysql/my.cnf needed updating:
From:
[mysqld]
: (other stuff)
:
innodb_large_prefix
To:
[mysqld]
: (other stuff)
:
innodb_large_prefix = "ON"
The clue was the following lines in /var/log/mysql/error.log
2020-06-06 16:41:24 0 [ERROR] /usr/sbin/mysqld: option '--innodb-large-prefix' requires an argument
2020-06-06 16:41:24 0 [ERROR] Parsing options for plugin 'InnoDB' failed.
Not sure about your case, But u can check if mariadb/mysql client is deleted accidentally,
Since in my case, I had deleted the mariadb client repo from shared file,So reinstalled the client as,
sudo apt-get install libmariadb-dev
Note: But before installing client do one thing, for rails app just change the mysql version in gemfile and try to install as bundle install mysql2, If its mariadb client issue then it will throw error mentioning that need to install mariadb client or mysql2 client as,
sudo apt-get install libmariadb-dev
OR
sudo apt-get install libmysqlclient-dev
Please refer other answers in case its not mariadb client issue 😊 😜
This is the optimal solution for this problem:
netstat -tulpn | grep LISTEN
Now we need to look for mysqld service.
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 32029/mysqld
now kill the process in my case it is (32029).
kill 32029
Now use systemctl start mariadb.service