Can't run setup

When I try to run setup for storj node, it stops here:

docker run --rm -e SETUP="true"     --mount type=bind,source=/opt/s/identity/storagenode,destination=/app/identity     --mount type=bind,source=/opt/s/data,destination=/app/config     --name storagenode storjlabs/storagenode:latest
downloading storagenode-updater
--2024-07-13 11:20:47--  https://version.storj.io/processes/storagenode-updater/minimum/url?os=linux&arch=amd64
Resolving version.storj.io (version.storj.io)... 34.173.164.90
Connecting to version.storj.io (version.storj.io)|34.173.164.90|:443... connected.


I’ve seen a similar issue before, could you try this command:

curl -vvv -L version.storj.io

I got this:

curl -vvv -L version.storj.io
*   Trying 34.173.164.90:80...
* Connected to version.storj.io (34.173.164.90) port 80 (#0)
> GET / HTTP/1.1
> Host: version.storj.io
> User-Agent: curl/7.74.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 308 Permanent Redirect
< Date: Sat, 13 Jul 2024 11:25:51 GMT
< Content-Type: text/html
< Content-Length: 164
< Connection: keep-alive
< Location: https://version.storj.io
<
* Ignoring the response-body
* Connection #0 to host version.storj.io left intact
* Clear auth, redirects to port from 80 to 443Issue another request to this URL: 'https://version.storj.io/'
*   Trying 34.173.164.90:443...
* Connected to version.storj.io (34.173.164.90) port 443 (#1)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=version.storj.io
*  start date: May 26 12:24:09 2024 GMT
*  expire date: Aug 24 12:24:08 2024 GMT
*  subjectAltName: host "version.storj.io" matched cert's "version.storj.io"
*  issuer: C=US; O=Let's Encrypt; CN=R3
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x5827c50ac620)
> GET / HTTP/2
> Host: version.storj.io
> user-agent: curl/7.74.0
> accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
< HTTP/2 200
< date: Sat, 13 Jul 2024 11:25:51 GMT
< content-type: application/json
< content-length: 1635
< strict-transport-security: max-age=15724800; includeSubDomains
<
{"Satellite":{"major":1,"minor":10,"patch":0},"Storagenode":{"major":1,"minor":24,"patch":0},"Uplink":{"major":1,"minor":0,"patch":0},"Gateway":{"major":1,"minor":0,"patch":0},"Identity":{"major":1,"minor":0,"patch":0},"processes":{"satellite":{"minimum":{"version":"v0.0.1","url":""},"suggested":{"version":"v0.0.1","url":""},"rollout":{"seed":"","cursor":""}},"storagenode":{"minimum":{"version":"1.105.4","url":"https://github.com/storj/storj/releases/download/v1.105.4/storagenode_{os}_{arch}.zip"},"suggested":{"version":"1.108.3","url":"https://github.com/storj/storj/releases/download/v1.108.3/storagenode_{os}_{arch}.zip"},"rollout":{"seed":"ac9bce15a6baf15fca62dbbf61534def36ba3c59c1fe86692f6b82d2c52fc67a","cursor":"1eb851eb851eb851eb851eb851eb851eb851eb851eb851eb851eb851eb851eb8"}},"storagenode-updater":{"minimum":{"version":"1.105.4","url":"https://github.com/storj/storj/releases/download/v1.105.4/storagenode-updater_{os}_{arch}.zip"},"suggested":{"version":"1.108.3","url":"https://github.com/storj/storj/re* Connection #1 to host version.storj.io left intact
leases/download/v1.108.3/storagenode-updater_{os}_{arch}.zip"},"rollout":{"seed":"ac9bce15a6baf15fca62dbbf61534def36ba3c59c1fe86692f6b82d2c52fc67a","cursor":"1eb851eb851eb851eb851eb851eb851eb851eb851eb851eb851eb851eb851eb8"}},"uplink":{"minimum":{"version":"v0.0.1","url":""},"suggested":{"version":"v0.0.1","url":""},"rollout":{"seed":"","cursor":""}},"gateway":{"minimum":{"version":"v0.0.1","url":""},"suggested":{"version":"v0.0.1","url":""},"rollout":{"seed":"","cursor":""}},"identity":{"minimum":{"version":"v0.0.1","url":""},"suggested":{"version":"v0.0.1","url":""},"rollout":{"seed":"","cursor":""}}}}

Sorry, it just a wild guess, some tls have issue with network package MTU being too low, not this case though.

Is it possible, that something (your ISP for example) is blocking connections to the GitHub?
I know, this dumb things usually happen for Russia or Chine, but could be?

I tried pinging github and it works good. But I still can’t setup.

You need not only ping, but also download something from there. Some ISP are blocking connections to “restricted” services. They usually blocks https connections. And it’s usually by IP. In the same time http can work fine… But on GitHub they have a redirect http to https.

I tried downloading a random file from github and it works:

 wget https://github.com/2noise/ChatTTS/blob/main/README.md
--2024-07-13 14:44:13--  https://github.com/2noise/ChatTTS/blob/main/README.md
Resolving github.com (github.com)... 140.82.121.4
Connecting to github.com (github.com)|140.82.121.4|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: 'README.md'

README.md                                   [ <=>                                                                          ] 452.27K  2.34MB/s    in 0.2s

2024-07-13 14:44:14 (2.34 MB/s) - 'README.md' saved [463126]




But setup still freezes here:

docker run --rm -e SETUP="true"     --mount type=bind,source=/opt/s/identity/storagenode,destination=/app/identity     --mount type=bind,source=/opt/s/data,destination=/app/config     --name storagenode storjlabs/storagenode:latest
downloading storagenode-updater
--2024-07-13 14:45:19--  https://version.storj.io/processes/storagenode-updater/minimum/url?os=linux&arch=amd64
Resolving version.storj.io (version.storj.io)... 34.173.164.90
Connecting to version.storj.io (version.storj.io)|34.173.164.90|:443... connected.


two general questions:

I see you are using opt/s folders for both identity and data. Can you confirm both directories exist, have data, and are writable?

second, the default storj docker setup from the documentation has a --user option as well which I don’t see on yours.

docker run --rm -e SETUP="true" \
    --user $(id -u):$(id -g) \
    --mount type=bind,source="<identity-dir>",destination=/app/identity \
    --mount type=bind,source="<storage-dir>",destination=/app/config \
    --name storagenode storjlabs/storagenode:latest

Oh, seems requests to version.storj.io are blocked for your IP…
Could you please check?

curl -vvv https://version.storj.io
curl -vvv http://version.storj.io

If the first command will fail with a timeout, but the second command would return something like <head><title>308 Permanent Redirect</title></head>, then your public IP is blocked by something (ISP or Google).
Is it possible to change your public IP?

Here is the output:

root@hacker7777 ~ # curl -vvv https://version.storj.io
curl -vvv http://version.storj.io
*   Trying 34.173.164.90:443...
* Connected to version.storj.io (34.173.164.90) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* ALPN, server accepted to use h2
* Server certificate:
*  subject: CN=version.storj.io
*  start date: May 26 12:24:09 2024 GMT
*  expire date: Aug 24 12:24:08 2024 GMT
*  subjectAltName: host "version.storj.io" matched cert's "version.storj.io"
*  issuer: C=US; O=Let's Encrypt; CN=R3
*  SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x5c11807e3620)
> GET / HTTP/2
> Host: version.storj.io
> user-agent: curl/7.74.0
> accept: */*
> 
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 128)!
< HTTP/2 200 
< date: Mon, 15 Jul 2024 08:49:17 GMT
< content-type: application/json
< content-length: 1635
< strict-transport-security: max-age=15724800; includeSubDomains
< 
{"Satellite":{"major":1,"minor":10,"patch":0},"Storagenode":{"major":1,"minor":24,"patch":0},"Uplink":{"major":1,"minor":0,"patch":0},"Gateway":{"major":1,"minor":0,"patch":0},"Identity":{"major":1,"minor":0,"patch":0},"processes":{"satellite":{"minimum":{"version":"v0.0.1","url":""},"suggested":{"version":"v0.0.1","url":""},"rollout":{"seed":"","cursor":""}},"storagenode":{"minimum":{"version":"1.105.4","url":"https://github.com/storj/storj/releases/download/v1.105.4/storagenode_{os}_{arch}.zip"},"suggested":{"version":"1.108.3","url":"https://github.com/storj/storj/releases/download/v1.108.3/storagenode_{os}_{arch}.zip"},"rollout":{"seed":"ac9bce15a6baf15fca62dbbf61534def36ba3c59c1fe86692f6b82d2c52fc67a","cursor":"1eb851eb851eb851eb851eb851eb851eb851eb851eb851eb851eb851eb851eb8"}},"storagenode-updater":{"minimum":{"version":"1.105.4","url":"https://github.com/storj/storj/releases/download/v1.105.4/storagenode-updater_{os}_{arch}.zip"},"suggested":{"version":"1.108.3","url":"https://github.com/storj/storj/re* Connection #0 to host version.storj.io left intact
leases/download/v1.108.3/storagenode-updater_{os}_{arch}.zip"},"rollout":{"seed":"ac9bce15a6baf15fca62dbbf61534def36ba3c59c1fe86692f6b82d2c52fc67a","cursor":"1eb851eb851eb851eb851eb851eb851eb851eb851eb851eb851eb851eb851eb8"}},"uplink":{"minimum":{"version":"v0.0.1","url":""},"suggested":{"version":"v0.0.1","url":""},"rollout":{"seed":"","cursor":""}},"gateway":{"minimum":{"version":"v0.0.1","url":""},"suggested":{"version":"v0.0.1","url":""},"rollout":{"seed":"","cursor":""}},"identity":{"minimum":{"version":"v0.0.1","url":""},"suggested":{"version":"v0.0.1","url":""},"rollout":{"seed":"","cursor":""}}}}*   Trying 34.173.164.90:80...
* Connected to version.storj.io (34.173.164.90) port 80 (#0)
> GET / HTTP/1.1
> Host: version.storj.io
> User-Agent: curl/7.74.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 308 Permanent Redirect
< Date: Mon, 15 Jul 2024 08:49:17 GMT
< Content-Type: text/html
< Content-Length: 164
< Connection: keep-alive
< Location: https://version.storj.io
< 
<html>
<head><title>308 Permanent Redirect</title></head>
<body>
<center><h1>308 Permanent Redirect</h1></center>
<hr><center>nginx</center>
</body>
</html>
* Connection #0 to host version.storj.io left intact
root@hacker7777 ~ # curl -vvv http://version.storj.io
*   Trying 34.173.164.90:80...
* Connected to version.storj.io (34.173.164.90) port 80 (#0)
> GET / HTTP/1.1
> Host: version.storj.io
> User-Agent: curl/7.74.0
> Accept: */*
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 308 Permanent Redirect
< Date: Mon, 15 Jul 2024 08:49:37 GMT
< Content-Type: text/html
< Content-Length: 164
< Connection: keep-alive
< Location: https://version.storj.io
< 
<html>
<head><title>308 Permanent Redirect</title></head>
<body>
<center><h1>308 Permanent Redirect</h1></center>
<hr><center>nginx</center>
</body>
</html>
* Connection #0 to host version.storj.io left intact

So, it can connect the version.storj.io site (you get a correct respond).
Is it possible that you have a firewall or PiHole, which could block connections?

Because after

you should see

HTTP request sent, awaiting response... 200 OK
Length: 93 [text/plain]
Saving to: 'STDOUT'

     0K                                                       100% 46.7M=0s

Please try to remove the image and pull it again:

docker rmi storjlabs/storagenode:latest
docker pull storjlabs/storagenode:latest

Then run the SETUP command, but add also -it after the run command:

docker run -it --rm -e SETUP="true"     --mount type=bind,source=/opt/s/identity/storagenode,destination=/app/identity     --mount type=bind,source=/opt/s/data,destination=/app/config     --name storagenode storjlabs/storagenode:latest

@andrijajepro , the file init download storj binary file is here: storagenode-docker/docker/entrypoint at c7d9776093ba23555e7bf4f990a464027224e46f · storj/storagenode-docker · GitHub

I won’t help you in detail but here is general how to debug it:

While docker stuck at downloading storagenode, you log into docker container and see if any process wget is running (see storagenode-docker/docker/entrypoint at c7d9776093ba23555e7bf4f990a464027224e46f · storj/storagenode-docker · GitHub).

If there is: you can install progress linux utility and see why wget is taking so long, you could try to use strace to see what going on.

If there isn’t: now you know the process mostly immediately die after execute, you could try replicate it (rewrite entrypoint file and debug it as much as needed and try to re-execute that file), especially try to debug wget command.

If there is any news, let us know.

I done these commands, but it’s still stuck on there:

root@hacker7777 ~ # docker rmi storjlabs/storagenode:latest
Untagged: storjlabs/storagenode:latest
Untagged: storjlabs/storagenode@sha256:92bead04118c85fb68c754594b3b7e6f518809be709aef3ab8c824f56ad46810
Deleted: sha256:a0f1d1ec77544b1f69db1e2ce49e71b26114d47af721a65bc2f48add150d5051
Deleted: sha256:97ab4fe08b50277b2e5f402db13a555893f58db8b9caf6cc4d88cc3ed4d6d559
Deleted: sha256:d30cc454a694c3e93b2b28fef4f6f242252958ac5aaf50952a3606c40a9f9090
Deleted: sha256:8292fd4fdb5e85b9470846a7ff46c46021702a562a12c8ffd0112ffe07525e5a
Deleted: sha256:44215e866fe668067cb21fcfdad7cdb5132f1a7cfabe05e44e8a396813aa7ae2
Deleted: sha256:c3c02a19fcc502794437976318cb2ad2c2a4ee0abab7b4c8abe0ffd1639284c5
Deleted: sha256:76a5d79d46ed1190d72bdc98904ba4f263631481ca3f688afb1af30c8c71eb3b
Deleted: sha256:f09cbb6deccc536bb8c4abac107406f9876551a41dcb328673f729ccbe2181b1
Deleted: sha256:f620ccd2e9ede71faef65d27d2326f12db4d620cb79e6388a7b18e1533b3d363
Deleted: sha256:55b99b667844de0d9f7d18ec12c8dae26ced7c4eaa915b55b53bef090ab67469
Deleted: sha256:53a6fc14d6c95bb842190a5371629848ba20e00f4c27a081127142743149ccd9
root@hacker7777 ~ # docker pull storjlabs/storagenode:latest
latest: Pulling from storjlabs/storagenode
789bca57d694: Pull complete 
7c1ef2c1ec5e: Pull complete 
82c6caf7c15d: Pull complete 
f8dfd51d06c7: Pull complete 
a500977a3a40: Pull complete 
d5e183de3413: Pull complete 
35629be6ad30: Pull complete 
4f4fb700ef54: Pull complete 
b73f650fee68: Pull complete 
Digest: sha256:92bead04118c85fb68c754594b3b7e6f518809be709aef3ab8c824f56ad46810
Status: Downloaded newer image for storjlabs/storagenode:latest
docker.io/storjlabs/storagenode:latest
root@hacker7777 ~ # docker run -it --rm -e SETUP="true"     --mount type=bind,source=/opt/s/identity/storagenode,destination=/app/identity     --mount type=bind,source=/opt/s/data,destination=/app/config     --name storagenode storjlabs/storagenode:latest
downloading storagenode-updater
--2024-07-16 08:15:36--  https://version.storj.io/processes/storagenode-updater/minimum/url?os=linux&arch=amd64
Resolving version.storj.io (version.storj.io)... 34.173.164.90
Connecting to version.storj.io (version.storj.io)|34.173.164.90|:443... connected.

I got into the container, but I can’t check which processes are running (the commands aren’t installed, and I can’t install them in the container).

Maybe you can test the wget command once you’re inside the docker container. Something like:

wget https://github.com/storj/storj/releases/download/v1.105.4/storagenode_linux_arm64.zip

I tried running it in container and it stopped:


root@33a9806eae14:/app# wget https://github.com/storj/storj/releases/download/v1.105.4/storagenode_linux_arm64.zip
--2024-07-17 09:19:21--  https://github.com/storj/storj/releases/download/v1.105.4/storagenode_linux_arm64.zip
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.

But it downloaded without a problem on the host machine.

Could you try download inside container via curl:

curl -L https://github.com/storj/storj/releases/download/v1.105.4/storagenode_linux_arm64.zip -vvv --output storagenode_linux_arm64.zip

On my machine, using wget I got this:

wget https://github.com/storj/storj/releases/download/v1.105.4/storagenode_linux_arm64.zip
--2024-07-17 16:55:57--  https://github.com/storj/storj/releases/download/v1.105.4/storagenode_linux_arm64.zip
Resolving github.com (github.com)... 20.205.243.166
Connecting to github.com (github.com)|20.205.243.166|:443... connected.
HTTP request sent, awaiting response... 302 Found

Could you check your time inside docker and outside (on your host) match?

I don’t have curl in container and I can’t install it.
The time on host machine and in the container do match.

If this is as far as you willing to go..

apt update && apt install curl