Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 11-12-2014, 04:38 PM   #1
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.

Description=GitLab CI Runner supervision process

ExecStart=/root/.nvm/current/bin/gcr -u -t a84b<clipped>25db
When I run `systemctl start gitlab-ci-runner`. I get the following with `systemctl status gitlab-ci-runner`

 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 -t a84b<clipped>25db"` produces something like the following.

gcr info [client] checking for builds...
gcr http 404
gcr info [client] checking for builds...
gcr http 404
Old 11-12-2014, 05:32 PM   #2
Registered: May 2001
Posts: 29,409
Blog Entries: 55

Rep: Reputation: 3580Reputation: 3580Reputation: 3580Reputation: 3580Reputation: 3580Reputation: 3580Reputation: 3580Reputation: 3580Reputation: 3580Reputation: 3580Reputation: 3580
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?..



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 05: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 10:40 AM
Boot Delay 30min: systemd-analyze blame systemd-tmpfiles-setup.service BGHolmes Fedora 0 07-27-2011 09:02 AM
Storage unit and IO unit salmanucit Linux - General 2 06-17-2008 11:11 PM
LG CD-Rom (GCR-8523B) in SUSE 9.1 pracslipkerm Linux - Hardware 0 03-27-2005 05:51 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:19 AM.

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