Questions tagged as ['services']

Daemons are programs that constantly run in the background. They usually service requests. If you are asking about online services, please use a different tag.
Score: 0
Salem Albadwi avatar
No Error with Cron but does not work
rw flag

I have written a simple python script that sends notifications using Pushbullet. The command works perfectly in the terminal but does not work automatically. The syslog for Cron:

Nov 29 18:33:01 ubuntu CRON[4255]: (root) CMD (usr/bin/python3 IdeaProjects/TradingScript/src/test.py >/dev/null 2>&1)

Nov 29 18:34:01 ubuntu CRON[4266]: (root) CMD (/usr/bin/python3 IdeaProjects/TradingScript/s ...
Score: 0
ahmed alobaidy avatar
Quagga, Zebra routing manager daemon does not start
cn flag

When I run zebra.service start I get an error saying the unit file changed and it does not start:

errors attempting to start the service

unit file contents

Score: 0
S Andrew avatar
Linux systemd service not restarting automatically?
cn flag

I have below systemd service:

[Unit]
Description=Python Code
Requisite=mosquitto.service
BindsTo=mosquitto.service

[Service]
Type=simple
User=andrew
ExecStart=/usr/bin/python3 /home/andrew/Documents/main.py
Restart=always
RestartSec=10s
StandardOutput=null

[Install]
WantedBy=multi-user.target

Above service is running fine. As mentioned above, it depends on mosquitto so if mosquitto stops, service ...

Score: 0
user8314628 avatar
How to access HTTP service by typing IP address in Firefox?
cn flag

enter image description here

enter image description here

My ip is 192.168.142.128. But I can't access it. I'm running Ubuntu in Virtualbox.

How can I fix this?

Score: 0
Hayk avatar
Does "service" command use "systemctl" command in core?
cn flag

Man page of service command: For systemd units, start, stop, status, and reload are passed through to their systemctl/initctl equivalents.

Does this mean for systemd units the service command use systemctl?

Score: 0
How to harden security on services in ubuntu?
in flag

I was auditing my computer (with lynis) and then I saw that I have bad security on almost all of my services when I run "sudo systemd-analyze security SERVICE". I was wondering if there was a way to harden them, how do I do it? Also is there a way to auto harden them?

Thanks to everyone who helps :)!

Score: 0
error: sudo service apache2 start Job for apache2.service failed because the control process exited with error code
ng flag

after editing the file "/etc/apache2/sites-available/default-ssl.conf", I noticed that my site was running much slower, so I rewrote the file from 0 with this (htps:/gist.github.com/hephaestus9/2a8562137841c99a74cb) which should be the original file. After that, the terminal, when launching the command "sudo service apache2 start", gave this error message "sudo service apache2 start Job for apache2.serv ...

Score: 2
Error running systemd as user - Failed to connect to bus: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined
sr flag

I have a script that is running as root and am trying to have it setup a user service to run an IPFS daemon. The problem is that I need to enable the service as the user rather than as root. It usually works after a restart but I'd like to avoid that if I can.

The service script is located at ~/.config/systemd/user/ipfs.service

It contains:

[Unit]
Description=IPFS daemon

[Service]
# Environment="IPFS_PA ...
Score: 1
ijk avatar
Using rTorrent UI while running as daemon
st flag
ijk

I have rTorrent running as a daemon on my headless server, but I can't access the UI in any obvious way per the config or instructions online. I'd like to be able to pass in magnet links and manage the current torrent files using the UI, but be able to let it run seeding/downloading torrents outside of my ssh session. Unless I'm missing something obvious, I see three options for how to address this prob ...

Score: 3
How to make service A stop if service B crashes or stops
cn flag

Using system-d: I have 2 services (Service A and Service B). Service B needs Service A to always be running. If service A ever crashes or is stopped, Service B should also be immediately stopped until service A is restored (At which point in time service B should start back up automatically). Is there a directive that can be put into the system.d unit files to force this type of a relationship?

 ...

Score: 0
VikasPushkar avatar
Set Gsetting proxy setting in golang
jp flag

I have my golang program running as root service and I am trying to set the proxy setting using the gsettings command in my program. I am able to read these settings in my golang program using the following command code in golang:

u, erru:= user.Lookup("dimdimuser")
if erru != nil {
    return "",fmt.Errorf("unknown user info")
}
uid, err = strconv.ParseInt(u.Uid, 10, 32)
gid, err = strconv.ParseInt(u ...
Score: 0
Omid Shojaee avatar
SoftEther service is not starting
jm flag

I've followed this guide 3 times and every time I've destroyed the VM and started fresh.

SoftEther service is not starting automatically after reboot. Manual start works fine.

I'm not a seasoned Ubuntu admin, so please help me to find out how to check the log to see if there's any startup error.

Thanks.

Score: 0
DoImagine avatar
Minimal system services(units) and default targets
cn flag

Please forgive what may seem like a naive question. I have 30+ years in windows development and IT management, but rarely use Linux. I have an elderly laptop with only 4Gb mem and 4 core @ 2.53Ghz... I originally installed Ubuntu 14ish years ago and it's been a pretty stable box, I have kept up with distro upgrades and from about v19 on up i've noticed a performance and stability hit. currently 21.04 GN ...

Score: 0
rogersjoshmac avatar
See what services were restarted during apt installation
br flag

When installing packages with dpkg, I'm getting the following warning:

restart services

I don't mind restarting the services, but I would like to know what services were restarted. Is there a way of knowing?

# cat /etc/os-release 
NAME="Ubuntu"
VERSION="18.04 LTS (Bionic Beaver)"

Thanks ahead!

Score: 0
gaazkam avatar
Can I make Apache only start once the system got its address from DHCP?
au flag

I am running Ubuntu in a VM for the purpose of having a local Wordpress installation, needed to do some local testing.

To this end I configured this machine's networking mode in VirtualBox to bridged, configured my home router to always lease the same IP address (192.168.0.101) to the MAC address of this VM and configured Apache to listen on this address in etc/apache2/ports.conf:

Listen 192.168.0.101:80
 ...
Score: 0
Mats Elfving avatar
How to handle threaded but independent systemd.service
in flag

I have a java application with 4 processes running (on Ubuntu 20.04LTS), ref below picture. Service 1 starts before 2+, Service 2 would also start service 3 and 4. I've setup 1 and 2 as simple and that works.

service dependencies, service 2 starting service 3 and 4

However, service 3 and 4 can be stopped/restarted independently of service 2. Is there a way to implement this into the service defini ...

Score: 0
Service file don't see /home/user files and folders - ubuntu 20.04
sx flag

I make service file, vaultwarden.service to look like this (here showing just part of it):

# The user/group vaultwarden is run under. the working directory (see below) should allow write and read access to this user/group
User=vaultwarden
Group=vaultwarden
# The location of the compiled binary
ExecStart=/home/vaultwarden/vaultwarden   # user is vaultwarden, binary vaultwarden

When in service file part ...

Score: 0
Hamilkar Barkas avatar
Ubuntu 20.04 systemd status hanging terminal and ubuntu
tc flag

Recently i notice problem when i try one tutorial with nginx and nginx. I cannot check service using sudo systemctl status for any service at my Ubuntu 20.04

for example check docker.service

sudo systemctl status docker.service

It is not problem to execute other systemctl commands like sudo systemctl enable docker.service etc....

What i could check for this strange appearance? exist alternative to che ...

Score: 0
taidan avatar
Pmie_logger and pmlogger daily both fail to start
in flag

I've tried enabling and restarting both services but they continually fail, even on reboot.

The job identifier is 110800.
Oct 12 19:14:36 [server] pcp[2555877]: pmie_daily failed - see /var/log/pcp/pmie/pmie_daily.log
Oct 12 19:14:36 [server] systemd[1]: pmie_daily.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://w ...
Score: 1
feder avatar
Fail to execute command on startup
de flag

I want to run a simple command after my ubuntu starts up and network services are established (it should do so no matter wheater I'm logged in or not)

If I run the command manually, it start's up the enclosed applications: confluent local services start. So it works at least with my user.

Questions:

  • How can I run the command on system startup (after network is esablished)?
  • To any solutions suggested, how ...
Score: 1
j0h avatar
what does the power management applet do on a desktop?
au flag
j0h

ok, I understand what the power management daemon does on a laptop, conserving battery power by scaling down the cpu, and dimming the screen. On a desktop however, is the power management daemon necessary? (as in, is there anything else I am not thinking of, before I turn this off?)

Score: 0
Run daemon at reboot before user logs in
sd flag

I am using the RealVNC server which uses vncserver-x11-serviced. According to the documentation, one can run the daemon at startup using systemctl enable vncserver-x11-serviced.service command.

How to make it run before a user logs in to the account?

This is necessary when you reboot the system. In that case, the RealVNC server does not start listening until one actually logs in to the system which ...

Score: 0
VikasPushkar avatar
Ubuntu: reading local user env variable in service
jp flag

I have a Linux service running on my ubuntu machine. in this machine, I need to read proxy setting environment variables ( like https_proxy, http_proxy, no_proxy, etc) values for the currently logged-in user.

when I am trying to read https_proxy from my service code, it is being printed as an empty string but when I am printing from the terminal the values are correct.

I think the service is not abl ...

Score: 0
Simple Fellow avatar
Service takes a long time to shutdown
in flag

I recently started practicing kubernetes on my local machine which is ubuntu 21.04L in a virtual machine (VMWare). Whenever I shutdown it is stuck for few minutes for containerd-shim with the following message.

enter image description here

How can I reduce the service time for graceful shutdown or is it some error?

Score: 0
julian bechtold avatar
apt-get upgrade auto restart services
cn flag

I have an unattended script for installing servers. At the beginning of the script there is a sudo apt-get dist-upgrade --yes. The dist upgrade has a nasty user input screen at its end asking to restart services:
enter image description here

Is it possible to autoaccept service restarts or disable this screen? It breaks my whole script. Also Im afraid it might leave my server stuck at some point when updating...

same result w ...

Score: 0
Stav Alfi avatar
Unable to shutdown redis-server even after uninstall
cn flag

After uninstalling:

> ps aux | grep redis-server
root      147242  0.7  0.0  52968  7824 ?        Ssl  16:58   0:00 /snap/redis/137/usr/bin/redis-server *:6379
stavalfi  147321  0.0  0.0  17672   672 pts/0    S+   16:58   0:00 grep --color=auto redis-server

When I kill one of the pids (kill <pid> or sudo service redis-server stop or sudo systemctl unmask redis-server.service && kill ...

Score: 0
Malhonen avatar
How to fix ipfm daemon failing to start because of unavailable wifi interface?
tt flag

I have a metered Wifi connection that has lately started reaching the prepaid data limit faster than I expect. To figure out what specifically is using up bandwidth, I installed ipfm 0.11.5-4.2 with apt-get from the universe repository on my Ubuntu 21.04 system. I read through the man pages, configured ipfm.conf and ran the daemon for a few hours, and everything seemed to work as I expected. I got hourl ...

Score: 0
Bobcat33 avatar
Start service after all http handling services have started
cn flag

I have been puzzling over this one for a while now and I have managed to refine my issue to one problem. I have a service which is supposed to run a shell script to start daemon processes (using nohup), these processes are discord bots written using nodejs and discordjs. Currently I have a service that starts the test discord bot when I run it using sudo systemctl start startdiscordbots and that work ...

Score: 0
Traceout avatar
Published .Net Core website not working with Systemd
in flag

I'm deploying a ASP .Net core app to my webserver. When I run the systemd service it binds to port 5000 and I get a nginx 502 error. When I run the service manually using "dotnet Activecalls.dll" it binds to port 5001 for https which is what I want and the website works correctly. Here is the systemd service:

[Unit]
Description=Active Calls Service

[Service]
WorkingDirectory=/var/ActiveCalls
ExecS ...
Score: 0
Wilfred Almeida avatar
Use Docker on a systemd disabled VM
nc flag

I am provided by a VM running Ubuntu 18.04.5 LTS which has systemd disabled.

I have root access on it.

I am trying to run docker on it which is installed but I get error Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

I cannot run systemctl as I get error System has not been booted with systemd as init system (PID 1). Can't operate.

I ran the comm ...