Questions tagged [systemctl]

systemctl is used to control the systemd system and service manager.

systemctl can be used to control the systemd system/service manager.

Reference: http://www.dsm.fordham.edu/cgi-bin/man-cgi.pl?topic=systemctl

503 questions
14
votes
1 answer

unit falling into a failed state (status=143) when stopping service

here is my problem. I have CentOS and java process running on it. Java process is operated by the start/stop script. It creates a .pid file of java instance too. My unit file is looking like: [Unit] After=syslog.target…
sergei
  • 402
  • 1
  • 5
  • 14
13
votes
2 answers

How to pass environment variables to a service started by systemd

I have a nodeJS service built using NodeJs. This service requires some environment variables to be passed to it. Moreover, I created a systemd unit file to start it from systemctl. For some weird reasons, the service, when started with systemctl,…
Nicolas El Khoury
  • 5,867
  • 4
  • 18
  • 28
12
votes
2 answers

systemctl strange error: Invalid arguments

Here's my service file: [Unit] Description=Daphne Interface [Service] ExecStartPre=cd /home/git/hsfzmun/server ExecStart=/bin/bash/ -c "cd /home/git/hsfzmun/server && /home/git/virtualenvs/hsfzmun/bin/daphne -b 0.0.0.0 -p 8001 -v2…
hsfzxjy
  • 1,242
  • 4
  • 14
  • 22
10
votes
1 answer

Systemctl - Failed at step Group spawning

I have a problem with automatic running of service. I would like to run a script after user login. Once I have succeeded, however when I tried to automatize it, I'm getting an error and I can't find a mistake. Service: Description=Service…
JiangHongTiao
  • 858
  • 2
  • 8
  • 29
10
votes
1 answer

How do I create a systemd service that doesn't start on reboot?

I want to create a systemd service which I can start manually by using systemctl start but I don't want it to run automatically when the system reboots. How do I do this?
babueverest
  • 443
  • 1
  • 6
  • 17
9
votes
3 answers

How to execute a scp command before reboot or shutdown?

I want to upload file before reboot or shutdown. 1.From my vps to vps Setting for upload.service vim /etc/systemd/system/upload.service [Unit] Description=upload files into my vps Before=shutdown.target…
showkey
  • 482
  • 42
  • 140
  • 295
9
votes
2 answers

running python script as a systemd service

I have a python script myScript.py which is writing on a file every 2 second. But when I want to run this script as a systemd service, service works but not writing on file. I created a myscript.service file on /lib/systemd/system/ and designed as…
pala9323
  • 211
  • 1
  • 3
  • 6
8
votes
3 answers

core-dump error when trying to run asp .netcore app under Ubuntu 16.04

I'm trying to run my asp .net core app as a service under Ubuntu 16.04. I've created service configuration following this documentation [Unit] Description=TNW Main Service [Service] WorkingDirectory=/home/tnw ExecStart=/usr/bin/dotnet…
BąQ
  • 296
  • 1
  • 3
  • 13
8
votes
5 answers

ansible: how to restart auditd service on centos 7 get error about dependency

In my playbook, i have a task to update audit.rules and then notify a handler which should restart the auditd service. task: - name: 6.6.7 - audit rules configuration template: src=X/ansible/templates/auditd_rules.j2 …
Matzuba
  • 333
  • 2
  • 4
  • 8
8
votes
2 answers

Node.js script failed to start with systemctl

I need to run my node.js script automatically from my remote machine with systemctl. I already made a .service file and put that into /etc/systemd/system/. Here's the .service…
Edgar P.
  • 129
  • 1
  • 1
  • 7
8
votes
2 answers

Operation not permitted systemctl with docker + systemctl

Dockerfile FROM centos:7 ENV container docker VOLUME ["/sys/fs/cgroup"] RUN yum -y update RUN yum install -y httpd RUN systemctl start httpd.service ADD . /code WORKDIR /code docker-compose.yml version: '2' services: web: privileged: true …
JoeLoco
  • 2,116
  • 4
  • 31
  • 59
7
votes
0 answers

New DAGs / Changes to DAGs not being picked up by Airflow

Problem : New DAGs or changes to existing DAGs are not showing up on Airflow web server to use in the App. For example. Suppose I add a new DAG in the DAG directory: What does work: If I run $ airflow dags list then the dag does show up. Similarly…
robertwest
  • 904
  • 7
  • 13
7
votes
0 answers

How to upgrade systemd to a specific version in ubuntu v18.04?

I am using Ubuntu version 18.04.3 LTS (Bionic Beaver). The default version of systemd with this version of ubuntu is 237. I am need to upgrade systemd to version 239. What is the recommended procedure to do this upgrade safely? Thanks.
D.prd
  • 605
  • 1
  • 7
  • 21
7
votes
1 answer

What return code does systemctl status return for an error in systemctl status (not the underlying service)?

http://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic.html#INISCRPTACT According to this systemctl status has a special list of return codes which return information about the service you're querying. If the status action…
Jazzepi
  • 5,259
  • 11
  • 55
  • 81
7
votes
1 answer

Failed to start nginx.service: Unit not found

I installed the latest version of nginx and configured some directories: ./configure --sbin-path=/usr/bin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --with-pcre…
sir-haver
  • 3,096
  • 7
  • 41
  • 85
1
2
3
33 34