TrueBlocks / trueblocks-docker

GNU General Public License v3.0
39 stars 16 forks source link

Not working #326

Closed tjayrush closed 2 years ago

tjayrush commented 2 years ago

Sorry - I can't seem to figure out how to proceed:

image

On my Mac, I run an ssh tunnel so that the two linux boxes appear to me as localhost:23456 and localhost:36963 respectively.

dszlachta commented 2 years ago

You have to cp env.example .env and put your RPC URL in .env file. Then make sure you use --env-file ./.env when running it and it should work

tjayrush commented 2 years ago

I think I did that, but we can review on Friday. Doesn't the RPC Provider line in the display indicate that it has the right value? (23456). It's picking up the right paths.

dszlachta commented 2 years ago

Oh, sorry. I thought the red line was RPC Provider :) I think that the problem is localhost: it means the container when inside the container. I will find a workaround

dszlachta commented 2 years ago

@tjayrush You have to do two things:

  1. Add this at the beginning of your docker run command: --add-host=host.docker.internal:host-gateway
  2. Replace localhost in RPC URL with host.docker.internal, so it looks like http://host.docker.internal:PORT I am able to reach the RPC from Docker this way, but I get this error: 403 Forbidden: Provided Host header is not whitelisted. It looks like some kind of access control. I remember seeing it earlier and maybe even fixing it by setting custom Host header, but I don't remember the exact fix.