systemd git daemon problem

This forum is for topics dealing with problems with software specifically in the ARMv7h repo.

systemd git daemon problem

Postby nathaniellsfreak » Wed Oct 21, 2015 12:03 pm

Hi,
I have a problem to get my git daemon started via systemd. After a few tests I got the service to be recognized by systemd. And now after executing the command: "systemctl start git-daemon" tells me:

$this->bbcode_second_pass_code('', '
> systemctl start git-daemon
> Job for git-daemon.service failed because a configured resource limit was exceeded. See "systemctl status git-daemon.service" and "journalctl -xe" for details.
')

And journalctl -xe tells me:
$this->bbcode_second_pass_code('', '
> journalctl -xe
Oct 21 12:00:35 alarm systemd[1]: git-daemon.service: Failed with result 'resources'.
Oct 21 12:01:34 alarm systemd[1]: git-daemon.service: Got more than one socket.
Oct 21 12:01:34 alarm systemd[1]: git-daemon.service: Failed to run 'start' task: Invalid argument
Oct 21 12:01:34 alarm systemd[1]: Failed to start Git Daemon Instance.
-- Subject: Unit git-daemon.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit git-daemon.service has failed.
--
-- The result is failed.
Oct 21 12:01:34 alarm systemd[1]: git-daemon.service: Failed with result 'resources'.
')

Do you have any ideas?

greetz nathaniell
Last edited by WarheadsSE on Wed Oct 21, 2015 12:58 pm, edited 1 time in total.
Reason: Please use code tags.
nathaniellsfreak
 
Posts: 4
Joined: Wed Oct 21, 2015 11:46 am

Re: systemd git daemon problem

Postby WarheadsSE » Wed Oct 21, 2015 12:59 pm

Apparently it has a socket binding. Try using that.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: systemd git daemon problem

Postby nathaniellsfreak » Wed Oct 21, 2015 1:13 pm

I have tried to put the socket conf into the directory sockets.target.wants.
I have tried to enable it, but it didn't work.

git-daemon.socket:
------------------------------------------
[Unit]
Description=Git Daemon socket

[Socket]
ListenStream=9418
#Accept=true

[Install]
WantedBy=sockets.target
------------------------------------------

Do you have any idea?

greetz nathaniell
nathaniellsfreak
 
Posts: 4
Joined: Wed Oct 21, 2015 11:46 am

Re: systemd git daemon problem

Postby WarheadsSE » Wed Oct 21, 2015 1:28 pm

When wrapping output, please use [code] tags.

Are you manually placing things?
Can I get an actual error message?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: systemd git daemon problem

Postby nathaniellsfreak » Wed Oct 21, 2015 1:37 pm

I got the socket working but not the service. A Sym-link of the socket is now in: /etc/systemd/system/sockets.target.wants

$this->bbcode_second_pass_code('', '
[root@alarm alarm]# systemctl status git-daemon.socket
* git-daemon.socket - Git Daemon socket
Loaded: loaded (/etc/systemd/system/git-daemon.socket; enabled; vendor preset: disabled)
Active: active (listening) since Wed 2015-10-21 13:28:37 UTC; 1min 56s ago
Listen: [::]:9418 (Stream)

Oct 21 13:28:37 alarm systemd[1]: Listening on Git Daemon socket.
')

When I try to start the service via systemd, it shows no errors.
But after asking with systemctl "status" it tells me:

$this->bbcode_second_pass_code('', '
[root@alarm sockets.target.wants]# systemctl status git-daemon.service
* git-daemon.service - Git Daemon Instance
Loaded: loaded (/etc/systemd/system/multi-user.target.wants/git-daemon.service)
Active: inactive (dead) since Wed 2015-10-21 13:33:17 UTC; 8s ago
Process: 607 ExecStart=/usr/lib/git-core/git-daemon --inetd --export-all --base-path=/srv/git (code=exited, status=1/FAILURE)

Oct 21 13:33:17 alarm systemd[1]: Starting Git Daemon Instance...
Oct 21 13:33:17 alarm systemd[1]: Started Git Daemon Instance.
')

asking journalctl -xe tell me:
$this->bbcode_second_pass_code('', '
Oct 21 13:33:17 alarm systemd[1]: Starting Git Daemon Instance...
-- Subject: Unit git-daemon.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit git-daemon.service has begun starting up.
Oct 21 13:33:17 alarm git-daemon[607]: read error: Transport endpoint is not connected
Oct 21 13:33:17 alarm systemd[1]: Started Git Daemon Instance.
-- Subject: Unit git-daemon.service has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit git-daemon.service has finished starting up.
--
-- The start-up result is done.
')

The configuration of my git.service is as follows:
$this->bbcode_second_pass_code('', '
[Unit]
Description=Git Daemon Instance
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
User=git
Group=git
# The '-' is to ignore non-zero exit statuses
ExecStart=-/usr/lib/git-core/git-daemon --inetd --export-all --base-path=/srv/git
StandardInput=socket
StandardOutput=inherit
StandardError=journal

[Install]
WantedBy=multi-user.target
')

Thanks for your help WarheadsSE
nathaniellsfreak
 
Posts: 4
Joined: Wed Oct 21, 2015 11:46 am

Re: systemd git daemon problem

Postby WarheadsSE » Wed Oct 21, 2015 2:51 pm

With a .socket, it will start the service when you connect to the socket.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm

Re: systemd git daemon problem

Postby nathaniellsfreak » Wed Oct 21, 2015 3:06 pm

I stopped the socket with systemctl stop git-daemon.socket.
When I try to start the git daemon with systemctl start git-daemon.servicet,it tells me:

$this->bbcode_second_pass_code('', '
> systemctl start git-daemon.service
Job for git-daemon.service failed because a configured resource limit was exceeded. See "systemctl status git-daemon.service" and "journalctl -xe" for details.
')

Is this what you mean?

greetz nathaniell
nathaniellsfreak
 
Posts: 4
Joined: Wed Oct 21, 2015 11:46 am

Re: systemd git daemon problem

Postby WarheadsSE » Wed Oct 21, 2015 5:11 pm

Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6807
Joined: Mon Oct 18, 2010 2:12 pm


Return to ARMv7h

Who is online

Users browsing this forum: No registered users and 20 guests