Author

Topic: Establishing testnet connection between 2 machines (Read 510 times)

hero member
Activity: 984
Merit: 1000
Both machines went async. While the vps found 19 blocks, my home machine was at 0 blocks (./foocoind getinfo)

Is it normal, that you need to set "rpcallowip=*" to establish a connection between two machines? I thought this option is only to set who is allowed to send commands?
hero member
Activity: 984
Merit: 1000
I needed to do the following on the vps:
Code:
iptables -A INPUT -p tcp --dport 19700 -j ACCEPT


hero member
Activity: 984
Merit: 1000
If I add "rpcallowip=*" on each side then the vps connects to my home machine, but the home machine still gets:
Code:
2014-05-25 14:04:16 trying connection x.x.x.x lastseen=0.0hrs
2014-05-25 14:04:21 connection timeout

netstat -anet | grep 19700
vps:
Code:
tcp        0      0 x.x.x.x:39425     y.y.y.y:19700     TIME_WAIT   0          0
tcp        0      0 x.x.x.x:39434     y.y.y.y:19700     CONNECTED   1000       44447848
tcp6       0      0 :::19700                :::*                    LISTEN      1000       44447623

home:
Code:
tcp6       0      0 :::19700                :::*                    LISTEN      1000       4155783
tcp6       0      0 192.168.1.107:19700     x.x.x.x:39434     CONNECTED   1000       4157135
hero member
Activity: 984
Merit: 1000
Hello,

I just started playing with the latest litecoin code for personal education. Got the genesis block created and am now trying to establish a testnet connection between my vps and my home machine.

vps IP: x.x.x.x
home IP: y.y.y.y
Testnet port: 19700

From what I read I should do...

on vps: ./foocoind -testnet -connect=y.y.y.y
on home: ./foocoind -testnet -connect=x.x.x.x

I already forwarded the ports on my router to the home machine, so this should be no problem. However, I never geht both machines connected. Here are the conf files I tried (~/.foocoin/foocoin.conf):

Code:
rpcuser=test
rpcpassword=test1

Result (debug.log):
on vps:
2014-05-25 12:47:45 trying connection y.y.y.y lastseen=0.0hrs
2014-05-25 12:47:45 connect() failed after select(): Connection refused

on home:
2014-05-25 12:48:21 trying connection x.x.x.x lastseen=0.0hrs
2014-05-25 12:48:26 connection timeout

Other config:
Code:
rpcuser=test
rpcpassword=test1
testnet=1

Result: same as above

Other config:
Code:
rpcuser=test
rpcpassword=test1
testnet=1
testnet_config=1

Result: same as above

This is the output of "netstat -anet | grep 19700":

vps:
Code:
tcp        0      0 127.0.0.1:19700         0.0.0.0:*               LISTEN      1000       44434377
tcp        0      1 x.x.x.x:38424     y.y.y.y:19700     SYN_SENT    1000       44434729
tcp6       0      0 ::1:19700               :::*                    LISTEN      1000       44434375

home (192.168.1.107 is my local ip which is the port forwarded to):
Code:
tcp        0      0 127.0.0.1:19700         0.0.0.0:*               LISTEN      1000       4104309
tcp        0      1 192.168.1.107:34093     x.x.x.x:19700     SYN_SENT    1000       4105400
tcp6       0      0 ::1:19700               :::*                    LISTEN      1000       4104308

If I put "listen=1" to any of the machines config file I always get:
Code:
Error: An error occurred while setting up the RPC port 19700 for listening on IPv4: bind: Address already in use


Any ideas what else I can try?

Regards, haggis
Jump to: