ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Rosbridge server websocket secure

asked 2021-05-12 23:19:18 -0500

rmango gravatar image

Hi, I'm trying to get my local rosbridge websocket server to run using websocket secure. This would mean accessing it with the url "wss://localhost:9090" instead of "ws://localhost:9090"

I've tried doing something similar to this project: I've set up my certificates exactly like theirs, and to run my rosbridge server I use the command: roslaunch rosbridge_server rosbridge_websocket.launch ssl:=true certfile:=/etc/ssl/certs/ssl-cert-snakeoil.pem keyfile:=/etc/ssl/certs/ssl-cert-snakeoil.key authenticate:=false.

This does give me the message Rosbridge WebSocket server started at wss:// However, when I go to use this link in my roslibjs interface, I get the error Websocket connection to 'wss://localhost:9090' failed.

This is what my roslibjs code looks like: self.ros = new ROSLIB.Ros({ url: 'wss://localhost:9090'}); Everything works with the "ws://" version of the url.

How do I get a rosbridge websocket server to run using websocket secure? Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2021-08-23 04:14:53 -0500

Den gravatar image

updated 2021-08-24 03:07:23 -0500

There is another answer that worked for me:

Go to https://localhost:9090/ in the browser of your choice, you will be prompted with an error that says this is an insecure site. Keep clicking on links that says something to the effect of "go to site anyway". Finally you would see a blue screen that says: "AutoBahn Python"

Personally, this does not feel like the most secure and proper way to do things, but for the time being it works!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2021-05-12 23:19:18 -0500

Seen: 1,169 times

Last updated: Aug 24 '21