LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 08-10-2017, 02:39 AM   #1
prcm
LQ Newbie
 
Registered: Aug 2017
Posts: 6

Rep: Reputation: Disabled
systemd service failed to start with errror : “main process exited, code=exited, status=3/NOTIMPLEMENTED”



I am getting below error when i start a systemd service


[localhost.localdomain]-> systemctl status rcc_rccproxy.service
* rcc_rccproxy.service - starts RCC Proxy process
Loaded: loaded (/etc/systemd/system/rcc_rccproxy.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2009-03-25 21:46:27 CDT; 12min ago
Process: 7597 ExecStart=/var/RCC/rccproxy.sh (code=exited, status=3)
Main PID: 7597 (code=exited, status=3)

Mar 25 21:46:27 localhost.localdomain systemd[1]: Started starts RCC Proxy process.
Mar 25 21:46:27 localhost.localdomain systemd[1]: Starting starts RCC Proxy process...
Mar 25 21:46:27 localhost.localdomain systemd[1]: rcc_rccproxy.service: main process exited, code=exited, status=3/NOTIMPLEMENTED
Mar 25 21:46:27 localhost.localdomain systemd[1]: Unit rcc_rccproxy.service entered failed state.
Mar 25 21:46:27 localhost.localdomain systemd[1]: rcc_rccproxy.service failed.

what is the reason for this? what do the status error indicating?

Basically this service is starting a shell script. If i run the same script manually, dont see any errors.

Journalctl logs for this PID doesn't show up anything either as well.

Last edited by prcm; 08-10-2017 at 02:41 AM.
 
Old 08-10-2017, 04:18 AM   #2
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
I'm not an expert in this but it looks as if your called program has simply finished what it was doing and systemd (which normally deals with creating services that remain running once loaded) doesn't know what to do with that situation because you haven't defined the actions to be taken in that case.

Your answer is in the setup of your service file. Look at setting up a oneshot service.

https://gist.github.com/drmalex07/d006f12914b21198ee43
 
Old 08-10-2017, 04:35 AM   #3
prcm
LQ Newbie
 
Registered: Aug 2017
Posts: 6

Original Poster
Rep: Reputation: Disabled
i know about the "oneshot" type, but my service doesnt have anaything like that. basically my service has to create a process which i couldnt see with ps command.

Below is my service file.

[Unit]
Description= *some description*
Requires=some*.service
After=some*.service

[Service]
ExecStart=/var/RCC/rccproxy.sh
Restart=no
Environment=SYSTEMD_LOG_LEVEL=debug

[Install]
WantedBy=multi-user.target
 
Old 08-10-2017, 04:39 AM   #4
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
If you run the shell script rccproxy.sh manually from the command line, does it terminate back to the command line prompt once it's finished what it's doing?
 
Old 08-10-2017, 05:11 AM   #5
prcm
LQ Newbie
 
Registered: Aug 2017
Posts: 6

Original Poster
Rep: Reputation: Disabled
when i run manually it terminates back to the command line prompt. The script is trying to start a process which is not working. I need to know how to debug this with whatever info status dump giving.
 
Old 08-10-2017, 05:19 AM   #6
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by prcm View Post
when i run manually it terminates back to the command line prompt. The script is trying to start a process which is not working. I need to know how to debug this with whatever info status dump giving.
Hence why you are getting the systemd error - the "service" (the script file, which is what systemd cares about) is terminating and you haven't told systemd what to do in that case.

When you run the script manually, does the process that the script starts up work properly? If not, take systemd out of the equation for the moment, in fact also take the script out of the equation. Start the underlying process itself manually and debug that.

What process are we talking about here? Has it worked in the past? Have you searched the web for similar failings with that process?
 
Old 08-10-2017, 05:32 AM   #7
prcm
LQ Newbie
 
Registered: Aug 2017
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks,I got your point now, the script is trying to execute a binary which is failing. I am doing linux migration from RHEL 6.4 to 7.3. The same binary is working under 6.3 , but now looks like it is failing in 7.4
 
Old 08-10-2017, 05:38 AM   #8
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by prcm View Post
Thanks,I got your point now, the script is trying to execute a binary which is failing. I am doing linux migration from RHEL 6.4 to 7.3. The same binary is working under 6.3 , but now looks like it is failing in 7.4
Have you contacted Red Hat support about the problem?
 
Old 08-10-2017, 05:42 AM   #9
prcm
LQ Newbie
 
Registered: Aug 2017
Posts: 6

Original Poster
Rep: Reputation: Disabled
Its our application binary which is failing not Redhat's. Need to check why it is failing & modify accordingly.
 
Old 08-10-2017, 05:53 AM   #10
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by prcm View Post
Its our application binary which is failing not Redhat's. Need to check why it is failing & modify accordingly.
Yup. I just thought that since the problem has arisen in 7.x then Redhat may be able to provide you with an idea of what has changed between 6.x and 7.x that could be causing the issue, perhaps gleaned from the experience of others facing similar issues.

Anyway, good luck with the debugging and let us know how you get on.

Last edited by hydrurga; 08-10-2017 at 05:54 AM.
 
Old 02-25-2022, 02:15 AM   #11
mitrasoumik24
LQ Newbie
 
Registered: Feb 2022
Posts: 2

Rep: Reputation: 0
Main process exited

The reason for this is that In the systemd service Remainafterexit value is set to be true.That is why the process is still showing and not exited though it has stopped running.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Scheduler: Event UID not valid! [Inferior 1 (process 9606) exited with code 01] aicaicai Linux - Newbie 1 04-23-2012 03:05 AM
[thread 0xb7fe7b70 (lwp 3738) exited] program exited with code 01 aicaicai Linux - Newbie 1 12-04-2011 11:08 AM
[SOLVED] Squid Parent: child process XXXXX exited with status 1 Lexus45 Linux - Server 1 05-24-2010 06:01 AM
child process -1 exited with status 1 ashfaq Linux - Software 3 04-09-2004 04:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 09:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration