memo for question

in #nothing8 years ago (edited)

What I want to do

put the name as witness on this site.

https://byteball.fr/stats.html

Question

I investigated the setting procedure independently.

finally I could run witness.

but can't change other device's witnesslist.

Errors shown like this.

https://byteball.slack.com/files/U5QLHTLHM/F7MMRRLGK/img_1469.jpg

https://byteball.slack.com/files/U5QLHTLHM/F7M8STG2V/error2.png


what should i do?

①Wait until unit finished?

*I think that it is the unit of this line written at terminal witness startup.

’will archive if exists from unit N6QadI9yg3zLxPMphfNGJcPfddW4yHPkoGMbbGZsWa0=”?’


*It is the unit of this line coming out to the terminal at witness startup.

will archive if exists from unit N6QadI9yg3zLxPMphfNGJcPfddW4yHPkoGMbbGZsWa0=

②or Do I forget the other things I should do? If so, what?

what I did to running witness

1:Run Docker and pull ubuntu + port open

pull ubuntu

docker run -it -p 6611:6611 -p 80:80 ubuntu


2:get modules and get source code

cd 

apt-get update 

apt-get install vim 

apt-get install -y nodejs npm nodejs node-sqlite3 git logrotate 

update-alternatives --install /usr/bin/node node /usr/bin/nodejs 10 

git clone https://github.com/byteball/byteball-witness 

cd byteball-witness 

npm install bitcore-mnemonic 

npm install 

cd node_modules 

git clone https://github.com/byteball/byteballcore 

git clone https://github.com/byteball/headless-byteball 


3:change config

in byteballcore/conf.js changed like this

   exports.port = 6611;


in ~/byteball-witness/conf.js  changed like this

    exports.port = 6611; 

    //exports.myUrl = 'wss://mydomain.com/bb'; 

    exports.bServeAsHub = false; 


4:1st run of witness and change config

cd ~/byteball-witness

node start.js

#set devicename and private keys


in /root/.config/byteball-witness/conf.json changed like this

    "deviceName": "mydeviceName", 

    "admin_email": "[email protected]", 

    "from_email": "[email protected]

5:2nd run and finish

cd ~/byteball-witness

node start.js

Terminal log when witness is runned

root@510d719f5ed7:~/byteball-witness# node start.js

finished witness conf

merged app root conf from /root/byteball-witness/conf.js

app dir /root/byteball-witness

merged user conf from /root/.config/byteball-witness/conf.json

app dir /root/byteball-witness

path=/root/.config/byteball-witness/

createDatabaseIfNecessary byteball.sqlite

takeConnectionFromPool will wait for ready

will archive if exists from unit N6QadI9yg3zLxPMphfNGJcPfddW4yHPkoGMbbGZsWa0=

takeConnectionFromPool will wait for ready

app dir /root/byteball-witness

takeConnectionFromPool will wait for ready

takeConnectionFromPool will wait for ready

takeConnectionFromPool will wait for ready

stat null

db is now ready

opening new db connection

db is now ready

db is now ready

db is now ready

db is now ready

opened db

db version 12, software version 12

-----------------------

remote access allowed from devices: xxxxxxxxxxxxxxxxx

payouts allowed to address: WHERE THE MONEY CAN BE SENT TO

-----------------------

starting network

WSS running at port 6611

setDevicePrivateKey

same device addresses: 07BWEERYOA4JXM7W42ZROX3PGUVUPVLGF

objMyTempDeviceKey not set yet, can't log in

have catchup leftovers from the previous run

findNextPeer after [none] found no appropriate peer, will wait for a new connection

outbound peers: 

will connect to wss://byteball.org/bb

connectToPeer done

outbound peers: 

will connect to wss://east.byteball.us/bb

connectToPeer done

outbound peers: 

will connect to wss://west.byteball.us/bb

connectToPeer done

outbound peers: 

will connect to wss://byteroll.com/bb

connectToPeer done

outbound peers: 

will connect to wss://byteball.fr/bb

connectToPeer done

long query took 1213ms:

SELECT DISTINCT depends_on_unit 

FROM dependencies 

LEFT JOIN unhandled_joints ON depends_on_unit=unhandled_joints.unit 

LEFT JOIN units ON depends_on_unit=units.unit 

WHERE unhandled_joints.unit IS NULL AND units.unit IS NULL AND dependencies.creation_date < datetime('now', '-8 SECOND'), 

load avg: 0.00390625, 0.001953125, 0.05322265625

lost units [ 'UPChF0n4IdovZs1+mWvZ0GDbl3Lk7IyNoprdfNvyaFk=',

  'mMbxFo8OVMBzSAPbcxe9RR1+++W17s7+JdVx+vctFhg=',

  'mvMVYzoNHP9MPopchna5CGRtTIFCBsc+Tc66OgC9NsM=',

  'u/IuOASHYM3tKmiTn5fjIuSwu7kxItybYG7UepSCWW8=' ]

my_device_hub not set yet, can't log in

setDeviceName yamaoka_witness

setDeviceHub byteball.org/bb

logging in to hub byteball.org/bb

outbound peers: 

already connecting to wss://byteball.org/bb

====== my device address: 07BWEERYOA4JXM7W42ZROX3PGUVUPVLGF

====== my pairing code: xxxxxxxxxxxxxxxxxxxxxxxxxx

====== my pairing code: xxxxxxxxxxxxxxxxxxxxxxxxxx

connected to wss://west.byteball.us/bb

outbound peers: 

connected to wss://west.byteball.us/bb, host west.byteball.us

SENDING ["justsaying",{"subject":"version","body":{"protocol_version":"1.0","alt":"1","library":"byteballcore","library_version":"0.2.60","program":"byteball-witness","program_version":"0.1.7"}}] to wss://west.byteball.us/bb

logging in to hub byteball.org/bb

outbound peers: wss://west.byteball.us/bb

already connecting to wss://byteball.org/bb

SENDING ["request",{"command":"subscribe","params":{"subscription_id":"J7CKEqlFOyebuocPxo8ijQYhBycjWqayMJ2m6fu2","last_mci":460240},"tag":"iS2kh3f8/UV+eGKf8wCQCGYrZ09nzYM3yzOkzmFACvI="}] to wss://west.byteball.us/bb

connected to wss://east.byteball.us/bb

outbound peers: wss://west.byteball.us/bb

connected to wss://east.byteball.us/bb, host east.byteball.us

SENDING ["justsaying",{"subject":"version","body":{"protocol_version":"1.0","alt":"1","library":"byteballcore","library_version":"0.2.60","program":"byteball-witness","program_version":"0.1.7"}}] to wss://east.byteball.us/bb

logging in to hub byteball.org/bb

outbound peers: wss://west.byteball.us/bb, wss://east.byteball.us/bb

already connecting to wss://byteball.org/bb

SENDING ["request",{"command":"subscribe","params":{"subscription_id":"nlGUJuyJehdlaJhHWST8zJ00AsxnePkC69X/b71G","last_mci":460240},"tag":"CdX81yDbAoVPowwckbNQbhEek69gbfUhDIAR/6EMcqc="}] to wss://east.byteball.us/bb

connected to wss://byteball.fr/bb

outbound peers: wss://west.byteball.us/bb, wss://east.byteball.us/bb

connected to wss://byteball.fr/bb, host byteball.fr

SENDING ["justsaying",{"subject":"version","body":{"protocol_version":"1.0","alt":"1","library":"byteballcore","library_version":"0.2.60","program":"byteball-witness","program_version":"0.1.7"}}] to wss://byteball.fr/bb

logging in to hub byteball.org/bb

outbound peers: wss://west.byteball.us/bb, wss://east.byteball.us/bb, wss://byteball.fr/bb

already connecting to wss://byteball.org/bb

SENDING ["request",{"command":"subscribe","params":{"subscription_id":"mO0o10dXZXAr7rny/E2/pTygQiYvuuQaQngKPnNe","last_mci":460240},"tag":"P108rHiqdRnIduu0l6G7VZQ003YR7x+YPvLtTEezcmQ="}] to wss://byteball.fr/bb

---------------

From this point, output will be redirected to /root/.config/byteball-witness/log.txt

To release the terminal, type Ctrl-Z, then 'bg'