[solved] Problems with systems processes not restarting

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[solved] Problems with systems processes not restarting

Postby linuxdad » May 28th, '14, 16:55

I have converted a few /etc/inittab processes to the systems format (or so I thought), these processes have been working fine, until a recent issue, which I am uncertain about.

So I started to investigate two particular issues which are now part of the systems environment:

Code: Select all
systemctl --all | grep pop
poprelay-iptc.service     loaded failed   failed        POP Relay info for remote Sendmail communications.
poprelay.service          loaded failed   failed        POP Relay info for remote Sendmail communications.


So I attempted to restart the first service.

Code: Select all
systemctl start poprelay-itpc.service
Failed to issue method call: Unit poprelay-itpc.service failed to load: No such file or directory. See system logs and 'systemctl status poprelay-itpc.service' for details.

This brings me to the status:

Code: Select all
systemctl status poprelay-itpc.service
poprelay-itpc.service
     Loaded: error (Reason: No such file or directory)
     Active: inactive (dead)


Interestingly enough, I challenged the error message:

Code: Select all
find /etc -name "poprelay*" -print
/etc/systemd/system/multi-user.target.wants/poprelay-iptc.service
/etc/systemd/system/multi-user.target.wants/poprelay.service
/etc/systemd/system/poprelay-iptc.service
/etc/systemd/system/poprelay.service
/etc/mail/poprelay.conf
/etc/mail/mail/poprelay.conf


Hmm, that looks like the files are there, better check to see if I can execute the process manually:

Code: Select all
more /etc/systemd/system/multi-user.target.wants/poprelay-iptc.service
[Unit]
Description=POP Relay info for remote Sendmail communications.
 
[Service]
ExecStart=/sysadm/scripts/poprelayd-ABS-iptc.pl -dn
Restart=always
 
[Install]
WantedBy=multi-user.target


Hmm, looks like I can start this manually:

Code: Select all
 ps ax | grep -i pop
12394 pts/0    S      0:00 /usr/bin/perl /sysadm/scripts/poprelayd-ABS-iptc.pl -dn


Can anyone explain what is happening here?

Thank you.
Last edited by linuxdad on May 29th, '14, 02:05, edited 2 times in total.
Albert E. Whale, CEH CHS CISA CISSP
President - Chief Security Officer
IT Security, Inc. - http://www.IT-Security-inc.com
Pittsburgh, PA
Email: Albert.Whale@IT-Security-inc.com
linuxdad
 
Posts: 123
Joined: Nov 17th, '13, 21:14

Re: Problems with systems processes not restarting

Postby barjac » May 28th, '14, 22:34

Your unit file should be placed in /lib/systemd/system/ not in /etc
Systemd will look after the rest based on the content of the unit file.
Add this icon to your KDE desktop - save as "About.desktop" http://pastebin.com/raw.php?i=X10X1Ype
User avatar
barjac
 
Posts: 193
Joined: Apr 4th, '11, 10:26
Location: Rossendale UK

Re: Problems with systems processes not restarting

Postby doktor5000 » May 28th, '14, 23:13

barjac wrote:Your unit file should be placed in /lib/systemd/system/ not in /etc

Nope, not really. /etc is for the system administrator, /usr carries all those that come with the system, /lib is only a symlink to /usr/lib, FWIW.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18067
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Problems with systems processes not restarting

Postby barjac » May 29th, '14, 01:09

Sorry, I meant /usr/lib/systemd/system/
as in:
Code: Select all
$ rpm --eval %{_unitdir}
/usr/lib/systemd/system
Add this icon to your KDE desktop - save as "About.desktop" http://pastebin.com/raw.php?i=X10X1Ype
User avatar
barjac
 
Posts: 193
Joined: Apr 4th, '11, 10:26
Location: Rossendale UK

Re: Problems with systems processes not restarting

Postby linuxdad » May 29th, '14, 01:59

I do not understand what the difference is, or why this was working for more than three months!

So the question is, where does the poprelay-iptc.service configuration file go? (It was previously working in /etc/systemd/system for sometime.) Is is required to go to the /usr/lib/systemd/system tree? When did this change?
Albert E. Whale, CEH CHS CISA CISSP
President - Chief Security Officer
IT Security, Inc. - http://www.IT-Security-inc.com
Pittsburgh, PA
Email: Albert.Whale@IT-Security-inc.com
linuxdad
 
Posts: 123
Joined: Nov 17th, '13, 21:14

Re: Problems with systems processes not restarting

Postby linuxdad » May 29th, '14, 02:05

Wow, I do not understand what changed, but after copying the service definitions to /usr/lib/systemd/system, then enabling and then starting, the processes are starting again.

Thank you.
Albert E. Whale, CEH CHS CISA CISSP
President - Chief Security Officer
IT Security, Inc. - http://www.IT-Security-inc.com
Pittsburgh, PA
Email: Albert.Whale@IT-Security-inc.com
linuxdad
 
Posts: 123
Joined: Nov 17th, '13, 21:14

Re: [solved] Problems with systems processes not restarting

Postby barjac » May 29th, '14, 12:49

Well I am not well versed in systemd magic, however all the packages that I maintain that use unit files install them using the %{_unitdir} macro. I have never put anything related to unit files under /etc/systemd.
If you look in /etc/systemd/ all the 'files' are in fact symlinks which are (I'm guessing) created by systemd in response to the unit files in %{_unitdir} when 'systemctl --system daemon-reload' is run.
Others will no doubt be able to explain it more accurately, but I'm glad it's now working for you :)
Add this icon to your KDE desktop - save as "About.desktop" http://pastebin.com/raw.php?i=X10X1Ype
User avatar
barjac
 
Posts: 193
Joined: Apr 4th, '11, 10:26
Location: Rossendale UK

Re: [solved] Problems with systems processes not restarting

Postby linuxdad » May 29th, '14, 14:28

Thank you again this forum has once again saved the day.
Albert E. Whale, CEH CHS CISA CISSP
President - Chief Security Officer
IT Security, Inc. - http://www.IT-Security-inc.com
Pittsburgh, PA
Email: Albert.Whale@IT-Security-inc.com
linuxdad
 
Posts: 123
Joined: Nov 17th, '13, 21:14


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest