RDC Script for Relay

Hello, I am following the guide for running a relay in OpenGSN v2. I am having issues running the rdc script locally- specifically, when I run ./rdc local on my aws ubuntu instance, it does not pick up on the local argument. Please let me know if I can provide more to help diagnose this issue!

What error do you get? try to run it with bash -x ./rdc ..
and send the output you get.

Disclaimer: the script was written and tested on a local mac, wasn’t tested on other machines…

+ RDC=‘docker run --rm $RTTY -v /var/run/docker.sock:/var/run/docker.sock -e ROOT=$PWD -v $PWD/.env:/.env opengsn/relaydc:latest’
+ ‘[’ -z ‘]’
+ cat
rdc - remote relaydc (to google cloud)
usage: ./rdc {user@host} {docker-compose params}
./rdc addalias - add the “rdc” alias to .bashrc
To run on local machine without ssh:
./rdc local {docker-compose params}
+ exit 1

off of bash -x ./rdc local

yes… that’s the help for the script, when you run it without params.

Try to run it with params, e.g. to check you server config do:

./rdc user@myhostname.com config

the “config” is docker-compose command. if its the first time you start the service, it will download the docker images, and then dump the configuration.
other useful commands:

  • rdc hostname up -d
    this will start the docker services
  • rdc hostname logs
    dump all logs. for GSN-only logs, do rdc hostname logs gsn1
  • rdc hostname restart -t 0 gsn1
    restart the GSN service (needed after you change the configuration file)

Ah ha, so I just don’t know my docker - you must really hate your job sometimes… thank you for the very succinct response! Looks like it is up now

Another error- from what it looks like, I would need to edit the docker container to fix? Here is localhost output:

curl https://localhost:443

curl: (60) SSL: no alternative certificate subject name matches target host name ‘localhost’
More details here: https://curl.haxx.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

Obviously this is because the ssl cert, which I have for this specific domain below.
DNS output:

curl https://relay.mubc.io/gsn1/getaddr
(its all html curl it yourself)

502 Bad Gateway

502 Bad Gateway



nginx/1.19.1


Something is wierd with your instance. please check if everything is up. This is what I get on one of our relayers:

$ docker ps
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS              PORTS                                      NAMES
cb06ed200c55        opengsn/jsrelay:2.0.2     "docker-entrypoint.s…"   41 hours ago        Up 41 hours                                                    default_gsn1_1
c01d09d992d4        steveltn/https-portal:1   "/init"                  6 days ago          Up 6 days           0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   default_https-portal_1
0560364a5494        opengsn/prefixrouter      "/docker-entrypoint.…"   6 days ago          Up 6 days           0.0.0.0:8080->80/tcp                       router

Yes I have the same output (hence me being able to get the localhost http failure)
Edit 1: I do not have the same output- my jsrelay is constantly failing!

$ docker ps
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS                          PORTS                                      NAMES
ac9b620b965a        steveltn/https-portal:1   "/init"                  3 days ago          Up 3 days                     0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp   default_https-portal_1
bea1eb8255b6        opengsn/jsrelay:2.0.2     "docker-entrypoint.s…"   3 days ago          Restarting (1) 10 seconds ago                                              default_gsn1_1
3ba14e0597f1        opengsn/prefixrouter      "/docker-entrypoint.…"   3 days ago          Up 3 days                       0.0.0.0:8080->80/tcp                       router

Edit 2: I looked into the logs on the relay and am getting the following over and over; will continue to debug.

getVersion(hub) - no version found
Starting GSN Relay Server process...

Edit 3: I changed gsn-relay-config.js provider to rinkeby (used a rinkeby version contract) and now get:

Invalid param versionRegistryAddress: no contract at address 0x666eaf8628FEb3389003ef69C57fE4ebaae2aAF5
Starting GSN Relay Server process...

Edit 4: I did NOT in fact have the correct address (looked up the above on Rinkeby etherscan to no result). Once I changed it out for 0x6fa486Bfd75E8C791D75F7B118bf20F6c8dA5E5D I was successful- I can now access my node! Hesitant to call it complete but looking really good so far!