AxisCommunications/locomote-video-player

message: "Socket reported a security error: Error #2048.", code: 731

Balaji-Sundar opened this issue · 21 comments

Hi,
I am using Dahua DVR embedded server its support HTTP and RTSP Live Streaming of Analog Camera's and its running in global server (e.g 121.242.232.196)
I am using locomote-video player from another global server (e.g 121.242.232.158).
I have to live stream data from 121.242.232.196 server to my local 121.242.232.158 server using RTSP protocol.(e.g rtsp://121.242.232.196:554/cam/realmonitor?channel=1)

Both are in same domain and same network only. But i am getting this error message: "Socket reported a security error: Error #2048.", code: 731.

I don't have permission to add cross-domain-policy file at Dahua embedded server.

Please help me to solve this issue. ASAP

Regards
-S.Balaji

If you can't add a socket policy server on the RTSP server, you will not be able to use Locomote to play RTSP from that server.

Can i load policy file from different server

I don't believe so, because it is the lower layer Flash framework that is making that request, and there's no way for the upper layer Locomote to control that. Whenever Locomote asks to open the direct socket (required for RTSP) then Flash is going to request the socket policy from the same hostname/IP. There is nothing Locomote can do about that.

I have added adobe socket policy server. But now i am getting another error
API is ready. play can now be called
VM123:111 Log Message: RTSP OUT:
VM123:111 Log Message: RTSPClient: switching authorization from none to basic
VM123:111 Log Message: RTSP OUT:
VM123:108 Object {message: "Unauthorized", code: 401}

I am using RTSP over TCP and my url is like "rtsp://USERNAME:PASSWORD@IP ADDRESS/cam/realmonitor?channel=1&subtype=00"

Same URL working fine with VLC media player.

Please help me to solve this issue. ASAP

You could be having the same issue I encountered with Foscam cameras. What I found is that Locomote disconnects and reconnects when switching authorizations. The server really needs to see the login occur on the same TCP connection as it issued the nonce in the 401 response.

I submitted a pull request to address this. #156
You might give it a try and see if it resolves your issue. You'll have to compile the SWF yourself.

I have changed my code and compiled. but i am getting same error

Hi BrandonLWhite,
I need your help to solve my problem.
Foscam cameras supports adobe socket server policy. if not now did you connect to Foscam cameras via RTSP protocol.

In our application we have a separate Linux system behind the same NAT device as a the camera. So we were able to setup the Linux system to respond to the socket policy request and configure the NAT to do the port forwarding. Thus to an external client (ie Flash client) it all appears to be handled from from the same IP, and so it works.

I am doing same thing but its not working.

I am running resin server with adobe socket policy server. In same server I
have port forwarding rule for rtsp 554 request to camera
On 12-Oct-2015 20:25, "Brandon White" notifications@github.com wrote:

In our application we have a separate Linux system behind the same NAT
device as a the camera. So we were able to setup the Linux system to
respond to the socket policy request and configure the NAT to do the port
forwarding. Thus to an external client (ie Flash client) it all appears to
be handled from from the same IP, and so it works.


Reply to this email directly or view it on GitHub
#155 (comment)
.

I have added the following iptables rules in Linux machine, Socket policy request working fine and RTSP stream only failed with reply of Unauthorized
iptables -t nat -A PREROUTING -p tcp -d Linux Machine IP Address --dport 554 -j DNAT --to CAMERA IP Address:554
iptables -t nat -A POSTROUTING -p tcp -d CAMERA IP Address--dport 554 -j SNAT --to Linux Machine IP Address
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

I don't know the rule is correct or not.

Please share your iptables rules.

Can you please share crossdomain.xml file also

I have fixed Unauthorized, but i am stuck on "Log Message: RTSPClient: STATE_OPTIONS"

Please help me solve this problem

I am getting parsed.headers.public as undefined

vinir commented

We have added cross-domain-policy on RTSP server but still getting same error - code: 731, message: "Socket reported a security error: Error #2048."

is there any other points needs to be change. It will play with any RTSP stream which is played by VLC player or any limitations.

Your reply will be highly appreciated

And the cross-domain-policy is available at port 843?

Hi, I also have a similar problem. I'm facing Socket Error 2031 code 732 and then 731. It is strange because while using locomote over lan everything is working just fine but while trying to access from my VPN it is throwing errors mentioned above. cross-domain-policy is available across the network. I have got LAN, VLAN_CAM(separated vlan only for Camera) and VPN. While in LAN there is no problem to access via locomote VLAN_CAM but while in VPN I'm getting errors. I had to separate my Camera to VLAN because I was not able to set up cross-domain-policy. So now I'm asking my router for a stream on port 554. Router is responding with socket policy on port 843 and is redirecting 554 do VLAN_CAM and in this case locomote is working fine. If I move to VPN then locomote is not working. Everything else is working fine from VPN. I have no problem to access Camera configuration site via router retirection on port for example 8080. Examples below:
1)
Client(IP like: 192.168.1.123) -> WWW(IP like: 192.168.1.124 locomote player) -> Router(IP like: 192.168.1.1:554) -> redirect to Camera(IP like: 192.168.0.123)

  • in this case everything is working fine

Client(IP like 10.8.0.6 on VPN) -> route via -> 192.168.1.1 -> WWW(IP like: 192.168.1.124 locomote player) -> Router(IP like: 192.168.1.1:554) -> redirect to Camera(IP like: 192.168.0.123)

  • in this case locomote is not working (errors above)
  • ping, www, telnet etc to WWW, Router and Camera working fine.

I've stuck ..... please help what should i do ?

Do you still get a cross-domain when accessing through VPN?

Yes:

perl -e 'printf "<policy-file-request/>%c",0' | nc 192.168.1.1 843
<cross-domain-policy><allow-access-from domain="*" to-ports="*" /></cross-domain-policy>

and I'm still getting:

Object {message: "Socket reported an IOError: Error #2031.", code: 732}
Object {message: "Socket reported a security error: Error #2048.", code: 731}

any clue ?

?

Guys, any improvement on this? I downloaded new version but still the same problem. I don't believe I'm the only one using VPN to see video from the camera ... please help me on this.