Unable to run usbmuxd as a service using systemd, but functional when executed through the terminal











up vote
0
down vote

favorite












I'm trying to set up usbmuxd to run as a daemon, however I keep running into the following error :



    Dec  3 10:29:19 asci-kubu-NUC7i3BNH systemd[1]: asci-usbmuxd.service: Main process exited, code=exited, status=1/FAILURE
Dec 3 10:29:19 asci-kubu-NUC7i3BNH systemd[1]: asci-usbmuxd.service: Failed with result 'exit-code'.
Dec 3 10:29:24 asci-kubu-NUC7i3BNH systemd[1]: asci-usbmuxd.service: Service hold-off time over, scheduling restart.
Dec 3 10:29:24 asci-kubu-NUC7i3BNH systemd[1]: asci-usbmuxd.service: Scheduled restart job, restart counter is at 46078.
Dec 3 10:29:24 asci-kubu-NUC7i3BNH systemd[1]: Stopped usbmuxd service.
Dec 3 10:29:24 asci-kubu-NUC7i3BNH systemd[1]: Started usbmuxd service.
Dec 3 10:29:24 asci-kubu-NUC7i3BNH usbmuxd[29950]: [0] Could not open lockfile


When I run it manually like so :



sudo usbmuxd -v --user usbmux --foreground


Everything is fine.



Here is my systemd .service file. I've read through the manual however I'm positive that I may have not set the correct capacities. I've verified the permissions/groups for usbmux user, usbmux is part of plugdev and sudo.



[Unit]
Description=usbmuxd service

[Service]
Type=simple
ExecStart=/usr/local/sbin/usbmuxd --user usbmux
Restart=always
CapabilityBoundingSet=CAP_SETGID CAP_SETUID CAP_CHOWN CAP_FOWNER CAP_NET_ADMIN CAP_NET_BIND_SERVICE
LimitNPROC=1
RestartSec=5
User=usbmux
Group=sudo


I've also tried, root/root, no avail..



# Output to syslog
StandardOutput=syslog
StandardError=syslog
#Change this to find app logs in /var/log/syslog
SyslogIdentifier=usbmuxd

[Install]
WantedBy=multi-user.target









share|improve this question









New contributor




mono is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1




    Why are you not using the service unit file that comes with usbmuxd?
    – JdeBP
    Dec 5 at 16:51






  • 1




    Wait a sec, there's a unit file that's bundled in? I'm still learning, and I don't get why my question got downvoted... I legitimately needed some help. I just checked the source.. I found : [Unit] Description=Socket daemon for the usbmux protocol used by Apple devices Documentation=man:usbmuxd(8) [Service] ExecStart=@sbindir@/usbmuxd --user usbmux --systemd PIDFile=@localstatedir@/run/usbmuxd.pid I'll go try that. Thanks
    – mono
    Dec 5 at 18:18

















up vote
0
down vote

favorite












I'm trying to set up usbmuxd to run as a daemon, however I keep running into the following error :



    Dec  3 10:29:19 asci-kubu-NUC7i3BNH systemd[1]: asci-usbmuxd.service: Main process exited, code=exited, status=1/FAILURE
Dec 3 10:29:19 asci-kubu-NUC7i3BNH systemd[1]: asci-usbmuxd.service: Failed with result 'exit-code'.
Dec 3 10:29:24 asci-kubu-NUC7i3BNH systemd[1]: asci-usbmuxd.service: Service hold-off time over, scheduling restart.
Dec 3 10:29:24 asci-kubu-NUC7i3BNH systemd[1]: asci-usbmuxd.service: Scheduled restart job, restart counter is at 46078.
Dec 3 10:29:24 asci-kubu-NUC7i3BNH systemd[1]: Stopped usbmuxd service.
Dec 3 10:29:24 asci-kubu-NUC7i3BNH systemd[1]: Started usbmuxd service.
Dec 3 10:29:24 asci-kubu-NUC7i3BNH usbmuxd[29950]: [0] Could not open lockfile


When I run it manually like so :



sudo usbmuxd -v --user usbmux --foreground


Everything is fine.



Here is my systemd .service file. I've read through the manual however I'm positive that I may have not set the correct capacities. I've verified the permissions/groups for usbmux user, usbmux is part of plugdev and sudo.



[Unit]
Description=usbmuxd service

[Service]
Type=simple
ExecStart=/usr/local/sbin/usbmuxd --user usbmux
Restart=always
CapabilityBoundingSet=CAP_SETGID CAP_SETUID CAP_CHOWN CAP_FOWNER CAP_NET_ADMIN CAP_NET_BIND_SERVICE
LimitNPROC=1
RestartSec=5
User=usbmux
Group=sudo


I've also tried, root/root, no avail..



# Output to syslog
StandardOutput=syslog
StandardError=syslog
#Change this to find app logs in /var/log/syslog
SyslogIdentifier=usbmuxd

[Install]
WantedBy=multi-user.target









share|improve this question









New contributor




mono is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1




    Why are you not using the service unit file that comes with usbmuxd?
    – JdeBP
    Dec 5 at 16:51






  • 1




    Wait a sec, there's a unit file that's bundled in? I'm still learning, and I don't get why my question got downvoted... I legitimately needed some help. I just checked the source.. I found : [Unit] Description=Socket daemon for the usbmux protocol used by Apple devices Documentation=man:usbmuxd(8) [Service] ExecStart=@sbindir@/usbmuxd --user usbmux --systemd PIDFile=@localstatedir@/run/usbmuxd.pid I'll go try that. Thanks
    – mono
    Dec 5 at 18:18















up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm trying to set up usbmuxd to run as a daemon, however I keep running into the following error :



    Dec  3 10:29:19 asci-kubu-NUC7i3BNH systemd[1]: asci-usbmuxd.service: Main process exited, code=exited, status=1/FAILURE
Dec 3 10:29:19 asci-kubu-NUC7i3BNH systemd[1]: asci-usbmuxd.service: Failed with result 'exit-code'.
Dec 3 10:29:24 asci-kubu-NUC7i3BNH systemd[1]: asci-usbmuxd.service: Service hold-off time over, scheduling restart.
Dec 3 10:29:24 asci-kubu-NUC7i3BNH systemd[1]: asci-usbmuxd.service: Scheduled restart job, restart counter is at 46078.
Dec 3 10:29:24 asci-kubu-NUC7i3BNH systemd[1]: Stopped usbmuxd service.
Dec 3 10:29:24 asci-kubu-NUC7i3BNH systemd[1]: Started usbmuxd service.
Dec 3 10:29:24 asci-kubu-NUC7i3BNH usbmuxd[29950]: [0] Could not open lockfile


When I run it manually like so :



sudo usbmuxd -v --user usbmux --foreground


Everything is fine.



Here is my systemd .service file. I've read through the manual however I'm positive that I may have not set the correct capacities. I've verified the permissions/groups for usbmux user, usbmux is part of plugdev and sudo.



[Unit]
Description=usbmuxd service

[Service]
Type=simple
ExecStart=/usr/local/sbin/usbmuxd --user usbmux
Restart=always
CapabilityBoundingSet=CAP_SETGID CAP_SETUID CAP_CHOWN CAP_FOWNER CAP_NET_ADMIN CAP_NET_BIND_SERVICE
LimitNPROC=1
RestartSec=5
User=usbmux
Group=sudo


I've also tried, root/root, no avail..



# Output to syslog
StandardOutput=syslog
StandardError=syslog
#Change this to find app logs in /var/log/syslog
SyslogIdentifier=usbmuxd

[Install]
WantedBy=multi-user.target









share|improve this question









New contributor




mono is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I'm trying to set up usbmuxd to run as a daemon, however I keep running into the following error :



    Dec  3 10:29:19 asci-kubu-NUC7i3BNH systemd[1]: asci-usbmuxd.service: Main process exited, code=exited, status=1/FAILURE
Dec 3 10:29:19 asci-kubu-NUC7i3BNH systemd[1]: asci-usbmuxd.service: Failed with result 'exit-code'.
Dec 3 10:29:24 asci-kubu-NUC7i3BNH systemd[1]: asci-usbmuxd.service: Service hold-off time over, scheduling restart.
Dec 3 10:29:24 asci-kubu-NUC7i3BNH systemd[1]: asci-usbmuxd.service: Scheduled restart job, restart counter is at 46078.
Dec 3 10:29:24 asci-kubu-NUC7i3BNH systemd[1]: Stopped usbmuxd service.
Dec 3 10:29:24 asci-kubu-NUC7i3BNH systemd[1]: Started usbmuxd service.
Dec 3 10:29:24 asci-kubu-NUC7i3BNH usbmuxd[29950]: [0] Could not open lockfile


When I run it manually like so :



sudo usbmuxd -v --user usbmux --foreground


Everything is fine.



Here is my systemd .service file. I've read through the manual however I'm positive that I may have not set the correct capacities. I've verified the permissions/groups for usbmux user, usbmux is part of plugdev and sudo.



[Unit]
Description=usbmuxd service

[Service]
Type=simple
ExecStart=/usr/local/sbin/usbmuxd --user usbmux
Restart=always
CapabilityBoundingSet=CAP_SETGID CAP_SETUID CAP_CHOWN CAP_FOWNER CAP_NET_ADMIN CAP_NET_BIND_SERVICE
LimitNPROC=1
RestartSec=5
User=usbmux
Group=sudo


I've also tried, root/root, no avail..



# Output to syslog
StandardOutput=syslog
StandardError=syslog
#Change this to find app logs in /var/log/syslog
SyslogIdentifier=usbmuxd

[Install]
WantedBy=multi-user.target






systemd






share|improve this question









New contributor




mono is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




mono is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Dec 5 at 16:47









Rui F Ribeiro

38.4k1479128




38.4k1479128






New contributor




mono is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Dec 5 at 16:21









mono

6




6




New contributor




mono is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





mono is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






mono is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 1




    Why are you not using the service unit file that comes with usbmuxd?
    – JdeBP
    Dec 5 at 16:51






  • 1




    Wait a sec, there's a unit file that's bundled in? I'm still learning, and I don't get why my question got downvoted... I legitimately needed some help. I just checked the source.. I found : [Unit] Description=Socket daemon for the usbmux protocol used by Apple devices Documentation=man:usbmuxd(8) [Service] ExecStart=@sbindir@/usbmuxd --user usbmux --systemd PIDFile=@localstatedir@/run/usbmuxd.pid I'll go try that. Thanks
    – mono
    Dec 5 at 18:18
















  • 1




    Why are you not using the service unit file that comes with usbmuxd?
    – JdeBP
    Dec 5 at 16:51






  • 1




    Wait a sec, there's a unit file that's bundled in? I'm still learning, and I don't get why my question got downvoted... I legitimately needed some help. I just checked the source.. I found : [Unit] Description=Socket daemon for the usbmux protocol used by Apple devices Documentation=man:usbmuxd(8) [Service] ExecStart=@sbindir@/usbmuxd --user usbmux --systemd PIDFile=@localstatedir@/run/usbmuxd.pid I'll go try that. Thanks
    – mono
    Dec 5 at 18:18










1




1




Why are you not using the service unit file that comes with usbmuxd?
– JdeBP
Dec 5 at 16:51




Why are you not using the service unit file that comes with usbmuxd?
– JdeBP
Dec 5 at 16:51




1




1




Wait a sec, there's a unit file that's bundled in? I'm still learning, and I don't get why my question got downvoted... I legitimately needed some help. I just checked the source.. I found : [Unit] Description=Socket daemon for the usbmux protocol used by Apple devices Documentation=man:usbmuxd(8) [Service] ExecStart=@sbindir@/usbmuxd --user usbmux --systemd PIDFile=@localstatedir@/run/usbmuxd.pid I'll go try that. Thanks
– mono
Dec 5 at 18:18






Wait a sec, there's a unit file that's bundled in? I'm still learning, and I don't get why my question got downvoted... I legitimately needed some help. I just checked the source.. I found : [Unit] Description=Socket daemon for the usbmux protocol used by Apple devices Documentation=man:usbmuxd(8) [Service] ExecStart=@sbindir@/usbmuxd --user usbmux --systemd PIDFile=@localstatedir@/run/usbmuxd.pid I'll go try that. Thanks
– mono
Dec 5 at 18:18

















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






mono is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f486186%2funable-to-run-usbmuxd-as-a-service-using-systemd-but-functional-when-executed-t%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes








mono is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















mono is a new contributor. Be nice, and check out our Code of Conduct.













mono is a new contributor. Be nice, and check out our Code of Conduct.












mono is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f486186%2funable-to-run-usbmuxd-as-a-service-using-systemd-but-functional-when-executed-t%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Entries order in /etc/network/interfaces

新発田市

Grub takes very long (several minutes) to open Menu (in Multi-Boot-System)