staltz / ssb-room

A server to find and connect to other SSB peers – a meeting place. AGPL-3.0
GNU Affero General Public License v3.0
109 stars 17 forks source link

Error with Instructions on Debian 9 #21

Open adchristodoulou opened 3 years ago

adchristodoulou commented 3 years ago
> `root@ssb-room:~# cat > ./create-room <<EOF
> #!/bin/bash
> memory_limit=$(($(free -b --si | awk '/Mem\:/ { print $2 }') - 200*(10**6)))
> docker run -d --name room \
>    -v ~/ssb-room-data/:/home/node/.ssb/ \
>    --network host \
>    --restart unless-stopped \
>    --memory "\$memory_limit" \
>    staltz/ssb-room
> EOF
root@ssb-room:~# nano create-room
root@ssb-room:~# chmod +x ./create-room
root@ssb-room:~# ./create-room
WARNING: Your kernel does not support swap limit capabilities or the cgroup is n                                                                                                                               ot mounted. Memory limited without swap.
a386438bbf343109579a460580442aa9e177511dc84e78b2eef885e747553ed9
root@ssb-room:~# cat > ./room <<EOF
> #!/bin/sh
> docker exec -it room ssb-room \$@
> EOF
root@ssb-room:~# chmod +x ./room
root@ssb-room:~# ./room check
{ message: 'no async:whoami',
  name: 'Error',
  stack:
   'Error: no async:whoami\n    at Object.localCall (/home/node/.npm-global/lib/                                                                                                                               node_modules/ssb-room/node_modules/muxrpc/local-api.js:29:13)\n    at Object.<an                                                                                                                               onymous> (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/muxrpc/l                                                                                                                               ocal-api.js:37:22)\n    at Object.request (/home/node/.npm-global/lib/node_modul                                                                                                                               es/ssb-room/node_modules/muxrpc/stream.js:48:17)\n    at PacketStream._onrequest                                                                                                                                (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/packet-stream/in                                                                                                                               dex.js:161:17)\n    at PacketStream.write (/home/node/.npm-global/lib/node_modul                                                                                                                               es/ssb-room/node_modules/packet-stream/index.js:134:41)\n    at /home/node/.npm-                                                                                                                               global/lib/node_modules/ssb-room/node_modules/muxrpc/pull-weird.js:56:15\n    at                                                                                                                                /home/node/.npm-global/lib/node_modules/ssb-room/node_modules/pull-stream/sinks                                                                                                                               /drain.js:24:37\n    at /home/node/.npm-global/lib/node_modules/ssb-room/node_mo                                                                                                                               dules/pull-goodbye/node_modules/pull-stream/throughs/filter.js:17:11\n    at Obj                                                                                                                               ect.cb (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/packet-str                                                                                                                               eam-codec/index.js:111:11)\n    at drain (/home/node/.npm-global/lib/node_module                                                                                                                               s/ssb-room/node_modules/pull-reader/index.js:39:14)' }

`

I created a new DO $5 box on Debian 9 and followed the instructions in https://github.com/staltz/ssb-room/blob/master/manual-setup.md to the letter. No problems at all until I got to the ./room check step, where I got the above.

There was a warning in ./create-room, but I didn't follow what that meant.

adchristodoulou commented 3 years ago

However, by visiting my room's IP address, it seems to be working OK.

danmackinlay commented 3 years ago

Oh, that error is the same as on OVH #19

danmackinlay commented 3 years ago

Hm. I am wondering if there is perhaps a problem with the instructions, since we are both getting similar weird errors in similar ways. To clarify, in install.md I am not always sure which directory the commands should be executed as, and as which user. on the default DO image there seem to be two options for user debian and root and two corresponding obvious directories to execute commands in, /home/debian and /root. Are we executing things in the wrong place or as the wrong user?

danmackinlay commented 3 years ago

BTW, docker is included in the package repo for Debian 10 which could save a few steps in those instructions.

adchristodoulou commented 3 years ago

If it helps, I executed everything as the root user.

danmackinlay commented 3 years ago

Which directory are you in? ~root or ~debian?

Disclaimer: I'm no expert here. and this is possibly a distraction.

AFAICT the default DO login leaves you in /root which user debian does not have access to, but then the created directory /root/ssb-room-data is assigned to user debian, which seems weird. Maybe this is fine in docker land, though?

adchristodoulou commented 3 years ago

I'm in /root.