RussTedrake / manipulation

Course notes for MIT manipulation class
BSD 3-Clause "New" or "Revised" License
430 stars 124 forks source link

Consider ngrok alternatives #146

Closed RussTedrake closed 2 years ago

RussTedrake commented 3 years ago

Reported here and by a few collaborators.

It seems that some time after Aug 10 and before Aug 18, ngrok changed its policy and no longer allows http tunnels to connect ws tunnels on the free account. I have not verified myself, but I understand that logging in to a user account on ngrok resolves the issue. (there is still a limit of 2 connections; passing bind_tls=False to pyngrok helps; otherwise pyngrok grabs http and https for the first request, consuming the full quota immediately).

This is bad news. Effectively all of the notebooks that I've released to date will no longer run meshcat on colab.

Possible resolutions: 1) Find a different way to open a port directly to an http server running on the cloud-provisioned machine. Possibly related to #144 . 2) Host my own ngrok alternative. This looks promising: https://github.com/rightscale/wstunnel 3) Find a way to keep using ngrok; hopefully without requiring users to log in.

RussTedrake commented 3 years ago

One work-around is to make an account on ngrok and authenticate at the top of the notebook:

# This is a fake authtoken... please make your own
!ngrok authtoken 2gdss7722ieEku03B5CFd4d_MJuMQbJ4mzMND449BoEg

You will still be limited to running only a single ngrok process on the free tier. You can use

!pkill ngrok

to clean it up if you need it.

RussTedrake commented 3 years ago

Update: ngrok support got back to me, and said that the change to the free account performance was inadvertent. It's been fixed now.

I will still pursue the options above, as all of them will be better than what we currently use.

RussTedrake commented 3 years ago

@danzvara has enabled http/ws tunneling on deepnote for us! It will only tunnel one port (8080). If we need more then we should still fall back to ngrok.

RussTedrake commented 2 years ago

We've gone with NginX instead https://github.com/RobotLocomotion/drake/pull/16805