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

Set up sphinx-stack for the first time $@100000 #25

Open
pitoi opened this issue Mar 17, 2022 · 12 comments
Open

Set up sphinx-stack for the first time $@100000 #25

pitoi opened this issue Mar 17, 2022 · 12 comments

Comments

@pitoi
Copy link

pitoi commented Mar 17, 2022

Install and run sphinx-stack locally and provide feedback:

  • any errors or confusing points
  • your hardware/OS
@ckoys
Copy link

ckoys commented Mar 17, 2022

first time installation worked for me flawless and without errors or confusion…
mac

@pitoi
Copy link
Author

pitoi commented Mar 23, 2022

@ckoys can you add some notes from the install process, otherwise I'll go ahead and pay out the bounty? I'll ping you on sphinx

@Lombitron
Copy link

I've tried on two separate (Linux/ubuntu) boxes: initially on my desktop and then on a dev box I have running. The same error occurred on both, (see attached) on my desktop ./clearall.sh was enough to resolve it on my desktop, but not on the dev box.
sphinx-relay-setup.log

@kevkevinpal
Copy link
Contributor

Looks like stack might be using an older version of the relay image cause its trying to get the transport token but that endpoint might not be available would you be able to check to see if that image is upto date with what we have here

https://hub.docker.com/r/sphinxlightning/sphinx-relay/tags

@Lombitron
Copy link

The thing is, I did the git clone / docker-compose up like three hours ago. The Above is what it did out of the box.

user@host:~/repos/sphinx/sphinx-stack$ docker image inspect sphinxlightning/sphinx-relay:latest 
[
    {
        "Id": "sha256:b1f70dc0d5467c3c52dd81db533d1fbdbd88194955f2694aeb655fd00907967b",
        "RepoTags": [
            "sphinxlightning/sphinx-relay:latest"
        ],
        "RepoDigests": [
            "sphinxlightning/sphinx-relay@sha256:8d0cc89e6681f6fa48a4f266ecbcf62e2f958f1d01a2ceb7303fb8d6496a70ff"
        ],
        "Parent": "",
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2022-03-15T17:52:01.162703724Z",
        "Container": "",
        "ContainerConfig": {
            "Hostname": "",
            "Domainname": "",
            "User": "",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": null,
            "Cmd": null,
            "Image": "",
            "Volumes": null,
            "WorkingDir": "",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": null
        },
        "DockerVersion": "",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "1000",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "ExposedPorts": {
                "3300/tcp": {}
            },
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "NODE_VERSION=12.22.10",
                "YARN_VERSION=1.22.17",
                "NODE_ENV=production",
                "NODE_SCHEME=http",
                "PORT=3300"
            ],
            "Cmd": [
                "node",
                "/relay/dist/app.js"
            ],
            "ArgsEscaped": true,
            "Image": "",
            "Volumes": null,
            "WorkingDir": "/relay",
            "Entrypoint": [
                "docker-entrypoint.sh"
            ],
            "OnBuild": null,
            "Labels": null
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 417122200,
        "VirtualSize": 417122200,
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/snap/docker/common/var-lib-docker/overlay2/06efb5a9f968f036dc217db17a8ef8277129fc31f67eb18d29076e7f77f39145/diff:/var/snap/docker/common/var-lib-docker/overlay2/21200741af03e00dba0c352bb0707b08a46b6c12833c62c9189f0a05a2c7ddb1/diff:/var/snap/docker/common/var-lib-docker/overlay2/80ed671fe0e1e004a496907f0d15879bf1977f5ed65ee3815d15b1ea31281e84/diff:/var/snap/docker/common/var-lib-docker/overlay2/e45b4eebed1854c89b0ef0e6ea16b113ec465411532784cab97310a853a71f62/diff:/var/snap/docker/common/var-lib-docker/overlay2/146cb662362cc669f9f01ad35d8435fbac77e4f08be024d31c40b9d15f5b0c79/diff:/var/snap/docker/common/var-lib-docker/overlay2/d256358ce46e96ceff5a0621611d7eb6ef132cf286e169cb5aa267b5baeea592/diff",
                "MergedDir": "/var/snap/docker/common/var-lib-docker/overlay2/b43e93eda78a23f014d58a120bf0ca38b412bd17ad087ee5e83b8bbedf358a11/merged",
                "UpperDir": "/var/snap/docker/common/var-lib-docker/overlay2/b43e93eda78a23f014d58a120bf0ca38b412bd17ad087ee5e83b8bbedf358a11/diff",
                "WorkDir": "/var/snap/docker/common/var-lib-docker/overlay2/b43e93eda78a23f014d58a120bf0ca38b412bd17ad087ee5e83b8bbedf358a11/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:e5baccb54724b971f73bbfa46d477b947c9066e4040d0e002e8f04314f58b58f",
                "sha256:ac09b4a8b20efc906e0a3e5c07dbce1c48487d632ebef501a894b9bd9a4d05f3",
                "sha256:6953cb439f396813ebcb221ece5c87a428e518d3739550fac711ebe131bce9a7",
                "sha256:acf6fac47fd8cba32507f43b463b7f39783eb6d16b0cdc6cb474da6ba6f78fb4",
                "sha256:b160f8a554c69f2624e754dba74c3b692d571475be72af02e5321fc5554d86e8",
                "sha256:17d1d2cbde1fd9201e0c8aa10be08c98657849030922cc6296d98437bd82cde2",
                "sha256:7ecca0320a11b714540d0edec8c4b91f09fdb7ae21f90daaa9a2c12c24b068d0"
            ]
        },
        "Metadata": {
            "LastTagTime": "0001-01-01T00:00:00Z"
        }
    }
]

@kevkevinpal
Copy link
Contributor

that looks correct, are you able to log whats happening in the relay instance while the setup is failing?

@Lombitron
Copy link

sure,

user@host:~/code/sphinx-relay$ docker logs  carol.sphinx 
[info] 03-28-22T14:43:32 [MISC] => env development
[info] 03-28-22T14:43:32 [DB] => [db] starting setup
[info] 03-28-22T14:43:35 [DB] => [db] sync now
[info] 03-28-22T14:46:26 [DB] => [db] done syncing
[info] 03-28-22T14:47:13 [DB] adding lsat table
[info] 03-28-22T14:47:18 [DB] adding requestsTransportTokens table
[info] 03-28-22T14:47:18 [DB] => [db] setup done
Mon, 28 Mar 2022 14:47:18 GMT body-parser deprecated undefined extended: provide extended option at dist/app.js:81:25
[info] 03-28-22T14:47:18 [MISC] => 2022-03-28 14:47:18 [lightning] reconnecting... attempt #1
(node:1) DeprecationWarning: grpc.load: Use the @grpc/proto-loader module with grpc.loadPackageDefinition instead
[info] 03-28-22T14:47:18 [MISC] Node listening on 3003.
[info] 03-28-22T14:47:18 [MISC] => [lightning] connected! 2022-03-28 14:47:18
[info] 03-28-22T14:47:18 [MISC] >>> FINISH SETUP
[info] 03-28-22T14:47:34 [MISC] [db] created node owner contact, id: 1
[info] 03-28-22T14:47:34 [MISC] => Relay version: , commit: 
[info] 03-28-22T14:47:34 [MISC] >> aXA6Omh0dHA6Ly8xMjcuMC4wLjE6MzAwMzo6ODI3MWM2OTNlMTg0NDNhYjJmZGRhMjRkYzJjMmVlMjY=
[info] 03-28-22T14:47:34 [MISC] Scan this QR in Sphinx app:
[info] 03-28-22T14:47:34 [MISC]                                                                               
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              
                                                                              

[info] 03-28-22T14:47:39 [TRIBES] [tribes] try to connect: tcp://host.docker.internal:1883
[info] 03-28-22T14:47:45 [TRIBES] [tribes] try to connect: tcp://host.docker.internal:1883
[info] 03-28-22T14:47:50 [TRIBES] [tribes] try to connect: tcp://host.docker.internal:1883
[info] 03-28-22T14:48:04 [TRIBES] [tribes] try to connect: tcp://host.docker.internal:1883
[info] 03-28-22T14:48:13 [TRIBES] [tribes] try to connect: tcp://host.docker.internal:1883
[info] 03-28-22T14:48:22 [TRIBES] [tribes] try to connect: tcp://host.docker.internal:1883
[info] 03-28-22T14:48:31 [TRIBES] [tribes] try to connect: tcp://host.docker.internal:1883
[info] 03-28-22T14:48:42 [TRIBES] [tribes] try to connect: tcp://host.docker.internal:1883
[info] 03-28-22T14:48:51 [TRIBES] [tribes] try to connect: tcp://host.docker.internal:1883
[info] 03-28-22T14:49:01 [TRIBES] [tribes] try to connect: tcp://host.docker.internal:1883
[info] 03-28-22T14:49:14 [TRIBES] [tribes] try to connect: tcp://host.docker.internal:1883
[info] 03-28-22T14:49:24 [TRIBES] [tribes] try to connect: tcp://host.docker.internal:1883
[info] 03-28-22T14:49:30 [TRIBES] [tribes] try to connect: tcp://host.docker.internal:1883
-> 2022-03-28 14:49:33: GET /is_setup 200 19ms
-> 2022-03-28 14:49:34: GET /request_transport_key 401 1ms
-> 2022-03-28 14:49:34: GET /request_transport_key 401 1ms
[info] 03-28-22T14:49:37 [TRIBES] [tribes] try to connect: tcp://host.docker.internal:1883

@kevkevinpal
Copy link
Contributor

hmm thats weird seems like it has the right image but its throwing a 401 error for some reason and on an unauthenticated endpoint

@Evanfeenstra
Copy link
Contributor

That is super weird because request_transport_key should be totally public...

@kevkevinpal
Copy link
Contributor

@Lombitron
I just saw this on my stack would you be able to try and pull in the latest code for sphinx-stack and try it and if that doesnt work try going to the latest version of relay and run docker build -t sphinxlightning/sphinx-relay .

@Lombitron
Copy link

Lombitron commented Apr 13, 2022

sphinx-stack works on my desktop fine (it has always worked ok here, I did have to build the image for relay 1st, though)

I cant use that dev box for sphinx-stack anymore (used for another project atm)

I'll spin up on another box when I get a chance - I got as far as working out part of the problem was due to running a DNS resolver locally on that box (it messes up Docker internal naming and the host.docker.internal domain gets sent to the resolver to be then not resolved)

My fix was not to use that box, and I didn't look into it further. Maybe a better fix is not to use that hostname? maybe use an env var to specify the name can then use the docker service name

@kevkevinpal
Copy link
Contributor

I noticed that issue aswell with host.docker.internal when trying to get sphinx-stack running on popOS yesterday when working with another dev, I might take a look into trying to find a more elegant solution to that instead of using host.docker.internal

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

5 participants