Error: Syntax error on line 241 of /etc/swupd/swupd.conf: Port must be specified


This morning one of my Apple Software Servers (ASUS) was not supplying updates. When checking the swupd_err.log in Server Admin I saw the following repeated hundreds of times:

Syntax error on line 241 of /etc/swupd/swupd.conf:

Port must be specified

In the Server Admin GUI I checked the value of the “Provide updates using Port:” & sure enough, it was empty.

I tried entering a port & clicking save, to no avail. I also tried stopping the service, entering a port & restarting the service. Again no luck.

So i removed onto the server, made a copy of /etc/swupd/swupd.conf. I opened the file & had a nose @ line 241.. sure enough it was incorrect:

Listen *:portToUse

I tried stopping the Software Update Service & then edited line 241 so it read:

Listen *:8088

However, on restarting the service the file changed the value back to:

Listen *:portToUse

So with the Apple Software Update Service running, I edited line 241 so it read;

Listen *:8088

The error log started to fill with the normal gumpf:

[Wed Apr 11 09:04:05 2012] [notice] mod_bw : Memory Allocated 32 bytes (each conf takes 32 bytes)

[Wed Apr 11 09:04:05 2012] [notice] mod_bw : Version 0.8 – Initialized [1 Confs]

[Wed Apr 11 09:04:05 2012] [notice] Apache/2.2.21 (Unix) configured — resuming normal operations

I then tested clients updating against the server & voila!

3 thoughts on “Error: Syntax error on line 241 of /etc/swupd/swupd.conf: Port must be specified

  1. Thanks for ones marvelous posting! I certainly enjoyed reading it, you’re a great author.I will be sure to bookmark your blog and will often come back later in life.
    I want to encourage you continue your great job, have a nice weekend!

  2. peter brown

    thanks for the post, it works. but is there a more permanent fix to this? it works if i edit the file whilst the server is running, it works, but if i turn it off and back on, it reverts back to listen to port 0 again.

    • Hi Peter,

      I’ve not had to do this since posting 3 years ago, so not really sure what to suggest.

      Wild guess would be to make the change & issue a: sudo killall cfprefsd

      Just incase the file is being cached (it shouldn’t be affected by cfprefsd.. but who knows).

Leave a Reply