The amazing adventures of Doug Hughes

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:

<endpoint url="http://{server.name}:2038"/>

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.

Comments on: "LiveCycle Data Services, RTMP and Port 2038" (7)

  1. Your change to the port number should be good enough, everything that uses RTMP will go to the right port.

    Like

  2. Steven Erat said:

    Changing the port number as you’ve done will work without any problems (AFAIK).

    Like

  3. rtmp (Real Time Messaging Protocol) is a protocol created by adobe. It was first introduced in flash communication server. Then the used in flash media server. It mainly used for real time communication apps(like chat and webcam sharing)and FLV streaming. The default port for rtmp servers is 1935. the protocol is being reverse engineered by Red5 (google it).

    Like

  4. Peter Buchmann said:

    Hi
    I had the exact same problem. When I changed the port number,hpwever, I still got the same error message. Looking at the Tomcat messages I got the impression that flex is actually initialized twice. I changed the name of my web application from xxx.war to xxx and the Tomcat started without any error messages. Any thouhts on that?

    Like

  5. I had this problem and then realized that I had accidentally dropped a flex.war in my application server’s deploy directory. One I removed it I could run my application. Make sure you don’t have any other flex apps being deployed that would initialize this port.

    Like

  6. Thx,just got same problem. Remove another lcds project from tomcat server, and it’s ok now.

    Like

  7. THANKS! I had this exact same error regarding port #2038, and solved it by removing the ‘flex.war’, ‘flex-admin.war’, and ‘samples.war’ archives that came with my LCDS installation from my app server deploy directory. 🙂

    Like

Comments are closed.

Tag Cloud