Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

./sbot whoiam -> Could not connect to the scuttlebot server. #15

Open
mimosinnet opened this issue Nov 2, 2018 · 11 comments
Open

./sbot whoiam -> Could not connect to the scuttlebot server. #15

mimosinnet opened this issue Nov 2, 2018 · 11 comments

Comments

@mimosinnet
Copy link

I am stuck at step 3 of the manual setup tutorial. The container ahdinosaur/ssb-pub starts:

CONTAINER ID        IMAGE                       COMMAND   CREATED              STATUS                         
2e2b79e0083e        ahdinosaur/healer      "/bin/healer"  32 minutes ago      Up 32 minutes healer
ddbbe986ce08        ahdinosaur/ssb-pub   "sbot server" About an hour ago  Up About an hour (unhealthy)   0.0.0.0:8008->8008/tcp   sbot

Nevertheless,

% ./sbot whoami
Error: Could not connect to the scuttlebot server.
Use the "server" command to start it.

It is possible to ssh into the container and issue the command with the same output:

% docker exec -it sbot bash
node@ddbbe986ce08:~/.npm-global/bin$ ./sbot whoiam
Error: Could not connect to the scuttlebot server.
Use the "server" command to start it.

I would appreciate any hint on how to debug this issue. Thanks!

@2color
Copy link

2color commented Nov 26, 2018

I'm experiencing the same problem.

@2color
Copy link

2color commented Nov 26, 2018

@mimosinnet
I was able to find the source of the problem.

I think it has to do with the ssb_host env var (declared in https://github.com/ssbc/ssb-config) badly configured in the docker run command -e ssb_host.

@qbolec
Copy link

qbolec commented Dec 8, 2018

I was following the simplified list of steps, and in step 8 I've was stucked, because doing

./sbot whoami

has displayed an Error that there is no docker sbot running.
I've figured that I have to run ./create-sbot before step 8.
Perhaps that is on the picture titled digital-butt-step-3.png, but unfortunately the pictures do not load :(

@ahdinosaur
Copy link
Owner

hi @mimosinnet @2color @qbolec, sorry y'all are having trouble using ssb-pub!

i just setup another two pubs, one using the automated setup and one using manual setup, i wasn't able to reproduce any errors.

i can echo what @2color said:

I think it has to do with the ssb_host env var (declared in https://github.com/ssbc/ssb-config) badly configured in the docker run command -e ssb_host.

if you want to use a domain name for your pub, please ensure you have setup a DNS A record pointing from your domain name to the ip address of your pub server, and your ./create-sbot command has host=your.domain.name with your domain name.

if you don't have this setup properly, then you will get the error described in the original post.

@ahdinosaur
Copy link
Owner

I was following the simplified list of steps, and in step 8 I've was stucked, because doing

./sbot whoami

has displayed an Error that there is no docker sbot running.
I've figured that I have to run ./create-sbot before step 8.

@qbolec: the automated installer at butt.nz should have already run ./create-sbot for you, so you don't need to run it again unless you want to change the host as described in the optional steps 11 and 12.

@ahdinosaur
Copy link
Owner

also apologies for my late response! on a positive note, i've been working on a new approach to pubs for PeachCloud, hopefully in a few months will have something to replace ssb-pub using only Debian packages (so installation should be a breeze), stay tuned! 💃

@mplorentz
Copy link

@ahdinosaur I am also having some issues running through the "manual setup" steps. Is it possible that you have a config file that is causing your tests to succeed but ours to fail?

@ahdinosaur
Copy link
Owner

@mplorentz each time i'm starting from a brand new Digital Ocean server. maybe i should record a screencast?

@mplorentz
Copy link

@ahdinosaur thanks for the offer but your instructions are really very clear!

I figured out my issue. For some reason setting the ssb_host environment variable seems to break sbot. Removing the -e line from my create_sbot allowed me to successfully run sbot whoami.

Of course with no hostname I can't generate invites. But placing a config in the ssb-pub-data directory with the following format seems to work.

{
   "connections": {
      "incoming": {
         "net": [{ "host": "mypub.com", "port": 8008, "scope": "public", "transform": "shs" }]
      },
      "outgoing": {
         "net": [{ "transform": "shs" }]
      }
   }
}

Is the ssb_host environment variable no longer supported by sbot?

@adrigen
Copy link

adrigen commented Feb 18, 2020

if you want to use a domain name for your pub, please ensure you have setup a DNS A record pointing from your domain name to the ip address of your pub server, and your ./create-sbot command has host=your.domain.name with your domain name.

Thanks, that helped me sort my issue out.

@justinabrahms
Copy link

I had this same issue with the kubernetes configuration. If you'd like to make it work there, you'll probably want to do something like:

SSB_APPNAME=mm MM_SSB_HOST=127.0.0.1 sbot whoami

This sets the app context as mm then lets you prefix config variables with mm to change them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants