1

I have NGINX and SSL set up on Digital Ocean Linux Ubuntu, running an RPC node. The RPC node sees the Polkadot-JS/apps and accepts the connection but the Polkadot-JS/apps never sees anything in return and keeps waiting for a connection.

Going straight to the URL https://koabs.rocks, I get an error: {"jsonrpc":"2.0","error":{"code":-32700,"message":"Parse error"},"id":null}

How can I fix this?

My node configuration is:

./target/release/substrate \
--base-path ./gropocloudmoose \
--chain ./GropoSpec20230115Raw.json \
--port 30333 \
--ws-port 9955 \
--rpc-port 9944 \
--telemetry-url "wss://telemetry.polkadot.io/submit/ 0" \
--enable-offchain-indexing=true \
--ws-external \
--state-pruning archive \
--blocks-pruning archive \
--ws-max-connections 100 \
--rpc-cors all \
--rpc-methods Safe \
--name gropocloudmoose \
--bootnodes /ip4/127.0.0.1/tcp/30344/p2p/12D3KooWMaj8rma6fWK71hHEgXzGre2FcfCPMD39LhPBTvQyMzk6 \
--password-interactive

And my NGINX configuration for this site is:

server {

    server_name koabd.rocks www.koabd.rocks;

    location / {
        proxy_buffers 16 4k;
        proxy_buffer_size 2k;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
        proxy_pass http://localhost:9955;
        include proxy_params;
    }

    listen [::]:443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/koabd.rocks/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/koabd.rocks/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

server {
    if ($host = www.koabd.rocks) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    if ($host = koabd.rocks) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    listen 80;
    listen [::]:80;

    server_name koabd.rocks www.koabd.rocks;
    return 404; # managed by Certbot

}

1 Answer 1

1

This solutions is the same as for this question: Problem Connecting Digital Ocean RPC Node to Polkadot-JS (NGINX Configuration Problem?)

SOLVED! Open the Nginx config for the site… sudo nano /etc/nginx/sites-available/MYSITE

Erase EVERYTHING in the file (yes, everything) and set it back to just:

server { server_name MYSITE;

location / { proxy_buffers 16 4k; proxy_buffer_size 2k; proxy_pass http://localhost:MY-WS-PORT; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header Host $host; } }

THEN…. Re-engage certbot…

certbot --nginx

Finish your certbot prompts and you are good to go!

Nginx Config FIRST, Certbot SECOND.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.