btccom / btcpool-ABANDONED

backend of pool.btc.com
https://pool.btc.com
MIT License
640 stars 408 forks source link

job_maker log says unknown chain type #286

Closed thesahebi closed 4 years ago

thesahebi commented 5 years ago

error log:

Log file created at: 2019/04/30 19:26:35 Running on machine: testpool Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg F0430 19:26:35.336918 3495 JobMakerMain.cc:103] unknown chain type: BTC

jobmaker.info:

Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg I0430 19:26:35.336521 3495 JobMakerMain.cc:280] BSV jobmaker version 2.3.2-290-ga086a01 I0430 19:26:35.336906 3495 JobMakerMain.cc:224] chain: BTC, topic: BtcJob, enabled. F0430 19:26:35.336918 3495 JobMakerMain.cc:103] unknown chain type: BTC

supervisorctl status:

jobmaker FATAL Exited too quickly (process log may have details)

jobmaker.cfg:

job_workers = ( { id = 1; chain_type = "BTC"; enabled = true;

testnet = true; // is using testnet3

# payout address
# the private key of my2dxGb5jz43ktwGxg2doUaEb9WhZ9PQ7K is cQAiutBRMq4wwC9JHeANQLttogZ2EXw9AgnGXMq5S3SAMmbX2oLd
payout_address = "my2dxGb5jz43ktwGxg2doUaEb9WhZ9PQ7K";
# coinbase info with location ID (https://github.com/btccom/btcpool/issues/36)
coinbase_info = "region1/Project BTCPool/";

# block version, default is 0 means use the version which returned by bitcoind
# or you can specify the version you want to signal.
# more info: https://github.com/bitcoin/bips/blob/master/bip-0009.mediawiki
# Example: 
#  0                     : use bitcoind block version,
#  536870912(0x20000000) : bip9 support (with empty version bits)
#  536870914(0x20000002) : bip141(segwit), bit 1
# 
block_version = 0;

rawgbt_topic = "BtcRawGbt";

auxpow_gw_topic = "AuxPowBlock"; // kafka topic of merge mining auxpow work
rsk_rawgw_topic = "RskRawGw"; // kafka topic of RSK merge mining

job_topic = "BtcJob";

job_interval = 20; // send stratum job interval (seconds)
max_job_delay = 20; // max job dealy (seconds)

# max non-empty gbt life cycle time (seconds)
gbt_life_time = 90;

# max empty gbt life cycle time seconds
# CAUTION: the value SHOULD >= 10. If non-empty job not come in 10 seconds, 
#          jobmaker will always make a previous height job until its arrival 
empty_gbt_life_time = 15;

# policy used to determine the pace of merge mining jobs to be sent.
# 0: merge mining `getwork` does not trigger job updates (RSK and Namecoin).
# 1: update job when the `notify` flag in RSK `getwork` is true or the block height in Namecoin `getwork` higher than before.
# 2: update job when the current block hash of a merge mining `getwork` is different from before (RSK and Namecoin).
merged_mining_notify = 1; # (1 is recommended and default)

zookeeper_lock_path = "/locks/jobmaker_btc";
file_last_job_time = "/work/btcpool/build/run_jobmaker/btc_lastjobtime.txt";

}, { id = 1; chain_type = "ETH"; chain_name = "FOUNDATION"; // CLASSIC (ETC Main Network) or FOUNDATION (ETH Main Network) enabled = true;

rawgw_topic = "EthRawGw";
job_topic = "EthJob";

job_interval = 20; // send stratum job interval (seconds)
max_job_delay = 20; // max job dealy (seconds)
work_life_time = 60; // max getWork life cycle time (seconds)

zookeeper_lock_path = "/locks/jobmaker_eth";
file_last_job_time = "/work/btcpool/build/run_jobmaker/eth_lastjobtime.txt";

}, { id = 1; chain_type = "BTM"; enabled = true;

rawgw_topic = "BytomRawGw";
job_topic = "BytomJob";

job_interval = 20; // send stratum job interval (seconds)
max_job_delay = 20; // max job dealy (seconds)
work_life_time = 90; // max getWork life cycle time (seconds)

zookeeper_lock_path = "/locks/jobmaker_bytom";
file_last_job_time = "/work/btcpool/build/run_jobmaker/bytom_lastjobtime.txt";

}, { id = 1; chain_type = "SIA"; enabled = true;

rawgw_topic = "SiaRawGw";
job_topic = "SiaJob";

job_interval = 30; // send stratum job interval (seconds)
max_job_delay = 60; // max job dealy (seconds)
work_life_time = 90; // max getWork life cycle time (seconds)

zookeeper_lock_path = "/locks/jobmaker_sia";
file_last_job_time = "/work/btcpool/build/run_jobmaker/sia_lastjobtime.txt";

} );

kafka = { brokers = "10.1.2.33:9092"; };

zookeeper = { brokers = "10.1.2.33:2181";

Please help to fix,

YihaoPeng commented 5 years ago
chain_type = "BSV";

remove all other types

thesahebi commented 5 years ago

Hi, Still has issue: Running on machine: testpool Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg F0502 18:29:08.656996 19036 Kafka.cc:469] Failed to acquire metadata: Local: Broker transport failure

block_version = 0; rawgbt_topic = "BtcRawGbt"; auxpow_gw_topic = "AuxPowBlock"; // kafka topic of merge mining auxpow work rsk_rawgw_topic = "RskRawGw"; // kafka topic of RSK merge mining job_topic = "LtcJob"; job_interval = 20; // send stratum job interval (seconds) max_job_delay = 20; // max job dealy (seconds) gbt_life_time = 90; empty_gbt_life_time = 15; (RSK and Namecoin). merged_mining_notify = 1; # (1 is recommended and default) zookeeper_lock_path = "/locks/jobmaker_Ltc"; file_last_job_time = "/work/btcpool/build/run_jobmaker/ltc_lastjobtime.txt"; } ); kafka = { brokers = "10.1.2.33:9092"; }; zookeeper = { brokers = "10.1.2.33:2181"; }; root@testpool:/work/btcpool/build/run_jobmaker#

YihaoPeng commented 5 years ago

You need to fix your kafka. See this comment: https://github.com/btccom/btcpool/issues/285#issuecomment-487893638

YihaoPeng commented 5 years ago

Another reminder that I found you have a BSV jobmaker from your log, it only works with BitcoinSV, not for Litecoin. You need an LTC jobmaker for Litecoin.

I0430 19:26:35.336521 3495 JobMakerMain.cc:280] BSV jobmaker version 2.3.2-290-ga086a01

build BTCPool that linking to Litecoin

mkdir /work
cd /work
wget -O litecoin-0.16.3.tar.gz https://github.com/litecoin-project/litecoin/archive/v0.16.3.tar.gz
tar zxf litecoin-0.16.3.tar.gz

git clone https://github.com/btccom/btcpool.git
cd btcpool
mkdir build
cd build

# Release build with 4 jobs:
cmake -DJOBS=4 -DCHAIN_TYPE=LTC -DCHAIN_SRC_ROOT=/work/litecoin-0.16.3 ..
make -j4

# Debug build:
cmake -DCMAKE_BUILD_TYPE=Debug -DCHAIN_TYPE=LTC -DCHAIN_SRC_ROOT=/work/litecoin-0.16.3 ..
make -j4
thesahebi commented 5 years ago

gbtmaker.INFO log: Log file created at: 2019/06/11 12:13:01 Running on machine: testpool Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg I0611 12:13:01.514346 5681 GbtMakerMain.cc:98] LTC gbtmaker version 2.3.2-291-g2cb2649 I0611 12:13:01.514678 5681 Kafka.cc:368] producer librdkafka version: 0.9.1 I0611 12:13:01.514812 5681 Kafka.cc:442] add brokers: 10.1.2.33:9092 I0611 12:13:01.514873 5681 Kafka.cc:449] create topic handle: LtcRawGbt E0611 12:13:01.797552 5681 Utils.cc:272] server responded with code: 401 E0611 12:13:01.797837 5681 BitcoinUtils.cc:394] rpc getnetworkinfo call failure E0611 12:13:02.048434 5681 Utils.cc:272] server responded with code: 401 E0611 12:13:02.048487 5681 BitcoinUtils.cc:429] rpc getinfo call failure F0611 12:13:02.048514 5681 GbtMakerMain.cc:139] gbtmaker init failure

my configuration:

gbtmaker = { rpcinterval = 10; is_check_zmq = true; rawgbt_topic = "LtcRawGbt"; lightgbt = false; # if unspecified, default false }; bitcoind = { zmq_addr = "tcp://127.0.0.1:8331"; rpc_addr = "http://127.0.0.1:8332"; rpc_userpwd = "bitcoinrpc:usertest123"; }; kafka = { brokers = "10.1.2.33:9092"; };

supervisorctl status: gbtmaker BACKOFF Exited too quickly (process log may have details)

SwimmingTiger commented 5 years ago

curl -v -u 'bitcoinrpc:usertest123' --data '{"jsonrpc":"1.0","id":"1","method":"getblocktemplate","params":[{"rules" : ["segwit"]}]}' 'http://127.0.0.1:8332'

You will get the same response:

< HTTP/1.1 401 Unauthorized
* Authentication problem. Ignoring this.
< WWW-Authenticate: Basic realm="jsonrpc"
< Date: Tue, 30 Jul 2019 04:02:08 GMT
< Content-Length: 0
< Content-Type: text/html; charset=ISO-8859-1
<
* Connection #0 to host 127.0.0.1 left intact

Please read the bitcoind configuration file reference manual to resolve issues related to RPC certification.

And rpc_userpwd = "bitcoinrpc:usertest123" means:

rpcuser=bitcoinrpc
rpcpassword=usertest123