Achain-Dev / Achain

Achain blockchain
https://www.achain.com
MIT License
174 stars 60 forks source link

Node is stuck at 8524100 block #142

Closed mahsumurebe closed 4 years ago

mahsumurebe commented 4 years ago

I installed the Achain node on my Ubuntu 18 server. Node synchronization has stopped a while ago. Then I updated it to the latest version (v2.1). Sync is not active again. Node is now at block 8524100. Another problem is that Achain responds slowly to RPC requests. How can I solve the slow respond problem?

I am running the node as systemd service. For this, I use the --server --daemon parameters. But the node does not print any logs into the console.

Server: OS: Ubuntu 18.04.3 LTS Cpu Core Count: 4 Cpu Model: QEMU Virtual CPU version 2.5+ Ram Size: 2GB Swap: 2 GB Disk Size: 100GB

systemd.service file

[Unit]
Description=ACT Coin Daemon
After=network.target

[Service]
Type=simple
WorkingDirectory=/data/
ExecStart=/data/bin/2.1/Achain --data-dir /data/resources --wallet-dir /data/wallets --server --daemon
Restart=on-failure

[Install]
WantedBy=multi-user.target

Config file

{
  "logging": {
    "includes": [],
    "appenders": [{
        "name": "stderr",
        "type": "console",
        "args": {
          "stream": "std_error",
          "level_colors": [{
              "level": "debug",
              "color": "green"
            },{
              "level": "warn",
              "color": "brown"
            },{
              "level": "error",
              "color": "red"
            }
          ]
        },
        "enabled": true
      },{
        "name": "default",
        "type": "file",
        "args": {
          "format": "${timestamp} ${thread_name} ${context} ${file}:${line} ${method} ${level}]  ${message}",
          "filename": "/data/logs/default/default.log",  // I have defined the full path
          "flush": true,
          "rotate": true,
          "rotation_interval": 3600000000,
          "rotation_limit": "86400000000"
        },
        "enabled": true
      },{
        "name": "rpc",
        "type": "file",
        "args": {
          "format": "${timestamp} ${thread_name} ${context} ${file}:${line} ${method} ${level}]  ${message}",
          "filename": "/data/logs/rpc/rpc.log",  // I have defined the full path
          "flush": true,
          "rotate": true,
          "rotation_interval": 3600000000,
          "rotation_limit": "86400000000"
        },
        "enabled": true
      },{
        "name": "blockchain",
        "type": "file",
        "args": {
          "format": "${timestamp} ${thread_name} ${context} ${file}:${line} ${method} ${level}]  ${message}",
          "filename": "/data/logs/blockchain/blockchain.log",  // I have defined the full path
          "flush": true,
          "rotate": true,
          "rotation_interval": 3600000000,
          "rotation_limit": "86400000000"
        },
        "enabled": true
      },{
        "name": "p2p",
        "type": "file",
        "args": {
          "format": "${timestamp} ${thread_name} ${context} ${file}:${line} ${method} ${level}]  ${message}",
          "filename": "/data/logs/p2p/p2p.log",  // I have defined the full path
          "flush": true,
          "rotate": true,
          "rotation_interval": 3600000000,
          "rotation_limit": "86400000000"
        },
        "enabled": true
      }
    ],
    "loggers": [{
        "name": "default",
        "level": "warn",
        "enabled": true,
        "additivity": false,
        "appenders": [
          "default",
          "p2p"
        ]
      },{
        "name": "client",
        "level": "warn",
        "enabled": true,
        "additivity": false,
        "appenders": [
          "default",
          "p2p"
        ]
      },{
        "name": "rpc",
        "level": "warn",
        "enabled": true,
        "additivity": false,
        "appenders": [
          "rpc"
        ]
      },{
        "name": "p2p",
        "level": "warn",
        "enabled": true,
        "additivity": false,
        "appenders": [
          "p2p"
        ]
      },{
        "name": "user",
        "level": "debug",
        "enabled": true,
        "additivity": false,
        "appenders": [
          "user"
        ]
      },{
        "name": "blockchain",
        "level": "warn",
        "enabled": true,
        "additivity": false,
        "appenders": [
          "blockchain"
        ]
      }
    ]
  },
  "ignore_console": false,
  "client_debug_name": "MY_ACT", // I Filled this
  "rpc": {
    "enable": true,  // false to true
    "enable_cache": false,
    "rpc_user": "my_rpc_user", // I Filled this
    "rpc_password": "my_rpc_pass",  // I Filled this
    "rpc_endpoint": "127.0.0.1:0",
    "httpd_endpoint": "0.0.0.0:2222", // I Changed this
    "encrypted_rpc_endpoint": "127.0.0.1:0",
    "encrypted_rpc_wif_key": "",
    "htdocs": "./htdocs"
  },
  "statistics_enabled": false,
  "default_peers": [
    "node.achain.com:61696"
  ],
  "maximum_number_of_connections": 200,
  "use_upnp": true,
  "chain_servers": [],
  "chain_server": {
    "enabled": true, // false to true
    "listen_port": 0
  },
  "wallet_enabled": true,
  "min_relay_fee": 1000,
  "wallet_callback_url": "",
  "light_network_fee": 1000,
  "light_relay_fee": 1000,
  "relay_account_name": "",
  "faucet_account_name": ""
}
daxuanxiaoyou commented 4 years ago

1、backup wallets folder;2、delete chain folder;3、Start Achain with the previous version and add this startup item --stop-before-block 8523999; 4、Once this block is synchronized, start with the new version 发自我的华为手机-------- 原始邮件 --------发件人: Mahsum UREBE notifications@github.com日期: 2020年8月12日周三 傍晚5:23收件人: Achain-Dev/Achain Achain@noreply.github.com抄送: Subscribed subscribed@noreply.github.com主 题: [Achain-Dev/Achain] Node is stuck at 8524100 block (#142) I installed the Achain node on my Ubuntu 18 server. Node synchronization has stopped a while ago. Then I updated it to the latest version (v2.1). Sync is not active again. Node is now at block 8524100. Another problem is that Achain responds slowly to RPC requests. How can I solve the slow respond problem? I am running the node as systemd service. For this, I use the --server --daemon parameters. But the node does not print any logs into the console. Server: OS: Ubuntu 18.04.3 LTS Cpu Core Count: 4 Cpu Model: QEMU Virtual CPU version 2.5+ Ram Size: 2GB Swap: 2 GB Disk Size: 100GB systemd.service file [Unit] Description=ACT Coin Daemon After=network.target

[Service] Type=simple WorkingDirectory=/data/ ExecStart=/data/bin/2.1/Achain --data-dir /data/resources --wallet-dir /data/wallets --server --daemon Restart=on-failure

[Install] WantedBy=multi-user.target

Config file { "logging": { "includes": [], "appenders": [{ "name": "stderr", "type": "console", "args": { "stream": "std_error", "level_colors": [{ "level": "debug", "color": "green" },{ "level": "warn", "color": "brown" },{ "level": "error", "color": "red" } ] }, "enabled": true },{ "name": "default", "type": "file", "args": { "format": "${timestamp} ${thread_name} ${context} ${file}:${line} ${method} ${level}] ${message}", "filename": "/data/logs/default/default.log", // I have defined the full path "flush": true, "rotate": true, "rotation_interval": 3600000000, "rotation_limit": "86400000000" }, "enabled": true },{ "name": "rpc", "type": "file", "args": { "format": "${timestamp} ${thread_name} ${context} ${file}:${line} ${method} ${level}] ${message}", "filename": "/data/logs/rpc/rpc.log", // I have defined the full path "flush": true, "rotate": true, "rotation_interval": 3600000000, "rotation_limit": "86400000000" }, "enabled": true },{ "name": "blockchain", "type": "file", "args": { "format": "${timestamp} ${thread_name} ${context} ${file}:${line} ${method} ${level}] ${message}", "filename": "/data/logs/blockchain/blockchain.log", // I have defined the full path "flush": true, "rotate": true, "rotation_interval": 3600000000, "rotation_limit": "86400000000" }, "enabled": true },{ "name": "p2p", "type": "file", "args": { "format": "${timestamp} ${thread_name} ${context} ${file}:${line} ${method} ${level}] ${message}", "filename": "/data/logs/p2p/p2p.log", // I have defined the full path "flush": true, "rotate": true, "rotation_interval": 3600000000, "rotation_limit": "86400000000" }, "enabled": true } ], "loggers": [{ "name": "default", "level": "warn", "enabled": true, "additivity": false, "appenders": [ "default", "p2p" ] },{ "name": "client", "level": "warn", "enabled": true, "additivity": false, "appenders": [ "default", "p2p" ] },{ "name": "rpc", "level": "warn", "enabled": true, "additivity": false, "appenders": [ "rpc" ] },{ "name": "p2p", "level": "warn", "enabled": true, "additivity": false, "appenders": [ "p2p" ] },{ "name": "user", "level": "debug", "enabled": true, "additivity": false, "appenders": [ "user" ] },{ "name": "blockchain", "level": "warn", "enabled": true, "additivity": false, "appenders": [ "blockchain" ] } ] }, "ignore_console": false, "client_debug_name": "MY_ACT", // I Filled this "rpc": { "enable": true, // false to true "enable_cache": false, "rpc_user": "my_rpc_user", // I Filled this "rpc_password": "my_rpc_pass", // I Filled this "rpc_endpoint": "127.0.0.1:0", "httpd_endpoint": "0.0.0.0:2222", // I Changed this "encrypted_rpc_endpoint": "127.0.0.1:0", "encrypted_rpc_wif_key": "", "htdocs": "./htdocs" }, "statistics_enabled": false, "default_peers": [ "node.achain.com:61696" ], "maximum_number_of_connections": 200, "use_upnp": true, "chain_servers": [], "chain_server": { "enabled": true, // false to true "listen_port": 0 }, "wallet_enabled": true, "min_relay_fee": 1000, "wallet_callback_url": "", "light_network_fee": 1000, "light_relay_fee": 1000, "relay_account_name": "", "faucet_account_name": "" }

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.

mahsumurebe commented 4 years ago

I started node in the 2.0 version. I expect it to be in sync.

mahsumurebe commented 4 years ago

I started the node but it hasn't started syncing yet. Is this normal ?

Logs:

Loading blockchain from: /data/resources/chain
Loading config from file: /data/resources/config.json
Merged 10 default peers into config.
Using blockchain checkpoints from file: /data/resources/checkpoints.json
Initializing state from built-in genesis file
Please be patient, this will take several minutes...
Successfully replayed 0 blocks in 0 seconds.
Blockchain size changed from 0MiB to 0MiB.
mahsumurebe commented 4 years ago

@daxuanxiaoyou My problem is still not resolved. Can you help? The node is still in block 0.

owenSai commented 4 years ago
  1. if you are exchange,pls backup wallets folder first
  2. then,delete chain folder;
  3. Start Achain with the previous version (v2.0) and add this startup item --stop-before-block 8523999;  4、Once this block is synchronized, start with the new version (v 2.1),and not with --stop-before-block    ------------------ Original ------------------ From:  "Mahsum UREBE"<notifications@github.com>; Date:  Fri, Aug 14, 2020 08:26 PM To:  "Achain-Dev/Achain"<Achain@noreply.github.com>; Cc:  "Subscribed"<subscribed@noreply.github.com>; Subject:  Re: [Achain-Dev/Achain] Node is stuck at 8524100 block (#142)

 

@daxuanxiaoyou My problem is still not resolved. Can you help? The node is still in block 0.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

mahsumurebe commented 4 years ago

@daxuanxiaoyou said the same solution. I applied this solution. But now it is not synchronized. Node still at block zero. @owenSai

owenSai commented 4 years ago

run this command : network_add_node 13.114.70.13:61696     ------------------ Original ------------------ From:  "Mahsum UREBE"<notifications@github.com>; Date:  Thu, Aug 20, 2020 04:50 PM To:  "Achain-Dev/Achain"<Achain@noreply.github.com>; Cc:  "杨赛"<yangsai@aclub.io>; "Mention"<mention@noreply.github.com>; Subject:  Re: [Achain-Dev/Achain] Node is stuck at 8524100 block (#142)

 

@daxuanxiaoyou said the same solution. I applied this solution. But now it is not synchronized. Node still at block zero. @owenSai

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

mahsumurebe commented 4 years ago

@owenSai Thank you. Now my node is syncing. But RPC requests are still getting very slow responses.

daxuanxiaoyou commented 4 years ago

the process is busing at aync, so the rpc is slow. when the block catches up the newest, and everything will be ok发自我的华为手机-------- 原始邮件 --------发件人: Mahsum UREBE notifications@github.com日期: 2020年8月21日周五 晚上9:26收件人: Achain-Dev/Achain Achain@noreply.github.com抄送: daxuanxiaoyou yangsai_2006@163.com, Mention mention@noreply.github.com主 题: Re: [Achain-Dev/Achain] Node is stuck at 8524100 block (#142) @owenSai Thank you. Now my node is syncing. But RPC requests are still getting very slow responses.

—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.

mahsumurebe commented 4 years ago

Thank you all. Thats problem solved.