Bug Blog 7: ALUI Publisher Port already in use?

This (configuration) bug has been around in Publisher for a while, and I’ve always fixed it the “wrong” way. Occasionally, you may have seen the following error crop up in %PT_HOME%\ptcs\6.x\logs\service.log when starting ALI Publisher, and Publisher fails to start:

INFO | jvm 1 | 2010/07/20 16:59:07 | 16:59:07,450 ERROR Starting failed jboss:service=Naming
INFO | jvm 1 | 2010/07/20 16:59:07 | java.rmi.server.ExportException: Port already in use: 1098; nested exception is:
INFO | jvm 1 | 2010/07/20 16:59:07 | java.net.BindException: Address already in use: JVM_Bind

Why? Well, Publisher uses some internal JNDI services to communicate between components (I think; honestly I have no idea what this port is actually for), and if it can’t grab the port at startup, it can’t start up. Wonderful. This port has always been specified inĀ %PT_HOME%\ptcs\6.x\settings\config\container.conf:


… and I’ve always fixed this problem by changing that port number and re-starting (as I write this blog, the WebCenter Interaction portal you’re reading this site on has a value of 1097 in there, indicating that at some point long ago I had this problem and fixed it this way).

Recently, though, I got a great explanation from Naman Shah at PPC: this has to do with Ephemeral Ports in Windows. The description in that article says it all:

What is not immediately evident is that when a connection is established that the client side of the connection uses a port number. Unless a client program explicitly requests a specific port number, the port number used is an ephemeral port number. Ephemeral ports are temporary ports assigned by a machine’s IP stack, and are assigned from a designated range of ports for this purpose.

In other words, Publisher can’t start because Windows is already using that port for one reason or another. So, now I know the “right” way to fix this issue: rather than playing whack-a-mole changing Publisher’s port every time the problem occurs, you should simply tell Windows not to use that port.

How? In the registry, navigate to HKLM\ SYSTEM\ CurrentControlSet\ Services\ Tcpip\ Parameters\, and add or change a line to the Multi-String value called ReservedPorts. Add in 1098-1098 on its own line, and Windows will stop using that port in the future, allowing Publisher to keep doin’ what it’s doin’.

Tags: , ,

Leave a Reply