Ran into an interesting problem here recently. I was testing out the iChat server on OS X Server 10.6 just to see how it worked. No real utility for me since any local chatting can just as easily be done via Bonjour and otherwise everyone uses my google account directly.
But since it’s there and I was curious I fired it up and got it working with a minimum of fuss, properly linked to the google XMPP federation, so I could chat from my google account to a locally named account. Very slick. Another example of being able to integrate with global services while maintaining a local identity instead of having employees use their gmail or hotmail accounts for chatting.
Once I was done, I figured all that I needed to do was to shut down the service and that would be that. However, I was poking around in the logs and noticed a huge ton of messages about c2s linked to a local IPv6 address (and IPv6 is currently disabled).
11/05/10 11:46:59 jabberd/c2s[2228] [8] [::ffff:192.168.2.201, port=50015] connect11/05/10 11:46:59 jabberd/c2s[2228] [8] [::ffff:192.168.2.201, port=50015] disconnect jid=unbound, packets: 011/05/10 11:47:02 jabberd/c2s[2228] [8] [::ffff:192.168.2.201, port=50016] connect11/05/10 11:47:02 jabberd/c2s[2228] [8] [::ffff:192.168.2.201, port=50016] disconnect jid=unbound, packets: 011/05/10 11:47:04 jabberd/c2s[2228] [8] [::ffff:192.168.2.201, port=50017] connect11/05/10 11:47:04 jabberd/c2s[2228] [8] [::ffff:192.168.2.201, port=50017] disconnect jid=unbound, packets: 0
This was pretty much continuously chewing up log space and when I checked with the server, it claimed that the jabber service was off. But there are a few more associated services that had gotten started up and refused to stop. Found this out using the full status option on the serveradmin command line : $sudo serveradmin fullstatus jabberjabber:domainName = "cube.infrageeks.com"jabber:hosts:_array_index:0 = "cube.infrageeks.com"jabber:mucState = "RUNNING"jabber:currentConnectionsPort1 = "0"jabber:state = "STOPPED"jabber:currentConnectionsPort2 = "0"jabber:pluginVersion = "10.6.100"jabber:serviceMode = "NOTIFICATION"jabber:logPaths:JABBER_LOG = "/var/log/system.log"jabber:logPaths:PROXY_LOG = "/private/var/jabberd/log/proxy65.log"jabber:logPaths:MUC_STD_LOG = "/var/jabberd/log/mu-conference.log"jabber:servicePortsRestrictionInfo = _empty_arrayjabber:currentConnections = "0"jabber:servicePortsAreRestricted = "NO"jabber:readWriteSettingsVersion = 1jabber:startedTime = "2010-05-11 11:44:54 +0200"jabber:proxyState = "RUNNING"jabber:jabberdState = "RUNNING"jabber:setStateVersion = 1
So while the core jabber service was stopped, the proxy and jabberd components were still running. And no amount of starting and stopping the core service via the interface or the command line was able to get rid of these services. As we know with OS X, the Linux style services commands or Solaris svcadm commands have been replaced with launchd. So a quick tour of launchctl shows :
$ sudo launchctl list | grep jabber1455 - org.jabber.proxy651447 - org.jabber.jabberd
Aha! these would be my culprits. Getting rid of them involved unloading their launchd jobs - stopping them is no good since the job will simply auto restart since it’s convinced that it’s supposed to be running. The goofy part about launchd is that you have to refer to the configuration file, rather than the service name. Thankfully it’s pretty consistent with the service name followed by “.plist”. $ sudo launchctl unload /System/Library/LaunchDaemons/org.jabber.proxy65.plist$ sudo launchctl unload /System/Library/LaunchDaemons/org.jabber.jabberd.plist
And to confirm that all is well:
$ sudo serveradmin fullstatus jabberjabber:domainName = "cube.infrageeks.com"jabber:hosts:_array_index:0 = "cube. infrageeks.com"jabber:mucState = "STOPPED"jabber:currentConnectionsPort1 = "0"jabber:state = "STOPPED"jabber:currentConnectionsPort2 = "0"jabber:pluginVersion = "10.6.100"jabber:serviceMode = "NOTIFICATION"jabber:logPaths:JABBER_LOG = "/var/log/system.log"jabber:logPaths:PROXY_LOG = "/private/var/jabberd/log/proxy65.log"jabber:logPaths:MUC_STD_LOG = "/var/jabberd/log/mu-conference.log"jabber:servicePortsRestrictionInfo = _empty_arrayjabber:currentConnections = "0"jabber:servicePortsAreRestricted = "NO"jabber:readWriteSettingsVersion = 1jabber:startedTime = ""jabber:proxyState = "STOPPEDjabber:jabberdState = "STOPPED"jabber:setStateVersion = 1