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

server keeps restarting #37

Open
RyanSinger opened this issue Oct 9, 2020 · 10 comments
Open

server keeps restarting #37

RyanSinger opened this issue Oct 9, 2020 · 10 comments

Comments

@RyanSinger
Copy link

I think this may be related to the recent bug in ssb-links; but my pub keeps restarting and no longer works. How do I recover?

@sunjam
Copy link

sunjam commented Oct 19, 2020

I think the Docker build needs to be updated. Full details here.

Copy-pasta follows:

Advisory: ssb-server crash fixed

A bug in ssb-links causes ssb-server to crash when handling certain messages recently published.

The main error message on crash is: Error: can only encode arrays.

This bug is fixed in ssb-links v3.0.10. If you encounter this crash, please reinstall/upgrade your ssb-server to get the updated ssb-links module.

It is possible a similar issue could exist with other #ssb plugins using flumeview-links, in which case we will update this thread.

This issue primarily affects pub operators and users who run ssb-server directly. Users of apps that bundle ssb-server (e.g. Patchwork) are not affected.

There are no known security implications.

@ahdinosaur
Copy link
Owner

@sunjam is correct, an updating version is incoming. sorry for the delay. 💜

@ahdinosaur
Copy link
Owner

published a new version which should fix this: v2.2.0 🎉

i've upgraded my own 3 pubs and they seem to be happy again. 😺

@ahdinosaur
Copy link
Owner

ahdinosaur commented Nov 10, 2020

ℹ️ the upgrade process for pub operators: https://github.com/ahdinosaur/ssb-pub#update-ssb-pub-image

(if already using v2, otherwise see v1 -> v2 upgrade guide )

docker pull ahdinosaur/ssb-pub
docker stop sbot
docker rm sbot
./create-sbot

check your pub is running with commands like:

docker logs sbot
./sbot whoami

@sunjam
Copy link

sunjam commented Nov 10, 2020 via email

@ahdinosaur
Copy link
Owner

@sunjam: i might have been too optimistic. do you see an error, or just that you can't connect to your server from a client?

i also realized now invites are broken.

/home/node/.npm-global/lib/node_modules/ssb-server/node_modules/muxrpcli/index.js:123
      throw err
      ^
{
  message: 'resultHost.replace is not a function',
  name: 'TypeError',
  stack: 'TypeError: resultHost.replace is not a function\n' +
    '    at Object.stringify (/home/node/.npm-global/lib/node_modules/ssb-server/node_modules/multiserver/plugins/net.js:124:31)\n' +
    '    at /home/node/.npm-global/lib/node_modules/ssb-server/node_modules/multiserver/compose.js:111:19\n' +
    '    at Array.map (<anonymous>)\n' +
    '    at Object.stringify (/home/node/.npm-global/lib/node_modules/ssb-server/node_modules/multiserver/compose.js:110:22)\n' +
    '    at /home/node/.npm-global/lib/node_modules/ssb-server/node_modules/multiserver/index.js:67:44\n' +
    '    at Array.map (<anonymous>)\n' +
    '    at Object.stringify (/home/node/.npm-global/lib/node_modules/ssb-server/node_modules/multiserver/index.js:67:10)\n' +
    '    at EventEmitter.getAddress (/home/node/.npm-global/lib/node_modules/ssb-server/node_modules/secret-stack/core.js:213:21)\n' +
    '    at EventEmitter.hooked [as getAddress] (/home/node/.npm-global/lib/node_modules/ssb-server/node_modules/hoox/index.js:10:15)\n' +
    '    at getInviteAddress (/home/node/.npm-global/lib/node_modules/ssb-server/node_modules/ssb-invite/index.js:75:18)'
}

ughhhhh 😿

@ahdinosaur ahdinosaur reopened this Nov 10, 2020
@sunjam
Copy link

sunjam commented Nov 10, 2020

Yes, updated pull fixed the pub running, but I see the exact same error you posted when creating invites.

@ahdinosaur
Copy link
Owner

ahdinosaur commented Nov 10, 2020

okay, i think figured out the invite problem: ssbc/secret-stack#62.

the hotfix is to change your ~/ssb-pub-data/config to match:

(change connections.incoming.net[].external from an array of strings to a string)

{
  "connections": {
    "incoming": {
      "net": [
        {
          "scope": "public",
          "host": "0.0.0.0",
-          "external": ["hostname.yourdomain.tld"],
+          "external": "hostname.yourdomain.tld",
          "transform": "shs",
          "port": 8008
        }
      ]
    },
    "outgoing": {
      "net": [
        {
          "transform": "shs"
        }
      ]
    }
  }
}

ahdinosaur added a commit that referenced this issue Nov 10, 2020
and change `install.sh` to match.

ref: #37 (comment)
ahdinosaur added a commit that referenced this issue Nov 10, 2020
and change `install.sh` to match.

ref: #37 (comment)
@ahdinosaur
Copy link
Owner

😻

Screenshot from 2020-11-10 18-44-58

ahdinosaur added a commit that referenced this issue Nov 26, 2020
and change `install.sh` to match.

ref: #37 (comment)
@murilopolese
Copy link

Thanks for the hotfix, @ahdinosaur !! 🙏

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

4 participants