Questions tagged [systemctl]

systemctl is the main command to control and introspect the systemd Linux init system.

systemd is a system and service manager in Linux. More information about switches and arguments can be found here.

228 questions
12
votes
4 answers

Nginx hangs using "service nginx start"

I've compiled nginx with custom paths for my production server and when I try to start/restart the service using: service nginx start or service nginx restart It enters a new line without returning the shell: So the problem is that I can't…
T0M XeOn LuCiFeR
  • 121
  • 1
  • 1
  • 6
11
votes
4 answers

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.config.reverse_proxy.enabled -v 0 The problem is,…
BenMorel
  • 4,507
  • 10
  • 57
  • 85
11
votes
1 answer

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…
ktopaz
  • 111
  • 1
  • 1
  • 4
9
votes
4 answers

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 running config was before running reload. Also…
red888
  • 4,183
  • 18
  • 64
  • 111
8
votes
2 answers

systemctl complains about no installation config, but it exists

While following this tutorial on installing tomcat on CentOS I came across a problem executing the line sudo systemctl enable tomcat - it complains with the following error message: The unit files have no installation config (WantedBy, RequiredBy,…
corsiKa
  • 383
  • 1
  • 8
  • 19
8
votes
1 answer

"systemctl start service" when service already started

I, what happen's precisely when you run systemctl start apache2 (or other service) while service already started ? Can it cause trouble to start several hundred times a day apache2 service? (to prevent the service from shutting down) or can it use…
user2267379
  • 235
  • 4
  • 8
7
votes
3 answers

systemctl shows service file not-found, even though .service file is present

I am running into a weird issue. I have a service file to start a custom application. systemctl command shows LOAD as not-found resource-service-prod-prod.service not-found active running resource-service-prod-prod.service however, file is…
CVVR
  • 71
  • 1
  • 1
  • 2
7
votes
1 answer

How can I output logs to a file from the content of a service with systemd

Well, I have a service configured with systemctl. This is the config file: [Unit] Description=The description of the service (: After=network.target [Service] ExecStartPre=/bin/echo 'Starting Service' >>…
robe007
  • 223
  • 1
  • 3
  • 9
6
votes
3 answers

systemctl stops Tomcat service immediately after start

I asked first this question on StackOverflow, but it seems that this site is a better fit. I am setting up a web app environment to run Java apps. The environment is supposed to be: AWS EC2 Ubuntu 18 Java 8 Tomcat 9 I launched an EC2 instance and…
yateam
  • 101
  • 1
  • 1
  • 7
6
votes
2 answers

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 service and systemctl keeps asking for my user…
marcanuy
  • 268
  • 1
  • 4
  • 11
6
votes
1 answer

Failed to start nagios.service: Unit nagios.service failed to load: No such file or directory

I have been following this tutorial: $ sudo systemctl start nagios Failed to start nagios.service: Unit nagios.service failed to load: No such file or directory. What is the cause of problem? I have: $ sudo /usr/local/nagios/bin/nagios -v…
Mona Jalal
  • 433
  • 2
  • 5
  • 13
6
votes
2 answers

Weird interaction with systemctl with Haproxy on CentOS 7

Running haproxy through systemctl is different than running it manually. on manual start, everything works. starting through systemctl, haproxy is not able to find the service it proxies, and answers with a 503. Here's the output when starting…
Magnar
  • 1,047
  • 2
  • 11
  • 15
6
votes
2 answers

restarting all specific units on systemctl without for loop?

Is someone here able to start/stop/reload/... a list of units specified with a wildcard or similar method on systemctl? I try do do somethin like: systemctl restart openstack-nova-*.services or systemctl restart openstack-nova-?.services but it's a…
Dr I
  • 955
  • 17
  • 33
5
votes
2 answers

sytemctl status log output

When I run systemctl status with multiple services at once like sudo systemctl status myservice1 myservice2 myservice3 I see the output, but in the end I see lines 1-48/48 (END) or if the output is even larger with more arguments lines 1-62 and I…
lamviec
  • 51
  • 1
5
votes
0 answers

`systemctl disable --now postgresql` doesn't stop the daemon

I'm running Debian Stretch and PostgreSQL 10 from apt.postgresql.org. When I do: postgresql disable --now postgresql the database server doesn't stop. It says: Synchronizing state of postgresql.service with SysV service script with…
x-yuri
  • 2,141
  • 2
  • 24
  • 29
1
2
3
15 16