MacOS : MotionProHttp dans system.log : com.arraynetworks.mhttpd : Service exited with abnormal code: 3

338 x served & 177 x viewed

Quand je fais des statistiques sur les erreurs dans system.log :

$ grep "com.apple.xpc.launchd" /var/log/system.log  | sed 's/(/ /g' | sed 's/)/ /g' | sed 's/\[/ /g' | awk '{print $7}' | sort -n | uniq -c
   1 com.apple.TMHelperAgent.SetupOffer
   1 com.apple.bsd.dirhelper
   2 com.apple.eospreflightagent
   1 com.apple.preference.notifications.remoteservice
   1 com.apple.preferences.softwareupdate.remoteservice
   1 com.apple.screensharing
   4 com.apple.xpc.launchd.domain.pid.IDECacheDeleteAppExtension.28627
   4 com.apple.xpc.launchd.domain.pid.IDECacheDeleteAppExtension.49501
   1 com.apple.xpc.launchd.domain.pid.mdmclient.52930
   1 com.apple.xpc.launchd.domain.pid.signpost_reporter.27270
   1 com.apple.xpc.launchd.domain.user.501
#ff0000;">10854 com.arraynetworks.mhttpd
   1 com.microsoft.OneDrive.FinderSync.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
   1 com.microsoft.OneDrive.FinderSync.XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
   1 homebrew.mxcl.prometheus

Le vainqueur est com.arraynetworks.mhttpd … surtout à cause d’une erreur: « Service exited with abnormal code: 3 »

J’ai essayé de faire :

$ launchctl unload com.arraynetworks.mhttpd

Sans succès !

J’ai trouvé finalement :

$ sudo grep "com.arraynetworks.mhttpd" /Library/LaunchAgents/*
/Library/LaunchAgents/com.arraynetworks.mhttpd.plist:	com.arraynetworks.mhttpd

Si je regarde dans le détail :

$ cat /Library/LaunchAgents/com.arraynetworks.mhttpd.plist 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.arraynetworks.mhttpd</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/motionpro/MotionProHttpd</string>
                <string>-https</string>
                <string>127.0.0.1:60012</string>
                <string>-logfile</string>
                <string>/var/log/MotionPro/MotionProHttpd.log</string>
                <string>-logsize</string>
                <string>10</string>
                <string>-mppath</string>
                <string>/Applications/MotionPro.app/Contents/MacOS</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>/usr/local/motionpro</string>
</dict>
</plist>

Cela plante car le port est déjà en écoute :

$ tail -f /var/log/MotionPro/MotionProHttpd.log 
2019/11/18 15:14:54 send message to 127.0.0.1:65432
2019/11/18 15:14:54 failed to listen tls: listen tcp 127.0.0.1:60012: bind: address already in use
2019/11/18 15:15:04 vpn event monitor start
2019/11/18 15:15:04 vpn event monitor listen address:  127.0.0.1:51359 51359
2019/11/18 15:15:04 send message to 127.0.0.1:65432
2019/11/18 15:15:04 failed to listen tls: listen tcp 127.0.0.1:60012: bind: address already in use
2019/11/18 15:15:14 vpn event monitor start
2019/11/18 15:15:14 vpn event monitor listen address:  127.0.0.1:55185 55185
2019/11/18 15:15:14 send message to 127.0.0.1:65432
2019/11/18 15:15:14 failed to listen tls: listen tcp 127.0.0.1:60012: #ff0000;">bind: address already in use

Ce qui est vrai :

$ sudo lsof -iTCP -sTCP:LISTEN -n -P | grep "60012"
aciseagen   583      root   58u  IPv4 0xf99631e60b437f95      0t0  TCP 127.0.0.1:60012 (LISTEN)

J’ai donc arrêter le massacre …

$ launchctl unload /Library/LaunchAgents/com.arraynetworks.mhttpd.plist

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée.

Time limit is exhausted. Please reload CAPTCHA.