Studio SUP REST services in 0.57.0 on OS X

I’m running the latest 0.57 version of Hab, but I can’t seem to access the SUP REST api. This is show on hab sup run

[23][default:/src:1]# hab sup run
hab-sup(MR): Supervisor Member-ID fbf3ed0685d4438488022e0b48065cb8
hab-sup(MR): Starting gossip-listener on 0.0.0.0:9638
hab-sup(MR): Starting ctl-gateway on 127.0.0.1:9632
hab-sup(MR): Starting http-gateway on 0.0.0.0:9631

But when I open a browser and go to https://127.0.0.1:9631/census or http://127.0.0.1:9631/census or localhost:9631 (either http or https), I get:

This site can’t be reached
localhost refused to connect.
Search Google for localhost 9631 census
ERR_CONNECTION_REFUSED

Any thoughts on what I’m doing wrong?

Are you running a docker studio? If you are, you’ll need to set HAB_DOCKER_OPTS to expose the supervisor API outside the container. I usually install core/curl and core/jq-static and do all my API querying inside the studio.

2 Likes

That’s what I needed reminded of.
export HAB_DOCKER_OPTS="-p 9631:9631" before hab studio enter

Thanks!