Why does it not connect to network?

segovrosegovro SpainMember Posts: 30 ✭✭
AlethZero/v0.6.2/Debug/Linux/g++
d49314d89e9b26208b7b5b60d35940965ccd3886
CLEAN

org:device:InternetGatewayDevice:1 ]
*N* [ 07:42:10 | main ] External addr: 145.129.56.68
*N* [ 07:42:11 | main ] Punched through NAT and mapped local port 30303 onto external port 30303 .
*N* [ 07:42:11 | main ] Id: 133b1996 Mode: Full
*N* [ 07:42:11 | net ] Initialising: latest= a7722d611450de26f55026b6544e34d9431b0a67a829e1794ac36fa4f079208f
!!! [ 07:42:11 | net ] Error sending: Bad file descriptor
!!! [ 07:42:23 | net ] Error sending: Bad file descriptor

Best Answers

Answers

  • HellRazorHellRazor BerlinMember Posts: 99 ✭✭
    Oh wait it is a different error message:
    *N* [ 19:12:58 | main ] Address: 127.0.0.1 = 127.0.0.1 [LOCAL]
    *N* [ 19:12:58 | main ] Address: 192.168.178.28 = 192.168.178.28 [PEER]
    *** [ 19:13:00 | main ] UPnP device: http://192.168.178.1:49000/igddesc.xml [st: urn:schemas-upnp-org:device:InternetGatewayDevice:1 ]
    *N* [ 19:13:00 | main ] External addr: XX.XX.XX.XXX
    !N! [ 19:13:00 | main ] Couldn't punch through NAT (or no NAT in place). Assuming 30303 is local & external port.
    *N* [ 19:13:00 | main ] Id: e3705bfb Mode: Full
    *N* [ 19:13:00 | net ] Initialising: latest= a7722d611450de26f55026b6544e34d9431b0a67a829e1794ac36fa4f079208f
  • StephanTualStephanTual London, EnglandMember, Moderator Posts: 1,282 mod
    If you "Couldn't punch through NAT", you'll need to manually set up a mapping on 30303 for local & external port via your router interface.
  • HellRazorHellRazor BerlinMember Posts: 99 ✭✭
    Strange, it all worked fine until Tuesday. Nothing was changed on the router and also the bitcoin client can connect to other nodes and download the chain?
  • andygough1974andygough1974 Member Posts: 8
    Did anyone have success punching through the NAT?

    I have been following Stephans How To Get Started with your first DAPP guide and haven’t been able to get Alethzero running as it should.

    I created 2 new VMs both running Ubuntun 14.04.01 and followed carefully the instructions for “Building for Ubuntu” which was great until I went to start a “Local Test Net”.

    I run: ./eth -u 192.168.11.130 -l 30300 -d /tmp on one VM with IP address 192.168.130

    On the other VM I run alethzero and connect to 192.168.130:30300 and get the following messages on the eth machine:

    UPnP device: http://192.168.11.1:2869/upnphost/udhisapi.dll?content=uuid:571deab2-8ffd-4cba-b2cb-0f1d80b86b77 [st: upnp:rootdevice ]
    External addr: 0.0.0.0
    Couldn't punch through NAT (or no NAT in place). Assuming 30300 is local & external port.
    Listening on local port 30300 (public: 192.168.11.130:30300 )
    Id: 9e0c3bc8…
    Committing to mine on block 08436a4d…
    Committing to mine on block 08436a4d…
    Post-reward stateRoot: 2c8e9c4e…
    Post-reward stateRoot: 2c8e9c4e…

    And on the VM running alethzero I have:

    UPnP device: http://192.168.11.1:2869/upnphost/udhisapi.dll?content=uuid:571deab2-8ffd-4cba-b2cb-0f1d80b86b77 [st: upnp:rootdevice ]
    External addr: 0.0.0.0
    Couldn't punch through NAT (or no NAT in place). Assuming 30303 is local & external port.
    Id: 2641adc7…
    UPnP device not found.
    Id: 2641adc7…

    Any help is greatly appreciated, I tried adding port forwarding on my router for the VMs but they are not considered as LAN addresses??

    Many thanks in advance



  • StephanTualStephanTual London, EnglandMember, Moderator Posts: 1,282 mod
    @andygough1974 you need to bridge the network to your vm and use port mapping on your router or similar. I don't think UPNP would work from within a VM on buntu. Then again, it depends on what tools you use so your mileage may vary.
  • andygough1974andygough1974 Member Posts: 8
    @Stephan_Tual‌ Thanks, i edited the settings on my VMWare Ubuntu VMs and set the Network card settings to Bridged and also "Replicate physical network configuration state."

    Then I went to my Netgear router admin page (192.168.1.1), and went to Port Forwarding and added a custom service for the VM running .\eth which i set external and internal mapping to 30300.

    Another page on my Router settings concerns UPnP, here I can see both VMs are here and that UPnP is active on port 30300 for the VM running eth and 30303 for the VM running alethzero. (Im not sure where 30303 is
    coming from).

    When I run eth and alethzero it now successfully punches through the NAT!

    Maybe some of this may be useful for @heliumcraft‌ bounty post as he was asking for 2 VMs like I am attempting to set up?

    Next, I connect alethezero to the peer with the ip address of the eth service on the other VM: 192.168.1.23:30300

    Unfortunately, I get errors about Bad File descriptors and it cant connect because the Peer is already connected (I shut down everything and restarted so nothing should be connected). I get the following errors and I don't know what they mean.

    From the VM running alethzero:

    *** [ 09:35:21 AM | main ] UPnP device: http://192.168.1.1:5000/Public_UPNP_gatedesc.xml [st: urn:schemas-upnp-org:device:InternetGatewayDevice:1 ] *N* [ 09:35:21 AM | main ] External addr: 50.161.27.48 *N* [ 09:35:21 AM | main ] Punched through NAT and mapped local port 30303 onto external port 30303 . *N* [ 09:35:21 AM | main ] Id: 42dfc2f3… *** [ 09:35:23 AM | main ] UPnP device: http://192.168.1.1:5000/Public_UPNP_gatedesc.xml [st: urn:schemas-upnp-org:device:InternetGatewayDevice:1 ] *N* [ 09:35:24 AM | main ] External addr: 50.161.27.48 *N* [ 09:35:24 AM | main ] Punched through NAT and mapped local port 30303 onto external port 30303 . *N* [ 09:35:24 AM | main ] Id: 42dfc2f3… !!! [ 09:35:28 AM | p2p ] Already have peer id 5b9f3720… !!! [ 09:35:28 AM | p2p ] Error sending: Bad file descriptor

    From the VM running eth:

    +N+ [ 09:35:28 | p2p ] Accepted connection from 192.168.1.24:56150 +N+ [ 09:35:28 | p2p ] Listening on local port 30300 (public: 192.168.1.23:30300 ) +N+ [ 09:35:28 | p2p ] Accepted connection from 192.168.1.24:56151 +N+ [ 09:35:28 | p2p ] Listening on local port 30300 (public: 192.168.1.23:30300 ) -N- [ 09:35:28 | p2p | 19 ] Hello: AlethZero/v0.6.8d/Release/Linux/g++ V[ 0 ] 42dfc2f3… [eth] 30303 -N- [ 09:35:28 | p2p | 19 ] Status: 33 / 0 / 08436a4d… , TD: 131072 = 08436a4d… -N- [ 09:35:28 | p2p | 20 ] Hello: AlethZero/v0.6.8d/Release/Linux/g++ V[ 0 ] 42dfc2f3… [eth] 30303 !!! [ 09:35:28 | p2p ] Already have peer id 42dfc2f3… +N+ [ 09:35:28 | p2p | 20 ] Disconnecting (reason: Peer was already connected. ) +N+ [ 09:35:28 | p2p | 20 ] Closing 192.168.1.24:56151

    Does anyone have any suggestions on how to proceed?

    @heliumcraft‌ did you manage to get this working?
  • StephanTualStephanTual London, EnglandMember, Moderator Posts: 1,282 mod
    @andygough1974‌: Good to hear you managed to solve this through port mapping.

    Make sure you're running on 6.8d which has the latest protocol version (I think you could get away with c, but I'm not 100% sure) if running Devel branch. d was released this afternoon so if you have compiled yesterday or later, it's probably already out of date.

    To know when the software is released/merged next time, see http://cpt-obvious.ethercasts.com:8010/waterfall or join us on skype (add me and I'll push you), or join IRC Freenode #ethereum-dev. Cheers!
  • andygough1974andygough1974 Member Posts: 8
    I updated to 6.8d and now i can connect to the remote and local servers!
  • segovrosegovro SpainMember Posts: 30 ✭✭
    Just installed AlethZero/v0.6.9/Release/Linux/g++
    It connects again, I see peers
    No NameReg
  • HellRazorHellRazor BerlinMember Posts: 99 ✭✭
    edited September 2014
    @Stephan_Tual‌ wasn't me, cuz I still can't connect
  • segovrosegovro SpainMember Posts: 30 ✭✭
    NameReg works again
    But somebody is playing with the blockchain, still
    Lets hope it settles down one day
    :)
Sign In or Register to comment.