Replying to my own thread. 


I've had weewx running for a very long time on a different mac mini and 
already had a launchd plist as follows that I think M Wall authored:


<?xml version="1.0" encoding="UTF-8"?>
<!-- property list file for weewx daemon -->
<!-- put this file in /Library/LaunchDaemons -->
<!-- to start weewx: -->
<!--   sudo launchctl load -w /Library/LaunchDaemons/com.weewx.weewxd.plist 
-->
<!--   sudo launchctl unload /Library/LaunchDaemons/com.weewx.weewxd.plist 
-->
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>com.weewx.weewxd</string>
  <key>Disabled</key>
  <false/>
  <key>RunAtLoad</key>
  <true/>
  <key>KeepAlive</key>
  <true/>
  <key>ProgramArguments</key>
  <array>
    <string>/Users/Shared/weewx/bin/weewxd</string>
    <string>/Users/Shared/weewx/weewx.conf</string>
  </array>
</dict>
</plist>


The script that is included with weewx since 3.1.0 is below:


<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id: com.weewx.weewxd.plist 2830 2015-01-06 04:13:39Z mwall $ -->
<!-- property list file for weewx daemon -->
<!-- put this file in /Library/LaunchDaemons -->
<!-- to start weewx: -->
<!--   sudo launchctl load -w /Library/LaunchDaemons/com.weewx.weewxd.plist 
-->
<!--   sudo launchctl unload /Library/LaunchDaemons/com.weewx.weewxd.plist 
-->
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>com.weewx.weewxd</string>
  <key>Disabled</key>
  <false/>
  <key>RunAtLoad</key>
  <true/>
  <key>ProgramArguments</key>
  <array>
    <string>/Users/weewx/bin/weewxd</string>
    <string>/Users/weewx/weewx.conf</string>
  </array>
</dict>
</plist> 

As you can see, As you can see,<key>KeepAlive</key><true/> has been added. 
When Weewx starts at startup, it exits with error 4. With keep alive 
directive it respawns after 8 seconds. I don't know if it is the USB that 
becomes available after weewx tries to start or what condition needs to be 
satisfied, but on the respawn, the problem is solved.

Problem solved for now. Perhaps the plist for launchd should be updated to 
include KeepAlive?

-Geoff

On Monday, March 16, 2020 at 7:34:33 AM UTC-7, Geoff Harris wrote:
>
> Hi,
>
> I upgraded to 3.9.2 recently on Mac 10.15.3 and noticed that Weewx no 
> longer successfully starts at startup. When I looked in the console I saw 
> that during the startup it exits:
> Mar 16 06:57:37 TV-Mac-mini com.apple.xpc.launchd[1] 
> (com.weewx.weewxd[709]): Service exited with abnormal code: 1
>
> I recopied the plist and checked the permissions, and restarted, but it 
> still does not run Weewx
>
>
> If I go to the terminal and run:
>
>
> sudo launchctl load /Library/LaunchDaemons/com.weewx.weewxd.plist
>
>
> it tells me the service is already running. If I then unload and then 
> load, it runs just fine.
>
>
> Thoughts on how to resolve this?
>
>
> -Geoff
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/8d7de64e-742c-4465-b592-272e3b7a33e7%40googlegroups.com.

Reply via email to