I have an idea I’ve been rolling around in my head for a nice Flex and Apollo application. Sorry, I won’t tell you what it is yet. Just incase it’s my billion dollar idea. (As if.) Seriously, I’m just playing with Flex right now.
Anyhow, I’ve played with Flex Builder in the past but never Flex Data Services. I figured that if I’m going to jump into Apollo I might as try out the new LiveCycle Data Services 2.5, which is a beta update to FDS.
So, I went ahead and installed LCDS. I was going to install it under my current JRun 4 installation but for some reason I couldn’t pull up the JRun admin interface. Instead of worrying about that I decided to try the LCDS install with integrated JRun. I thought this would be similar to a multi-server installation of ColdFusion, but it turns out it’s much more similar to the server installation of ColdFusion, which happens to be what I’d really rather have for now anyhow.
So LCDS installs without a hitch. Once it’s installed I quickly figure out that I can start the server by clicking Start > Programs > Adobe > LiveCycle Data Services 2.5 > Start Integrated LiveCycle Data Services Server. This opens a command window and runs whatever commands are needed to fire up LCDS.
However, as I watched the resulting status scroll by I noticed this failure message:
03/22 22:39:38 user FlexInternalServlet: init [Flex] RTMP-Server on port: 2038 failed to start up. java.net.BindException: Address already in use: bind at sun.nio.ch.Net.bind(Native Method) at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) at flex.messaging.endpoints.rtmp.BaseNIORTMPServer.run(BaseNIORTMPServer .java:158) at java.lang.Thread.run(Unknown Source) flex.messaging.endpoints.rtmp.RTMPException: The RTMP server has encountered a fatal exception starting up: Address already in use: bind at flex.messaging.endpoints.rtmp.BaseNIORTMPServer.run(BaseNIORTMPServer .java:320) at java.lang.Thread.run(Unknown Source)
The message “Address already in use” was pretty descriptive and the port 2038 was fairly clear too. Unfortunately I wasn’t able to turn up much by googling any of the error message or the port number.
It occurred to me that I could simply use netstat to see what’s listening on port 2038.
Running netstat b will return all of the open ports and the executable associated with it. In my case this showed that port 2038 was being used by googletalk.exe. Doh!
Searching for anything with the word “google” and “2038” was useless. I seems that Google is infamous for setting a cookie that doesn’t expire till 2038 and all the matches were for people griping about this.
However, after a few more variations on the search I discovered that I could safely change the port that RTMP is running on. To do this I found my services-config.xml file for Flex which was located under the C:lcdsjrun4serversdefaultflexWEB-INFflex directory.
I simply searched for the number 2038 in this file and changed its one occurrence to 2039. Like this:
The next time I fired up LCDS I received no errors!
Now, honestly, I have no idea if this will break something else down the line. I suspect that I’ll eventually try to use RTMP (whatever that is) and believe it to be broken because, by default, something will try to connect on port 2038, not 2039. Oh well, I’ll cross that bridge when I get there.