« first day (686 days earlier)      last day (1713 days later) » 

6:11 PM
@TheLittleNaruto here?
 
@Kulfy Yeah
Can I ask Linux related question ?
 
@TheLittleNaruto Sadly we don't have baby here to welcome you. Though we have Natty but it posts NAA here.
@TheLittleNaruto Yeah. Or may be try main site Ask Ubuntu or AUGR
 
@Kulfy Cool
I created one service and ran it. But the status is showing active failed.
Something like this:
 Active: failed (Result: exit-code) since Sat 2019-07-13 23:46:35 IST; 16s ago
 Main PID: 6701 (code=exited, status=217/USER)
 
@TheLittleNaruto Have you tried looking at the logs?
 
6:27 PM
@Kulfy Do you mean the logs which got printed on console ?
 
@TheLittleNaruto The logs which it creates in /. Which service is it?
 
@Kulfy Not sure of path.
@Kulfy A service to start flask server and keeps it running forever
@Kulfy I wrote a ini file
 
@TheLittleNaruto Is it written by you or downloaded from somewhere?
 
@Kulfy by me
 
@TheLittleNaruto If possible please post the content of file with the failed message on main site.
 
6:36 PM
@Kulfy The content I can't share because of privacy issue.
 
@TheLittleNaruto Have you configured it properly?
 
Ok can you help me to find a link on how to write own service ?
@Kulfy Yeah
 
@Kulfy Yeah my approach is same
 
Ummm.. But I'm not sure why service fails.
 
7:00 PM
@Kulfy What is absolute path of the logs you're talking about ?
 
@TheLittleNaruto What do you get when you run journalctl -u service-name.service?
 
@Kulfy Same what I shared above. BTW I am using uWSGI instance
Jul 13 23:46:35 thelittlenaruto systemd[1]: Started uWSGI instance to serve sample.
Jul 13 23:46:35 thelittlenaruto systemd[1]: sample.service: Main process exited, code=exited, status=217/USER
Jul 13 23:46:35 thelittlenaruto systemd[1]: sample.service: Unit entered failed state.
Jul 13 23:46:35 thelittlenaruto systemd[1]: sample.service: Failed with result 'exit-code'.
@Kulfy This is what that command is printing ^
 
7:15 PM
5
A: How to debug a failed systemctl service?

JoshMcThe error 217 indicate the user did not exist at the time the service tried to start. In your case the user specified in your service is clouddirect. Main PID: 10064 (code=exited, status=217/USER) Jan 09 16:09:42 ip-172-30-1-96.us-west-1.compute.internal systemd[1]: clouddirectd.service: main...

What is the value of Environment in service by the way?
 
@Kulfy Wakarimashtha
@Kulfy Lemme try
 
7:28 PM
@Kulfy That was correct answer. + 1
 
Glad you solved! Congrats!
 
I am getting 203/EXEC now;
Will figure out this one as well
@Kulfy Thanks for the help
 
@TheLittleNaruto That's I guess interpreter error. Have you given the path of bash in ExecStart?
@TheLittleNaruto np :)
 
@Kulfy It's a python script not bash
Ok it's too late now! I'll try tomorrow.
later buddy o/
 

« first day (686 days earlier)      last day (1713 days later) »