don't run it like that. the 'd' argument means daemon-ize and it's a
requirement of launchd that processes do NOT do that. What's happening
is the process is starting, it immediately backgrounds itself, which
means the process launchd starts dies, then launchd tries to start it
up again but it can't because there is a background daemon process
(the one you just started) hogging the socket. Eventually launchd
gives up trying to respawn it and the error messages in the console
stop, and the daemon one is still there. launchd cannot control
processes which do that.
You're also clearly trying to start it up too early, so the first few
really do actually just die and launchd starts them up again, but it
doesn't really know what it's doing.
You could run it in foreground mode by changing that '-d' to '--
foreground'. That will stop launchd going totally nuts trying to keep
starting it up again because it will stay up, and if it does fall
down, launchd will correctly start it for you again.
however a much better idea is to put it into inetd mode and only start
up on demand when someone asks for it, I don't know about you but I
don't use my repository very much. For that you need the file which
follows. That will start one in inetd mode when someone makes a
request on the svn port. In that way the process will be down most of
the time which is less strain on the server and it won't start until
someone asks for it, which means you shouldn't have all those volume
mounting issues.
<?xml version="1.0" encoding="UTF-8"?>
<!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>Disabled</key>
<false/>
<key>Label</key>
<string>org.tigris.subversion.svnserve</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/svnserve</string>
<string>--inetd</string>
<string>--root=Volumes/Development_Current/_CodeRepository</
string>
</array>
<key>ServiceDescription</key>
<string>Subversion Standalone Server</string>
<key>Sockets</key>
<dict>
<key>Listeners</key>
<array>
<dict>
<key>SockFamily</key>
<string>IPv4</string>
<key>SockServiceName</key>
<string>svn</string>
<key>SockType</key>
<string>stream</string>
</dict>
</array>
</dict>
<key>inetdCompatibility</key>
<dict>
<key>Wait</key>
<false/>
</dict>
</dict>
</plist>
On Sep 24, 2008, at 4:24 PM, René v Amerongen wrote:
Dear list
Not sure where to put this question, but I did see here more of
launchd questions.
I got svnserve running with the following 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>KeepAlive</key>
<dict>
<key>PathState</key>
<dict>
<key>/Volumes/Development_Current/_CodeRepository</key>
<true/>
</dict>
</dict>
<key>Label</key>
<string>subversion.svnserve</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/svnserve</string>
<string>-d</string>
<string>-r</string>
<string>/Volumes/Development_Current/_CodeRepository</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardErrorPath</key>
<string>/Library/Logs/Subversion_SVNserve.log</string>
</dict>
</plist>
My Volumes/Development_Current/ volume is a firewire disk and when
the plist get fired the drive isn't ready yet.
But when it comes up the svnserve starts up en works ok. Just a
second but with two or three "does not exist or is not a directory"
lines
Some questions however.
1.)While svnserve is running, in my Subversion_SVNserve.log log I see.
svnserve: Root path '/Volumes/Development_Current/_CodeRepository'
does not exist or is not a directory.
svnserve: Root path '/Volumes/Development_Current/_CodeRepository'
does not exist or is not a directory.
svnserve: Can't bind server socket: Address already in use
svnserve: Can't bind server socket: Address already in use
svnserve: Can't bind server socket: Address already in use
...
and at the console I see the Launchd log
24-09-08 10:06:36 com.apple.launchd[1] (subversion.svnserve[684])
Exited with exit code: 1
24-09-08 10:06:36 com.apple.launchd[1] (subversion.svnserve)
Throttling respawn: Will start in 10 seconds
24-09-08 10:06:46 com.apple.launchd[1] (subversion.svnserve[685])
Exited with exit code: 1
24-09-08 10:06:46 com.apple.launchd[1] (subversion.svnserve)
Throttling respawn: Will start in 10 seconds
.....
Yesterday I did have a huge PID number a little scary.
Why is it trying to start again? How can I stop that? what is wrong
with my plist?
2.) When I unmount the drive, then the svnserve keeps running. I
thought the the daemon will get killed.
However it restart when the drive is mounted back online. But how
can I get this killed when unmounting the drive.
3.) Actualy I would like to have it start at demand and kills after
10 minutes. I notice that the OnDemand key is gone in 10.5. But how
should I do it now?
4.) I did see a few sample script with ip socket info in the plist,
what is that for? Do I need that?
Thanks in advance
René
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/rols%40rols.org
This email sent to [EMAIL PROTECTED]
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]