Highlighted

RPC gives errors

Souvik_s_screen

14-07-2009

I’ve created a AMF channel using the following block of codes:

var cs:ChannelSet = new ChannelSet();
var amfChannel:Channel = new AMFChannel("my-amf", "http://localhost:8080/lcds-samples/messagebroker/amf");
cs.addChannel(amfChannel);

This does not show any errors. But whenever I change ‘localhost’ by my machine’s IP, i.e.,

var cs:ChannelSet = new ChannelSet();
var amfChannel:Channel = new AMFChannel("my-amf", "http:// 192.168.1.102:8080/lcds-samples/messagebroker/amf");
cs.addChannel(amfChannel);

it is throwing errors as follows:

Received fault: [RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://192.168.1.102:8080/lcds-samples/messagebroker/amf'"]

I’m using JBoss 5. I could provide more details if it is required. Please help

Replies

Highlighted

chetanm_oct

14-07-2009

Couple of checks/options you can try

-- Is the url valid http:// 192.168.1.102:8080 (The space is due to formatting or its there)

-- Is the server accessible at that url i.e. if you access http://192.168.1.102:8080 what do you see

-- JBoss by default binds to the local loopback. You would have to start JBoss with -b 0.0.0.0 argument so that it binds to all the interfaces

Highlighted

Souvik_s_screen

24-07-2009

I’m stuck to a point where port 2035 is working in the local server, but it does not work for another server. The code is as follows:

private var host:String = "xxx.xxx.xxx.xxx”;

private var port:int = 2035;

                          

var cs:ChannelSet = new ChannelSet();

var rtmpChannel:Channel = new RTMPChannel("my-rtmp", "rtmp://" + host + ":" + port);

cs.addChannel(rtmpChannel);

the above code works where host in the above code is 192.168.1.102 but doesn’t work for 63.133.158.174

I need an urgent solution. Please help.