Questions tagged [systemctl]
systemctl is the main command to control and introspect the systemd Linux init system.
238
questions
0
votes
1
answer
259
views
Centos 7 HA firewall/router systemctl ospfd
I'm trying to create an HA firewall/router pair using keepalived (VRRP only), conntrackd, and OSFP under quagga, all installed as the standard Centos & packages. This is similar to the setup ...
0
votes
0
answers
60
views
How to get whole log info?
To get the upload service's log info.
sudo journalctl -l -u upload
-- Logs begin at Thu 2018-01-18 22:38:54 EST, end at Fri 2018-04-13 23:44:37 EDT. --
Apr 13 23:36:50 localhost systemd[1]: Started ...
0
votes
2
answers
1k
views
start sevices after boot complete in linux mint
I am using linux mint 18.3 Sylvia.
My system is taking a long time to boot, as I found a lot of services are running at start up. What I am asking is there any way I could start those services after ...
0
votes
0
answers
408
views
How to keep Ubuntu systemctl process alive after disconnecting from shell?
I'm new to Ubuntu, and I want to run a (java maven) command which starts a web server embedded with my web application, on a remote Ubuntu server.
I can run it with following bash command (typed ...
2
votes
1
answer
7k
views
Tomcat restarts even after explicit shutdown
I needed to set up an Ubuntu server based Tomcat server and I followed this well written post. Everything works great. Ran into an odd behavior though; I needed to stop the Tomcat server, so I used ...
1
vote
2
answers
1k
views
Running systemd units in user space in debian
I'm trying to setup a unit to run on Debian Stretch under a regular user. I connect to it over ssh.
I first did this as root (username being the user in question):
# loginctl enable-linger username
...
21
votes
6
answers
107k
views
Redis not starting with systemctl
I have installed redis on an ubuntu 16.04 machine and if I run /usr/local/bin/redis-server /etc/redis/cluster/7000/redis.conf it starts up and I can connect to it without issues.
However I want to ...
2
votes
1
answer
5k
views
Permission denied to tor hidden service directory on CentOS after service restart
I have installed tor from EPEL on a fresh installed CentOS7 (minimal).
After configuring a hidden service I check and validate that the service is up and running by browsing the URL generated in ...
2
votes
0
answers
4k
views
vsftpd failing to start
I have tried solutions presented in the following posts:
https://unix.stackexchange.com/questions/364529/centos-vsftpd-not-starting/364555
https://superuser.com/questions/987912/why-my-vsftp-service-...
12
votes
7
answers
64k
views
How to enable systemd on Amazon Linux AMI
I started using Amazon Linux AMIs. It seems to have the /etc/systemd/system/ folder, but I am not able to use systemctl to start stop a service I added to the /etc/systemd/system/ folder.
$ systemctl
...
11
votes
4
answers
30k
views
systemctl start trafficserver wait for start
I have a script that installs and sets up traffic server:
yum install -y trafficserver
systemctl start trafficserver
traffic_line -s proxy.config.url_remap.remap_required -v 0
traffic_line -s proxy....
0
votes
1
answer
3k
views
'systemctl restart service' not working on CentOS 7
I have a custom service managed by an init script in /etc/init.d and, after upgrading to CentOS 7, with systemd, 'systemctl restart service' is not working correctly. I need to execute two times '...
4
votes
1
answer
949
views
Show custom exit status in systemctl
I would like to show a custom message when someone runs systemctl status and the script has failed.
Systemd seems to have a few built in.
If I have a script that runs exit 200 systemctl status will ...
0
votes
0
answers
707
views
systemd php script output only to systemctl status
i'm trying to run a php script 24/7 with systemd. the terminal output of the script is normally irrelevant so i set 'StandardOutput=0' and 'StandardError=0' to not mess logfiles with gigabytes of data....
0
votes
1
answer
12k
views
Behaviour of systemd services on reboot
On a Debian 8 I have deployed an application of mine that consists of several smaller apps and one of those smaller ones uses a HDF5 file. The problem with HDF5 files is that you have to close them. ...
0
votes
1
answer
1k
views
systemctl start works, but systemctl enable fails with realpath() error
I'm trying to set up a simple uwsgi service named project on Vagrant, Ubuntu 16.04.
It should start a simple Flask app that Nginx can talk to.
I can get the service to work when running
systemctl ...
0
votes
1
answer
2k
views
how to get systemctl status on remote machine
when we run this on remote machine we get
ssh $IP "systemctl disable iptables.service"
and standard error is
echo $?
0
but lets run it with error ( I add wrong syntax )
for example
ssh $IP "...
0
votes
1
answer
343
views
start firewalld.service VIA ssh
we have very strange problem when we configure and start the firewall on remote machine
when we run VIA ssh the following command ( from bash script ) ,
we have redhat 7 machine
systemctl start ...
11
votes
1
answer
37k
views
Systemd: Supervising process XXXX which is not our child. We'll most likely not notice when it exits
I've created a custom service file which looks like this:
cat /etc/systemd/system/aaa.service
[Unit]
Description=aaa main application
After=syslog.target network-online.target
[Service]
Type=...
105
votes
3
answers
66k
views
What is the difference between service and systemctl?
Maybe this is a trivial question, but it is not totally clear to me. On one of our servers we have some background processes running which were started with service and some others which were started ...
2
votes
2
answers
3k
views
Is it possible to extend the WantedBy systemd unit property?
I have a unit file and I want to modify some of the properties. I've been able to extend all the properties using the /etc/systemd/system/unitname.service.d/ directory but cannot get the WantedBy ...
6
votes
2
answers
30k
views
Unable to restart a systemctl service remotely as a non root user
I have a systemd.socket named gunicorn.socket which I would like to restart after updating some code on a remote server.
I've followed the steps detailed in Allowing a non-root user to restart a ...
0
votes
3
answers
4k
views
Disable maintenance mode from within recovery (Debian)
My rootserver's power supply died the day before and the hoster had to replace it. Since then, the server does not boot correctly anymore. Because of the sudden powerloss, it starts right in some kind ...
9
votes
4
answers
38k
views
How do I know if systemctl daemon-reload needs to be run
Is there a way to know the current running config is outdated? Is there a way to view the current running config and compare it to the file?
It would be valuable for troubleshooting to know what the ...
2
votes
0
answers
509
views
How can I troubleshoot a systemctl maintained daemon, on Oracle Linux 7, when it dies immediately after being spawned?
I'm trying to run jenkins, via systemctl, and it keeps dying immediately after being started. There is nothing in the "systemctl status" nor in "journalctl". Jenkins logs also show nothing.
I've ...
0
votes
0
answers
228
views
services in CentOS e.g. nginx, php-fpm doesn't include symbolic link configuration files
I have 2 services in CentOS 7
- nginx
- php-fpm
Those services have main configuration to include *.conf in certain directory.
However, it didn't read the symbolic link file in that certain ...
5
votes
1
answer
22k
views
fail to enable mysqld service but after reboot the service is running on centos 7
After I installed, I run systemctl enable mysqld.service.
Then, the output is:
Failed to execute operation: Too many levels of symbolic links
After this error, I reboot my service, and I check the ...
0
votes
1
answer
726
views
Disabling MariaDb on Debian jessie doesn't work
I have MariaDb installed on Debian jessie. I need to remove it from automatic system startup. I tried recommended commands but they did not work:
root@debian:/home/gameboy# systemctl disable mysql
...
4
votes
1
answer
18k
views
Mongodb doesn't start using systemctl
When I try to start the mongo service(systemctl start mongodb) I get this error in journalctl:
Mar 21 15:36:18 redhat7 systemd[1]: Started High-performance, schema-free document-oriented database.
...
0
votes
1
answer
778
views
CentOS service shows up twice in process list
I need to sync a directory between two servers and decided to create a service which listens to changes in a file and runs rsync.
/usr/lib/systemd/system/mediasync.service
[Unit]
Description=...
0
votes
2
answers
11k
views
Main process exited, code=exited, status=7/NOTRUNNING
I have a node application, running via a systemd service on Ubuntu 16.04
However, after some time the service is getting restarted automatically.
Here's what I get in the logs:
Mar 17 14:35:10 ...
5
votes
1
answer
3k
views
CentOS 7: Fresh Install Firewalld doesn't work at all (Fatal Error: No IPv4 and IPv6 firewall)
I have the following problem.
I just did an DVD CenOS 7 installation. After I boot into the system I normally login as the root user. From there I'm trying to configure Firewall on my server.
As I'm ...
2
votes
2
answers
3k
views
Why my service restarted every 90 seconds?
I'm working with Ubuntu Server 16.04.
Here's the .service file:
[Unit]
Description=NoDescpt
[Service]
ExecStart=/home/git/cmd/daphnei
Restart=always
KillSignal=SIGQUIT
Type=notify
NotifyAccess=all
...
4
votes
1
answer
4k
views
Systemd service: Failed to issue method call: Unit service failed
I am trying to make a custom service in my VPS. However, it doesn't let me to run it. It says the following. I am not sure what is going on but when I run it on my Ubuntu laptop, it works properly. ...
1
vote
1
answer
3k
views
systemctl unable to start red5 init.d script on ubuntu 16.04
I tried to build and install systemd script for red5-server on ubuntu 16.04 server.
I found the sample init.d script at https://gist.github.com/akarambir/a40163f163ae8b131be8 and downloaded
I named ...
0
votes
1
answer
604
views
With syslog-ng how can I reset an environment variable without losing log messages?
On this system, imagine that there is a program that detects whether or not it is day or night and sets and environment variable DAY. My environment variable DAY is picked up and used in this working ...
3
votes
1
answer
7k
views
Failed to get properties: Activation of org.freedesktop.systemd1 timed out
Getting the below error while running systemctl status commands in my RHEL 7 linux server.
# systemctl status docker.service
Failed to get properties: Activation of org.freedesktop.systemd1 timed out
...
2
votes
2
answers
862
views
Redis runs on OpenSuse 42.1, but throws many errors, How do I fix?
Installed Redis 3.2.4 on OpenSuse 42.1 with package manager. The machine has 16GB of memory.
Did these steps to get running. (I would like to run as deamon, but havent changed the settings.)
cp ...
1
vote
0
answers
2k
views
Failed to get D-Bus connection: connection refused [duplicate]
I'm having a hard issue on a server, and I get no clue of what is happening nor where to search to debug it.
Here is my problem :
When I run any command such as :
systemctl start httpd.service
or
...
74
votes
4
answers
241k
views
failed to get D-Bus connection: Operation not permitted
I'm trying to list services on my CentOS image running in Docker using
systemctl list-units
but I get this error message:
Failed to get D-Bus connection: Operation not permitted
Any suggestions ...
3
votes
2
answers
42k
views
Trouble creating PID file in systemd service script [duplicate]
I'm trying to get RipRight installed on Debian, for which there doesn't appear to be any pre-built package. I'm having difficulty getting a systemd script working to start/stop RipRight running as a ...
4
votes
1
answer
3k
views
Why does `systemctl start myservice` not fork this service?
I have written a systemd service.
When I run systemctl start foo.service, the service starts and runs correctly, but systemctl does not return immediately to the shell.
After a while it exits with
...
2
votes
2
answers
37k
views
can't stop mysql/mariadb with `systemctl stop`
EDIT it started working by itself. I can't see how to delete or flag this question.
Mariadb is up and running on CentOS 7
$ ps aux | grep mysqld
mysql 4249 0.0 9.0 841448 89576 pts/0 Sl ...
3
votes
0
answers
2k
views
Ubuntu 16.04 Systemd not possible to use systemctl
I have a Ubuntu 16.04 server, since the last restart,
systemctl doesn't work anymore.
For example if I want to start the nginx, I get the following error:
root@SERVER:/# systemctl start nginx
...
0
votes
2
answers
6k
views
Ubuntu 16 server, systemctl restart elasticsearch does nothing, and there's no log
On ubuntu 16 lts server system, a newly installed elasticsearch instance won't start up with systemctl restart elasticsearch (or with start).
No logs are created, manually running /usr/share/...
1
vote
0
answers
2k
views
How to run a docker image as a systemctl service?
I'm following the instructions here, using 'docker run'.
I came up with the following. The container starts, and then stops. What am I missing? For that matter, systemctl status shows me the tail of ...
0
votes
2
answers
778
views
How to invoke sudo command such as systemctl via remote ssh
I'm trying to set up a deployment pipeline that involves invoking systemctl to start and stop services. I have a shell script on the server that invokes systemctl and my build server will be invoking ...
51
votes
5
answers
54k
views
How to allow a user to use journalctl to see user-specific systemd service logs?
I am running user-level services in Ubuntu 16.04 LTS. For example, I have my test.service located at ~/.config/systemd/user/test.service.
I was able to run the service by doing
systemctl --user start ...
1
vote
0
answers
8k
views
systemd killing process on start after timeout period
I got a daemon in centos 7 that I'm trying to setup for execution on boot via systemd. The daemon is a binary (c source) that does a fork and change of id/group.
The trouble I'm having is systemd ...
17
votes
1
answer
53k
views
What is the meaning of holdoff time over in systemd services?
I have installed Puppet Enterprise on CentOS 7. I can see that several Puppet services fail to start saying holdoff time over. What does this mean?
Sep 03 20:50:16 l-pm1 systemd[1]: pe-puppetdb....