Skip to content

openid-configuration failed, reason: socket hang up #635

Closed

Description

@dr0i

I did:
$ sudo npm install -g solid-server; solid init
Then: :git/node-solid-server$ ./bin/solid-test start -v
which results in:

solid:settings Server URI: https://localhost:8443 +0ms
solid:settings Auth method: oidc +2ms
solid:settings Db path: ./.db +0ms
solid:settings Config path: ./config +1ms
solid:settings Suffix Acl: .acl +0ms
solid:settings Suffix Meta: .meta +0ms
solid:settings Filesystem Root: ~/git/node-solid-server/data/ +0ms
solid:settings Allow WebID authentication: true +0ms
solid:settings Live-updates: true +0ms
solid:settings Multi-user: true +0ms
solid:settings Suppress default data browser app: undefined +0ms
solid:settings Default data browser app file path: default +0ms
solid:settings CORS proxy listening at /proxy?uri={uri} +10ms
solid:settings Base URL (--mount): solid +11ms
solid:settings SSL Private Key path: ssl-key.pem +0ms
solid:settings SSL Certificate path: ssl-cert.pem +0ms
Solid server (v0.33.8) running on https://localhost:8443/
Press +c to stop
solid:authentication Provider keys loaded from config +19ms
solid:authentication Provider keychain initialized +168ms
solid:authentication Not sleeping before client registration... +2ms
solid:authentication Client not present for issuer https://localhost:8443, initializing new client +41ms
solid:authentication Registering new client for issuer https://localhost:8443 +0ms
solid:authentication Error registering a new client: { FetchError: request to http://localhost:8443/.well-known/openid-configuration failed, reason: socket hang up
at ClientRequest. (/home/lod/.nvm/versions/node/v9.5.0/lib/node_modules/solid-server/node_modules/node-fetch/index.js:133:11)
at ClientRequest.emit (events.js:160:13)
...

This is my config: :git/node-solid-server$ cat config.json

{
"root": "~/git/node-solid-server/data",
"port": "8443",
"serverUri": "https://localhost:8443",
"webid": true,
"mount": "solid",
"configPath": "./config",
"dbPath": "./.db",
"sslKey": "ssl-key.pem",
"sslCert": "ssl-cert.pem",
"multiuser": true,
"corsProxy": "/proxy"
...
}

Activity

  1. melvincarvalho commented on Feb 15, 2018

    @melvincarvalho
    Contributor

    Thanks for raising this!

    @dmitrizagidulin do you have an insight into this?

    In particular, should the openid registration work running on localhost?

  2. dmitrizagidulin commented on Feb 15, 2018

    @dmitrizagidulin
    Contributor

    I suspect the issue has to do with an ‘http’ localhost url — webid-oidc requires https. Maybe give that a try?

  3. dmitrizagidulin commented on Feb 15, 2018

    @dmitrizagidulin
    Contributor

    Ah, wait, so, this is interesting. the config has https. i wonder why it tried to register with an http address..!

  4. dmitrizagidulin commented on Feb 23, 2018

    @dmitrizagidulin
    Contributor

    @dr0i - is the issue still happening, and would you be able to provide more details? (What does your config file look like, for example)?

    I'm having trouble reproducing it.

  5. dr0i commented on Mar 19, 2018

    @dr0i
    ContributorAuthor

    @dmitrizagidulin don't know anymore what I have changed, but the new problem is at a similar point in the code. The error message changed slightly to :

    Error registering a new client: { Error: Error fetching openid configuration: 404 Not Found

    Problem is obviously a wrong declaration of the web-directory. I tried some permutations (./solid, ./default, ./data) but could not get an index.html to be loaded executing curl -Lvvv --insecure https://localhost:8443/index.html. Do you have an idea how I get to know which path to the web-directory (in apache-webserver-speech this would be the DocumentRoot) node-solid-server uses?

  6. dmitrizagidulin commented on Mar 19, 2018

    @dmitrizagidulin
    Contributor

    @dr0i - No prob, I'm sure we can track this down.

    So, the DocumentRoot analogue for solid server is the root setting in the config.json. Can you paste your current config again?

  7. dr0i commented on Mar 19, 2018

    @dr0i
    ContributorAuthor

    It's still the same as in my first comment:

    "root": "~/git/node-solid-server/data"

    which indeed exists and provides index.html and directories e.g. localhost with their respective index.html.
    Also the ouput of $ ./bin/solid-test start -v is:

    solid:settings Filesystem Root: {snip}/git/node-solid-server/data/

    showing that the config.json was eaten allright.

  8. dmitrizagidulin commented on Mar 19, 2018

    @dmitrizagidulin
    Contributor

    Ok. So that means, if your root is ~/git/node-solid-server/data and you're in multi-user mode, it should be able to access ~/git/node-solid/server/data/localhost/index.html when starting it up.

    Couple more things to try.

    1. I notice in the original message, the mount config (the base URL suffix) was solid. Can you remove that line from the config? That param is rarely tested (and in fact was slated for removal), so there's a slight chance that it's messing with something.

    2. Can you delete the contents of the .db directory (so, something like rm -rf ./.db/*) and restart the server? The OIDC server config gets generated and saved there on first startup, and it maybe using an old one or something.

  9. dr0i commented on Mar 19, 2018

    @dr0i
    ContributorAuthor

    The root cause your 1. proposal - after removing the mount from the config it works like a charm. Thx for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions