wavesplatform / Waves

⛓️ Reference Waves Blockchain Node (client) implementation on Scala
https://wavesplatform.com/
MIT License
1.17k stars 418 forks source link

Invalid Application name length in handshake: 0 #366

Closed btcnash closed 6 years ago

btcnash commented 7 years ago

root@BlockChain:/data/waves# java -jar waves.jar waves.conf 2017-06-25 17:31:32 INFO [main] c.w.Application$ - Starting... 2017-06-25 17:31:34 INFO [lt-dispatcher-5] a.event.slf4j.Slf4jLogger - Slf4jLogger started 2017-06-25 17:31:34 INFO [main] c.w.Application$ - Waves - Release0 v0.6.6 Blockchain Id: W 2017-06-25 17:31:35 INFO [lt-dispatcher-6] s.n.NetworkController - Declared address: None 2017-06-25 17:31:35 INFO [lt-dispatcher-6] s.network.NetworkListener - Successfully registered to blacklist updates notifications 2017-06-25 17:31:35 INFO [lt-dispatcher-4] s.n.NetworkController - Successfully started listening 2017-06-25 17:31:35 INFO [main] c.w.Application - Genesis block has been added to the state 2017-06-25 17:31:36 INFO [lt-dispatcher-5] s.n.NetworkController - Connecting to: ec2-52-30-47-67.eu-west-1.compute.amazonaws.com/52.30.47.67:6863 2017-06-25 17:31:36 INFO [lt-dispatcher-4] s.network.peer.PeerManager - Connected to ec2-52-30-47-67.eu-west-1.compute.amazonaws.com/52.30.47.67:6863 2017-06-25 17:31:36 INFO [lt-dispatcher-4] s.n.PeerConnectionHandler - Handshake sent to ec2-52-30-47-67.eu-west-1.compute.amazonaws.com/52.30.47.67:6863 2017-06-25 17:31:36 INFO [lt-dispatcher-4] s.n.PeerConnectionHandler - Connection closed to ec2-52-30-47-67.eu-west-1.compute.amazonaws.com/52.30.47.67:6863: by remote in state AwaitingHandshake 2017-06-25 17:31:38 INFO [lt-dispatcher-3] scorex.utils.NTP$ - Adjusting time with 11 milliseconds. 2017-06-25 17:31:38 INFO [lt-dispatcher-3] s.c.m.BlockGeneratorController - Start block generation 2017-06-25 17:31:38 INFO [lt-dispatcher-3] s.c.m.BlockGeneratorController - Suspend block generation 2017-06-25 17:31:39 INFO [main] c.w.Application - REST API was bound on xxx.xxx.xxx.xxx:6869 2017-06-25 17:31:41 INFO [lt-dispatcher-3] s.n.NetworkController - Connecting to: ec2-52-51-92-182.eu-west-1.compute.amazonaws.com/52.51.92.182:6863 2017-06-25 17:31:41 INFO [lt-dispatcher-6] s.network.peer.PeerManager - Connected to ec2-52-51-92-182.eu-west-1.compute.amazonaws.com/52.51.92.182:6863 2017-06-25 17:31:41 INFO [lt-dispatcher-5] s.n.PeerConnectionHandler - Handshake sent to ec2-52-51-92-182.eu-west-1.compute.amazonaws.com/52.51.92.182:6863 2017-06-25 17:31:46 INFO [lt-dispatcher-4] s.n.NetworkController - Connecting to: ec2-52-30-47-67.eu-west-1.compute.amazonaws.com/52.30.47.67:6863 2017-06-25 17:31:46 INFO [lt-dispatcher-6] s.network.peer.PeerManager - Connected to ec2-52-30-47-67.eu-west-1.compute.amazonaws.com/52.30.47.67:6863 2017-06-25 17:31:46 INFO [lt-dispatcher-4] s.n.PeerConnectionHandler - Handshake sent to ec2-52-30-47-67.eu-west-1.compute.amazonaws.com/52.30.47.67:6863 2017-06-25 17:31:46 INFO [lt-dispatcher-4] s.n.PeerConnectionHandler - Connection closed to ec2-52-30-47-67.eu-west-1.compute.amazonaws.com/52.30.47.67:6863: by remote in state AwaitingHandshake 2017-06-25 17:31:51 INFO [lt-dispatcher-8] s.n.NetworkController - Connecting to: ec2-52-77-111-219.ap-southeast-1.compute.amazonaws.com/52.77.111.219:6863 2017-06-25 17:31:51 INFO [lt-dispatcher-5] s.network.peer.PeerManager - Connected to ec2-52-77-111-219.ap-southeast-1.compute.amazonaws.com/52.77.111.219:6863 2017-06-25 17:31:51 INFO [lt-dispatcher-5] s.n.PeerConnectionHandler - Handshake sent to ec2-52-77-111-219.ap-southeast-1.compute.amazonaws.com/52.77.111.219:6863 2017-06-25 17:31:51 INFO [lt-dispatcher-8] s.n.PeerConnectionHandler - Connection closed to ec2-52-77-111-219.ap-southeast-1.compute.amazonaws.com/52.77.111.219:6863: by remote in state AwaitingHandshake 2017-06-25 17:31:51 WARN [lt-dispatcher-2] s.n.PeerConnectionHandler - Error during parsing a handshake from ec2-52-51-92-182.eu-west-1.compute.amazonaws.com/52.51.92.182:6863: requirement failed: Invalid Application name length in handshake: 0 2017-06-25 17:31:56 INFO [lt-dispatcher-8] s.n.NetworkController - Connecting to: ec2-52-28-66-217.eu-central-1.compute.amazonaws.com/52.28.66.217:6863 2017-06-25 17:31:56 INFO [lt-dispatcher-8] s.network.peer.PeerManager - Connected to ec2-52-28-66-217.eu-central-1.compute.amazonaws.com/52.28.66.217:6863 2017-06-25 17:31:56 INFO [lt-dispatcher-5] s.n.PeerConnectionHandler - Handshake sent to ec2-52-28-66-217.eu-central-1.compute.amazonaws.com/52.28.66.217:6863 ^C2017-06-25 17:31:57 INFO [shutdownHook1] c.w.Application - Stopping network services 2017-06-25 17:31:57 INFO [lt-dispatcher-5] s.n.NetworkController - Going to shutdown all connections & unbind port 2017-06-25 17:31:57 INFO [lt-dispatcher-4] s.n.PeerConnectionHandler - Enforced to close communication with: ec2-52-28-66-217.eu-central-1.compute.amazonaws.com/52.28.66.217:6863 in state AwaitingHandshake 2017-06-25 17:31:57 INFO [shutdownHook1] c.w.Application - Shutdown complete

`waves { directory = "/data/waves"

logging-level = INFO

network {
    file = ${waves.directory}"/data/peers.dat"
    bind-address = "0.0.0.0"
    port = 6863
    node-name = "test-node"
    #declared-address = ""
    #nonce = 0
    known-peers = ["52.30.47.67:6863", "52.28.66.217:6863", "52.77.111.219:6863", "52.51.92.182:6863"]
    local-only = no
    peers-data-residence-time = 1d
    black-list-residence-time = 10m
    max-connections = 30
    connection-timeout = 30s
    outbound-buffer-size = 16M
    min-ephemeral-port-number = 35368
    max-unverified-peers = 1000
    peers-broadcast-interval = 2m
    black-list-threshold = 50
    unrequested-packets-threshold = 100
upnp {
    enable = no
    gateway-timeout = 7s
    discover-timeout = 3s
    }
}

wallet {
    file = ${waves.directory}"/wallet/wallet.dat"
    password = "raHsjUk6RXHYDmo3fm4TEtet"
    seed = ""
}

blockchain {
    file = ${waves.directory}"/data/blockchain.dat"
    type = MAINNET
}

fees {
    payment {
        WAVES = 100000
    }
    issue {
        WAVES = 100000000
    }
    transfer {
        WAVES = 100000
    }
    reissue {
        WAVES = 100000
    }
    burn {
        WAVES = 100000
    }
    exchange {
        WAVES = 100000
    }
    lease {
        WAVES = 100000
    }
    lease-cancel {
        WAVES = 100000
    }
}

miner {
    enable = yes
    offline = no
    quorum = 1
    generation-delay = 15s
    interval-after-last-block-then-generation-is-allowed = 1d
    tf-like-scheduling = yes
}

rest-api {
    enable = yes
    bind-address = "127.0.0.1"
    port = 6869
    api-key-hash = "H6nsiifwYKYEx6YzYD7woP1XCn72RVvx6tC1zjjLXqsu"
    cors = yes
}

synchronization {
    max-rollback = 100
    max-chain-length = 101
    load-entire-chain = yes
    synchronization-timeout = 30s
    pin-to-initial-peer = yes
    retries-before-blacklisting = 2
    operation-retires = 3
    score-broadcast-interval = 30s
    score-ttl = 90s
}

utx {
    size = 10000
    broadcast-interval = 30s
}

}`

alexkof commented 7 years ago

Possible reason is that you have invalid config file - you have MAINNET blockchain type and TESTNET node in known-peers list. Please note that lise of peers is stored locally in peers.dat file also.