staltz / ssb-room Goto Github PK
View Code? Open in Web Editor NEWA server to find and connect to other SSB peers – a meeting place. AGPL-3.0
License: GNU Affero General Public License v3.0
A server to find and connect to other SSB peers – a meeting place. AGPL-3.0
License: GNU Affero General Public License v3.0
I've tried to add both the client and server as secret-stack plugins but instead I saw:
plugin named:tunnel is already loaded, skipping
My use-case is that Oasis works as both a user-facing client and as a public SSB viewer, so I'd like to be able to use both.
Running the manual install instructions creates a room that seems to start up but cannot pass a ./room check
succesfully.
Here is a transcript of the state the system gets in to, on an ovh.com vanilla Debian 10 VM.
$ ./create-room
WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
29c9d7937727bb8e8e15c2be0f1a4690f50775abecceacd0deae24524b383d2d
$ docker logs room
2020-11-05T20:33:20.742Z secret-stack Adding transport net
2020-11-05T20:33:20.746Z secret-stack Adding transform shs
2020-11-05T20:33:20.749Z ssb:conn-db Created new conn.json because there was no existing conn.json nor gossip.json
Thu, 05 Nov 2020 20:33:20 GMT express:application set "x-powered-by" to true
Thu, 05 Nov 2020 20:33:20 GMT express:application set "etag" to 'weak'
Thu, 05 Nov 2020 20:33:20 GMT express:application set "etag fn" to [Function: generateETag]
Thu, 05 Nov 2020 20:33:20 GMT express:application set "env" to 'development'
Thu, 05 Nov 2020 20:33:20 GMT express:application set "query parser" to 'extended'
Thu, 05 Nov 2020 20:33:20 GMT express:application set "query parser fn" to [Function: parseExtendedQueryString]
Thu, 05 Nov 2020 20:33:20 GMT express:application set "subdomain offset" to 2
Thu, 05 Nov 2020 20:33:20 GMT express:application set "trust proxy" to false
Thu, 05 Nov 2020 20:33:20 GMT express:application set "trust proxy fn" to [Function: trustNone]
Thu, 05 Nov 2020 20:33:20 GMT express:application booting in development mode
Thu, 05 Nov 2020 20:33:20 GMT express:application set "view" to [Function: View]
Thu, 05 Nov 2020 20:33:20 GMT express:application set "views" to '/views'
Thu, 05 Nov 2020 20:33:20 GMT express:application set "jsonp callback name" to 'callback'
Thu, 05 Nov 2020 20:33:20 GMT express:router use '/' query
Thu, 05 Nov 2020 20:33:20 GMT express:router:layer new '/'
Thu, 05 Nov 2020 20:33:20 GMT express:router use '/' expressInit
Thu, 05 Nov 2020 20:33:20 GMT express:router:layer new '/'
Thu, 05 Nov 2020 20:33:20 GMT express:router use '/' serveStatic
Thu, 05 Nov 2020 20:33:20 GMT express:router:layer new '/'
Thu, 05 Nov 2020 20:33:20 GMT express:router use '/' urlencodedParser
Thu, 05 Nov 2020 20:33:20 GMT express:router:layer new '/'
Thu, 05 Nov 2020 20:33:20 GMT express:application set "port" to 8007
Thu, 05 Nov 2020 20:33:20 GMT express:application set "views" to '/home/node/.npm-global/lib/node_modules/ssb-room/pages'
Thu, 05 Nov 2020 20:33:20 GMT express:application set "view engine" to 'ejs'
Thu, 05 Nov 2020 20:33:20 GMT express:router:route new '/'
Thu, 05 Nov 2020 20:33:20 GMT express:router:layer new '/'
Thu, 05 Nov 2020 20:33:20 GMT express:router:route get '/'
Thu, 05 Nov 2020 20:33:20 GMT express:router:layer new '/'
Thu, 05 Nov 2020 20:33:20 GMT express:router:route new '/setup'
Thu, 05 Nov 2020 20:33:20 GMT express:router:layer new '/setup'
Thu, 05 Nov 2020 20:33:20 GMT express:router:route get '/setup'
Thu, 05 Nov 2020 20:33:20 GMT express:router:layer new '/'
2020-11-05T20:33:20.786Z ssb:room:http Express app is running on port 8007
2020-11-05T20:33:20.788Z secret-stack net plugin creating transport host=0.0.0.0 port=8008 scope=public
2020-11-05T20:33:20.788Z secret-stack creating server net shs host=0.0.0.0 port=8008 scope=public
2020-11-05T20:33:20.788Z secret-stack net plugin creating transport host=0.0.0.0 port=8008 scope=public
2020-11-05T20:33:20.789Z secret-stack net plugin creating transport host=undefined port=NaN scope=undefined
2020-11-05T20:33:20.790Z multiserver:net Listening on 0.0.0.0:8008
$ ./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.<anonymous> (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/muxrpc/local-api.js:37:22)\n at Object.request (/home/node/.npm-global/lib/node_modules/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/index.js:161:17)\n at PacketStream.write (/home/node/.npm-global/lib/node_modules/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_modules/pull-goodbye/node_modules/pull-stream/throughs/filter.js:17:11\n at Object.cb (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/packet-stream-codec/index.js:111:11)\n at drain (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/pull-reader/index.js:39:14)' }
The Dockerfile adds an intel specific tini binary. The docker build goes though, but it does not work. Instead you get
cannot execute binary file: Exec format error
when starting the docker image.
For my rasperry pi it works if i fetch the armhf specific binary:
https://github.com/krallin/tini/releases/download/v0.19.0/tini-armhf
This should probably be resolved automatically somehow, or maybe provide a workaround in the instructions.
Hey, Thanks for the amazing work you've done so far on this ssb-room project!
As the title suggests, I got bit of a question.
I've been trying to give my new room a name, picture and description. the only commands that seem to be available when executing ssb-room seem to be:
ssb-room start (which is performed in Dockerfile)
ssb-room check (which is performed in Dockerfile)
When I however execute the second one with an ssb-room running I get the error:
{ 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.<anonymous> (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/muxrpc/local-api.js:37:22)\n at Object.request (/home/node/.npm-global/lib/node_modules/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/index.js:161:17)\n at PacketStream.write (/home/node/.npm-global/lib/node_modules/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_modules/pull-goodbye/node_modules/pull-stream/throughs/filter.js:17:11\n at Object.cb (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/packet-stream-codec/index.js:111:11)\n at drain (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/pull-reader/index.js:39:14)' }
Is there a way to set the name, description and profile pic for an SSB room?
edit: Slightly more readable stack-trace from error above:
Error: no async:whoami
at Object.localCall (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/muxrpc/local-api.js:29:13)
at Object.<anonymous> (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/muxrpc/local-api.js:37:22)
at Object.request (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/muxrpc/stream.js:48:17)
at PacketStream._onrequest (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/packet-stream/index.js:161:17)
at PacketStream.write (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/packet-stream/index.js:134:41)
at /home/node/.npm-global/lib/node_modules/ssb-room/node_modules/muxrpc/pull-weird.js:56:15
at /home/node/.npm-global/lib/node_modules/ssb-room/node_modules/pull-stream/sinks/drain.js:24:37
at /home/node/.npm-global/lib/node_modules/ssb-room/node_modules/pull-goodbye/node_modules/pull-stream/throughs/filter.js:17:11
at Object.cb (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/packet-stream-codec/index.js:111:11)
at drain (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/pull-reader/index.js:39:14)
For those of us working with ssb-browser-demo, it would be great if the default installer and manual installation instructions could enable support for WebSockets by default. See also:
Hey Andre,
Super cool new project! Tried to create my own room, but after following the steps, the container wouldn't start. When running docker logs room
, I see this error:
Error: EACCES: permission denied, open '/home/node/.ssb/secret'
at Object.openSync (fs.js:443:3)
at Object.writeFileSync (fs.js:1194:35)
at Object.exports.createSync (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/ssb-keys/storage.js:104:8)
at Object.exports.loadOrCreateSync (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/ssb-keys/index.js:89:20)
at setDefaults (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/ssb-config/defaults.js:71:27)
at module.exports (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/ssb-config/inject.js:7:16)
at Object.<anonymous> (/home/node/.npm-global/lib/node_modules/ssb-room/config.js:4:16)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
Did I miss a step maybe?
Thanks!
Not to complain, but I'll post this here so I can know if it is just me, or if this is a known thing.
Is the digital ocean single click installer currently working? For me it never completes.
Is there a debug process that need to be in the documentation for the installer never completing?
For me, the progress bar gets some small proportion of the way along the screen then stops (forever, as far as I know, but certainly at least 3 hours)
Screenshots attached (not anonymised since I've already destroyed all the droplets in question)
In the console nothing is happening special at that point
DO resource meter shows a lot of activity for a while, then none for an hour or two. Then I destroy the droplet.
This behaviour is reproducible across frankfurt-3 and singapore-1 sites, and from firefox and Brave browers, and virtual instances at 1 and 2gb sizes. Before I dive into trying to understand DO's droplet thingy I would like to know if I should be expecting this behaviour or not. Or does the instance take days or weeks to spin up?
This requires secret-stack version 6.3.0 exactly. It would be nice if this could be hatted to support the current version 6.3.2.
http://legacy-installer.butt.nz/install?url=https://github.com/staltz/ssb-room
I keep getting the error that I don't have an account on DO.
Hello, we have installed go-ssb pub. Now we want to integrate go-ssb-room into pub. Is there an integration method? In addition, do the integrated pub and room have their own SSB id or only one SSB id? Well, if there are two SSB id , is it supported by the user who chooses which one to use for communication?thanks.
Trying to add this as a module to ssb-browser I see that a lot of stuff is pulled in (like ssb-master). I was wondering if it would make sense to split out the actual implementation into maybe two modules? ssb-room-server and ssb-room-client?
> `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.
From https://github.com/ssb-js/multiserver/blob/7d47892757c14732b47662d81e36dd21f3c16b6b/compose.js#L84
There should be a callback , called with
null when the server started to listen.
If it's missing, the multicb() here would never be done. And ssb-server's "multiserver:listening" event won't be emitted.
I didn't add SSL originally for two reasons: too much work (I wanted to get Rooms released asap), and uncertainty about SSL for plain IP addresses. When a user installs their first ssb-room using the D.O. installer, they get a webapp running at a certain IP address. This may remain like this if they don't have a domain or don't set up a domain. I have no experience with setting up SSL for IP addresses, but maybe that's possible?
I'm happy if someone could make a PR to add easy SSL support, the main requirement being that this has to keep the no-terminal (and no dev skills) D.O. installer process still a no-terminal experience.
I suppose we could run letsencrypt in one of these two files
Peers connecting to rooms might not know it's a room, and then attempt to call ssb-replicate / ssb-ebt muxrpc APIs such as replicate.request
. Currently we don't have those, so the peer experiences an error or a warning. We could, though, provide that muxrpc API which always answer boring empty data, to avoid the error.
Following the Docker pull install method from the manual install documentation - the docker container status is continually restarting.
The container logs show:
Error: EACCES: permission denied, open '/home/node/.ssb/secret'
at Object.openSync (fs.js:443:3)
at Object.writeFileSync (fs.js:1194:35)
at Object.exports.createSync (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/ssb-keys/storage.js:104:8)
at Object.exports.loadOrCreateSync (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/ssb-keys/index.js:89:20)
at setDefaults (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/ssb-config/defaults.js:71:27)
at module.exports (/home/node/.npm-global/lib/node_modules/ssb-room/node_modules/ssb-config/inject.js:7:16)
at Object. (/home/node/.npm-global/lib/node_modules/ssb-room/config.js:4:16)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
Note - when attempting to install from git - The install fails.
Install on Digital Ocean - Debian 9 Droplet ($5)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.