Advanced set up: customize the port of your Node

Hello
its same as INFURA. Just different link. I can try infura - but believe result will be the same. since infura also is http://… some link.

my startup is:

GETH_TMP=http://x.x.x.178/light/secretkey
; this acts like infura - I can send curl commands to it and get response
; could be like: https://mainnet.infura.io/v3/project_secret_id

docker run --restart=always --net inc_net -p $node_port_temp:$node_port_temp -p $rpc_port_temp:$rpc_port_temp -e NODE_PORT=$node_port_temp -e RPC_PORT=$rpc_port_temp -e BOOTNODE_IP=$bootnode -e GETH_NAME=$GETH_TMP -e MININGKEY=${validator_key} -e TESTNET=false -v $PWD/${data_dir}:/data -d --name inc_mainnet${index} incognitochain/incognito-mainnet:${latest_tag} 

well I do not want to use parity light on same host. I wanna run it externally. is that possible?

@khanhj just tagging you. wanna make sure my nodes are “OK” :slight_smile:

@huglester,

Your setup with external GETH should work, make sure you add these params to docker run command

-e GETH_NAME= -e GETH_PORT= -e GETH_PROTOCOL=

You can take a look at the default run.sh for reference

1 Like

Hello

-e BOOTNODE_IP=$bootnode -e GETH_NAME=mainnet.infura.io/v3/xxxxxxxxxxx -e GETH_PROTOCOL=https -e GETH_PORT= -e MININGKEY=xxx

is that ok? infura shows 0 requests…

which run.sh?
http://node.incognito.org/run.sh - has no example of GETH_PORT/PROTOCOL
github - also does not have

thanks @khanhj

@duc can you please advise?

@khanhj

I also tried doing like so:

# docker exec -it inc_mainnet sh
/ # cd /
/ # grep -i GETH *.sh
/ #

as you can see no signs of GETH variable in docker *.sh files

I also see now in infura some request.

also logs give this:

cat data/log.txt | grep 'eth_'| more
 -1002: Method not found: eth_getBlockByNumber
2020-04-18 17:17:30.024 request.go:49 [ERR] RPC log: Can not parse [{"jsonrpc":"2.0","id":0,"method":"eth_accounts"}]

not sure how good is that

i think your config is correct, do you see any request to infura now?
I’m checking with the team to see how to properly see ETH log…

Hello @khanhj

Please see 1 post above. Infura now shows requests.
But incognito logs show some methot not found errors

Hope its ok

Infura shows requests then your node is good.
I will report the error in your log above. Thank you.

1 Like

Hi all,
If you use infura, the url must be mainnet.infura
i’ve updated this post Advanced set up: customize the port of your Node

2 Likes

I’m about to use my old PC to run multnodes what do you guys think it is

I7 quad core 3.6ghz
16gb ram
500gb ssd

My internet is 150/150mbs

Hello,

I’m currently running a Node and I’m trying to install a Virtual Node on a Windows 10 PC on the same LAN as the Node.

I’ve read the entire thread, changed and opened ports and have come a long way, but now it’s still showing “Fix It” and “Account Missing” in the app.

Below is what I have so far, I appreciate any help on why it’s still not working.

sudo bash run.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2637    0  2637    0     0    328      0 --:--:--  0:00:08 --:--:--   601
Docker version 19.03.11, build 42e35e61f3
inc_mainnet
eth_mainnet
20200611_1: Pulling from incognitochain/incognito-mainnet
Digest: sha256:b3e3d220e92043ec74d761c2f8e2ad3d3df4aae6da01aecbb4c86bcd1fc2f8ac
Status: Image is up to date for incognitochain/incognito-mainnet:20200611_1
docker.io/incognitochain/incognito-mainnet:20200611_1
Error response from daemon: network with name inc_net already exists
f600459b1cacec57f06603d5624c8f2bd9aef2484d3acd39449be01c43892e5d
6de16f02611da63cecf364408bf4974fb4b5d504a3d556fd26a8beeaca5f96e3

sudo docker ps
CONTAINER ID        IMAGE                                         COMMAND                  CREATED              STATUS              PORTS                                                                                                                               NAMES
66618a1fe5c2        incognitochain/incognito-mainnet:20200611_1   "/bin/bash run_incog…"   About a minute ago   Up About a minute   0.0.0.0:9335->9335/tcp, 0.0.0.0:9434->9434/tcp                                                                                      inc_mainnet
1257c0e8041e        parity/parity:stable                          "/bin/parity --light…"   About a minute ago   Up About a minute   5001/tcp, 8080/tcp, 8082-8083/tcp, 8180/tcp, 0.0.0.0:8546->8546/tcp, 8545/tcp, 0.0.0.0:30303->30303/tcp, 0.0.0.0:30303->30303/udp   eth_mainnet

sudo netstat -nltp | grep docker-proxy
tcp6       0      0 :::9335                 :::*                    LISTEN      2764/docker-proxy
tcp6       0      0 :::9434                 :::*                    LISTEN      2751/docker-proxy
tcp6       0      0 :::30303                :::*                    LISTEN      2632/docker-proxy
tcp6       0      0 :::8546                 :::*                    LISTEN      2660/docker-proxy

Thanks!

1 Like

Hi @tale, I see you commented in another post that you solved this problem by using this command:
sudo dockerd
Everything is fine now?

1 Like

No I’m still stuck here (the other fix was for another issue)

1 Like

Hi @tale,

let’s talk on telegram (myid: khanhj), there more info i need to inspect on your system.

2 Likes

Hi!

@annie
@khanhj

I need to change the 3 ports because I use two vNodes on the same network.

Does the solution offer by annie for rpc port and node port still work? I don’t know where to put this in the code :

Does this solution still work for 8545?

Hi @Stradimarius,

The pNode is a plug and play device, there is no need to change any ports.
Simply follow to this instruction to setup: Unbox and set up your Physical Node

1 Like

Sorry it is not pNodes but vNodes of course. Sorry. I edited my previsous post.

I finally did it with some help from @doc directly from discord. Thanks a lot!

How to change your ports if you have two machines on the same IP address:

Kill both docker instance by using this command :

sudo docker stop inc_mainnet
sudo docker stop eth_mainnet

then open the run.sh script with nano or directly with the file editor.
you will need to change the port on the two below images (already changed in my below pictures)

Capture d’écran du 2020-10-22 17-36-50

Capture d’écran du 2020-10-22 17-37-21

Now you need to restart the script with this command :

sudo bash run.sh

It is now all ok !
Capture d’écran du 2020-10-22 17-38-10

3 Likes