You are reading content from Scuttlebutt
@mix %iQyIyOrQ8MH+VqeFB2I0N1fsws5tlpLL6wWZmO25Djk=.sha256
Re: %QFCBeOAUb

very fair feedback. Thank you for saying this kindly and clearly @Andrei Cociuba, is really really appreciated.

Can you tell us about your current setup?

I'm fairly familiar with scuttlebutt and I found setting up my own pub on digital ocean recently quite fidely! My setup is (digitial ocean) with a copy of ssb-server@14 cloned down with git and installed (because a global install with npm was causing some problems), and then running a while loop in tmux (so that the server keeps running no matter what).

Sorry that's quite a lot of jargon, I'm happy to unpack all of that if needed. I just wanted to write a quick list of how and where I am so that you (and others) can ask for more detail or compare immediately if you get it.

@Andrei Cociuba %Bm67qc0agIRYzc8kujtT0PMMch/+ygIqPOOgNwlobk4=.sha256

My setup is my own server under my desk running some sort of ubuntu (17.10 but i suck at keeping documentation and i have some other repositories installed that prevent me from updating it further and i dont have the time and patience right now to deal with this) with latest npm install running in tmux. while loop seems to be unecessary for me atm. i keep updating it with
sudo npm install -g ssb-server

right now i get this when i try to make a new invite code:

`
node /home/an3/.npm-global/bin/ssb-server invite.create 10000 --verbose
Error: Could not connect to ssb-server :::8008
Use the "start" command to start it.
Use --verbose option to see full error
/home/an3/.npm-global/lib/node_modules/ssb-server/bin.js:105
if(config.verbose) throw err
^

Error: could not connect to sbot
at /home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/ssb-client/client.js:70:23
at next (/home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/multiserver/compose.js:24:14)
at /home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/multiserver/compose.js:34:9
at _cb (/home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/multiserver/plugins/shs.js:28:20)
at /home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/secret-handshake/protocol.js:117:22
at /home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/pull-handshake/index.js:10:5
at /home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/pull-handshake/index.js:23:13
at callback (/home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/pull-pushable/index.js:81:7)
at drain (/home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/pull-pushable/index.js:68:39)
Error: shs.client: error when expecting server to accept challenge (phase 1).
possibly the server is busy, does not speak shs or uses a different application cap
at abort (/home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/secret-handshake/protocol.js:37:45)
at Object.cb (/home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/secret-handshake/protocol.js:44:24)
at drain (/home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/pull-reader/index.js:43:23)
Error: stream ended with:0 but wanted:64
at drain (/home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/pull-reader/index.js:43:26)
at /home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/pull-reader/index.js:63:18
at /home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/pull-reader/index.js:20:7
at drain (/home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/stream-to-pull-stream/index.js:126:18)
at Socket.<anonymous> (/home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/stream-to-pull-stream/index.js:147:5)
at emitOne (events.js:101:20)
at Socket.emit (events.js:188:7)
at TCP._handle.close [as _onclose] (net.js:509:12)\

`

and my config file is

{
"incoming": {
"net": [
{ "scope": "public", "external": ["cociubaandrei.ddns.net"], "transform": "shs", "port": 8008 },
{ "scope": "private", "transform": "shs", "port": 8008, "host": "192.168.0.230" }
]
},
"outgoing": {
"net": [{ "transform": "shs" }]
},
"friends.dunbar": "5000",
"friends.hops": "5",
"pub":"true"
}

the last three items i just added yesterday, i don't even know if they belong there or not i just wanted to see if they do something

@Andrei Cociuba %IiguzOvsvobF2qGpUat5qJK/v24dWgVLV1dNRPTrxJs=.sha256

@mixmix i forgot to tag you. let me know if you want me to keep tagging you along or not.

@Andrei Cociuba %cT9hc1NyOsRJYYf11m7e7JQ93N3lBj5tzIKmb1Qvb/w=.sha256

also, getting help on my particular issue is very welcome, not to be a choosing beggar, but i wish to remind people that my original intent was to convey the fact that i usually get along in figuring stuff out on my own a lot better than i seem to be able to do with the pub server currently.

while it is totally possible that i am a complete idiot this time (as i sometimes am), perhaps me speaking up might better indicate to people smarter than me if this is a real problem or not

@mix %EKd+RqKMRemZnWHQFJ0G9cOIuOK3zHHrc9ohoS4f6vU=.sha256

you need the server to be running @Andrei Cociuba

try

$ ssb-server start

then try running that command in another terminal window. Actually start with something a little safer

$ ssb-server whoami
@Andrei Cociuba %H6fe2Vp1mfCL54BGKWN9XKnU8ajF2T3sqevlm68tcK8=.sha256

its running in a different tmux window. quite proliffically, i have it set to verbose logging and its quite happily connecting to various people

@Andrei Cociuba %VSCZLWmB60oQP/oCrJxVGdBP+cyCjm2INy2wrEouU80=.sha256

i might be a script kiddie but i am not a complete rookie.

@Andrei Cociuba %xKQSqtPEUmuVrWO805EV/Ld2plyvqfMYohEfi93hHDY=.sha256

Ok, i restarted it, and now i have a different error:

'
node /home/an3/.npm-global/bin/ssb-server invite.create 10000 --verbose

/home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/muxrpcli/index.js:125
throw err
^
TypeError: cb is not a function
at Object.<anonymous> (/home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/ssb-invite/index.js:93:26)
at apply (/home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/muxrpc-validation/index.js:199:15)
at Object.<anonymous> (/home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/muxrpc-validation/index.js:86:14)
at Object.hooked (/home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/hoox/index.js:10:15)
at Object.localCall (/home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/muxrpc/local-api.js:31:29)
at Object.<anonymous> (/home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/muxrpc/local-api.js:37:22)
at Object.request (/home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/muxrpc/stream.js:48:17)
at PacketStream._onrequest (/home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/packet-stream/index.js:161:17)
at PacketStream.write (/home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/packet-stream/index.js:134:41)
at /home/an3/.npm-global/lib/node_modules/ssb-server/node_modules/muxrpc/pull-weird.js:56:15
'

@Andrei Cociuba %W5u2dwqoEbkDRl1i3FSPC/Qyh/FEKd3ysom1/l2VmiI=.sha256

but the very fact i had to restart it is indicative of SOMETHING. can't put my finger on what exactly.

wrong config file causing something inside it to crash while still being perfectly happy connecting to other people?

is the cli connecting to it via a socket? via localhost:port?

lots of things that i could look up in some sensible documentation.

@Andrei Cociuba %x603un5Ex8Q8rO/FbnV7Y1Ddnxl5b+8l+pX3HVnA5QU=.sha256

the new error about the callback function.

am i missing some dependency? is it supposed to call back some function that isnt packaged with npm?

@mix %WTsaMjVJRKV7bgkD+lIHs9erRlw1xXgR5t9i/3kwXhc=.sha256

config

try not setting any config in ~/.ssb/config to start with... you're adding complexity which I don't think is needed to start with.

Also, there are couple of off things about your config:

  • I don't know if those " you've used are valid for JSON ... they might be causing problems
  • "friends.hops" isn't quite right (see below)
  • "incoming" I think needs to be set inside connections
  • values that are integers (like 5000) or booleans (like true) shouldn't have quotes marks

As I said, start with no config then build it up. If you get things working without messing your config, here's what a more fixed version of your config might look like:

{
  "connections": {
    "incoming": {
      "net": [
        { "scope": "public", "external": ["cociubaandrei.ddns.net"], "transform": "shs", "port": 8008 },
        { "scope": "private", "transform": "shs", "port": 8008, "host": “192.168.0.230” }
      ]
    },
    "outgoing": {
      "net": [{ "transform": "shs" }]
    }
  },
  "friends": {
    "dunbar": 5000,
    "hops": 5
  },
  "pub": true
}

ssb-server version

I don't know if the latest ssb-server is stable. Try using the one I'm using which I know works:

$ npm install -g ssb-server@14

This will install version 14 instead of version 15


It's getting later here @Andrei Cociuba (in New Zealand), good luck and keep us posted.

@Andrei Cociuba %u3t+NhQkzkwr7OfRL7V7RP7TuFswoIvABn8l2Mslhng=.sha256

i will put version 14 up and put up the corrected config file right now. ill keep you posted

@mix %5a2vIwHVtqsH0Hv+jY3bthm0Te3dKeWKIVo8iVgb/ek=.sha256
Voted i will put version 14 up and put up the corrected config file right now. il
Join Scuttlebutt now