LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-12-2014, 05:38 PM   #1
raisdead
LQ Newbie
 
Registered: Feb 2011
Posts: 4

Rep: Reputation: 0
Creating a systemd unit for gcr


I am trying to create a systemd unit file to run gcr. gcr runs in the foreground and polls an http server at a regular interval reporting activity to stdout. I created a unit file at /etc/systemd/system/gitlab-ci-runner with these contents.

Code:
[Unit]
Description=GitLab CI Runner supervision process
After=gitlab-runsvdir.service

[Service]
Type=simple
User=gitlab-ci-runner
ExecStart=/root/.nvm/current/bin/gcr -u http://ci.clipped.com -t a84b<clipped>25db
Restart=always
When I run `systemctl start gitlab-ci-runner`. I get the following with `systemctl status gitlab-ci-runner`

Code:
 Loaded: loaded (/etc/systemd/system/gitlab-ci-runner.service; static)
   Active: active (exited) since Mon 2014-11-10 10:45:46 CST; 2 days ago

Nov 12 16:27:19 host systemd[1]: Started GitLab CI Runner supervision process.
It looks like it terminated, but it should not. How can I debug this further? I an new to systemd so any pointers are appreciated. Running `su - gitlab-ci-runner -c "/root/.nvm/current/bin/gcr -u http://ci.clipped.com -t a84b<clipped>25db"` produces something like the following.

Code:
gcr info [client] checking for builds...
gcr http 404 http://ci.clipped.com/api/v1/builds/register.json
gcr info [client] checking for builds...
gcr http 404 http://ci.clipped.com/api/v1/builds/register.json
 
Old 11-12-2014, 06:32 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
If you look at the .service files in /usr/lib/systemd/system/ I think systemd expects either one shot applications or daemons or at least applications that can be told they should run headless, implying they close stdout/stderr themselves?..
 
  


Reply

Tags
systemd


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: Is systemd as bad as boycott systemd is trying to make it? LXer Syndicated Linux News 0 09-03-2014 06:50 PM
LXer: Hybrid RAID 1 (Mirror) of RAM drive & SATA HDD Using LVM with LUKS [and systemd unit file] on LXer Syndicated Linux News 0 07-29-2014 11:40 AM
Boot Delay 30min: systemd-analyze blame systemd-tmpfiles-setup.service BGHolmes Fedora 0 07-27-2011 10:02 AM
Storage unit and IO unit salmanucit Linux - General 2 06-18-2008 12:11 AM
LG CD-Rom (GCR-8523B) in SUSE 9.1 pracslipkerm Linux - Hardware 0 03-27-2005 06:51 PM


All times are GMT -5. The time now is 08:59 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration