3.3.2. Check the node log for mijin Catapult(v.2).

mijin Catapult(v.2) This is the procedure up to checking the logs of a node.
creation-day:

Aug. 1, 2022

update date:

September 15, 2022

3.3.2.1. target

  • Node blocking is not progressing.

  • There is an error and I can’t figure out the cause.

3.3.2.2. Step.1

Remote login to the node.
If you want to log in to AWS MarketPlace’s mijin Catapult(v.2), you can use mijin Catapult(v.2) EC2 instance login how to.

3.3.2.3. Step.2

Switch to the ‘catapult’ user running mijin.

$ sudo su - catapult
catapult@api1:~$

3.3.2.4. Step.3

Go to the directory where the mijin startup files are located.
Note that the directories are different for API and PEER nodes.

Node

Directory

API/Dual

mijin-catapult-package/package/api/catapult/

PEER

mijin-catapult-package/package/peer/catapult/

For API nodes, move as follows

catapult@api1:~$ cd mijin-catapult-package/package/api/catapult/
catapult@api1:~/mijin-catapult-package/package/api/catapult$

3.3.2.5. Step.4

Mijin launches multiple containers by docker. Check multiple containers.

3.3.2.5.1. For API nodes

Four containers are activated.
Make sure that all States are Up.
catapult@api1:~/mijin-catapult-package/package/api/catapult$ docker-compose ps
          Name                         Command               State           Ports
--------------------------------------------------------------------------------------------
catapult_api-node-broker_1   bash -c /bin/bash /scripts ...   Up
catapult_api-node_1          bash -c perl /scripts/wait ...   Up      0.0.0.0:7900->7900/tcp
catapult_db_1                docker-entrypoint.sh bash  ...   Up      27017/tcp
catapult_rest-gateway_1      docker-entrypoint.sh ash - ...   Up      0.0.0.0:3000->3000/tcp

3.3.2.5.2. For PEER node

One container is activated.
Make sure that all States are Up.
catapult@peer1:~/mijin-catapult-package/package/peer/catapult$ docker-compose ps
        Name                      Command               State           Ports
--------------------------------------------------------------------------------------
catapult_peer-node_1   bash -c /bin/bash /scripts ...   Up      0.0.0.0:7900->7900/tcp

3.3.2.6. Step.5

The logs can be checked with the following command using docker-compose.

docker-compose logs
To learn more about docker-compose, please visit the following sites

Below is an example of how to check.

3.3.2.6.1. Check the last XX line logs for each container

docker-compose logs --tail=10
catapult@api1:~/mijin-catapult-package/package/api/catapult$ docker-compose logs --tail=10
Attaching to catapult_rest-gateway_1, catapult_api-node_1, catapult_api-node-broker_1, catapult_db_1
api-node-broker_1  | 2021-06-14 00:41:32.447154 0x00007f59efb66700: <debug> (subscribers::BrokerMessageReaders.h@90) preparing to process 1 messagesfrom /data/spool/block_change
api-node-broker_1  | 2021-06-14 00:41:32.447137 0x00007f59ef365700: <debug> (subscribers::BrokerMessageReaders.h@90) preparing to process 2 messagesfrom /data/spool/state_change
api-node-broker_1  | 2021-06-14 00:41:50.955992 0x00007f59efb66700: <debug> (subscribers::BrokerMessageReaders.h@90) preparing to process 1 messagesfrom /data/spool/block_change
api-node-broker_1  | 2021-06-14 00:41:50.955975 0x00007f59ef365700: <debug> (subscribers::BrokerMessageReaders.h@90) preparing to process 2 messagesfrom /data/spool/state_change
api-node-broker_1  | 2021-06-14 00:42:05.963816 0x00007f59efb66700: <debug> (subscribers::BrokerMessageReaders.h@90) preparing to process 2 messagesfrom /data/spool/state_change
api-node-broker_1  | 2021-06-14 00:42:05.966239 0x00007f59ef365700: <debug> (subscribers::BrokerMessageReaders.h@90) preparing to process 1 messagesfrom /data/spool/block_change
api-node-broker_1  | 2021-06-14 00:42:23.972546 0x00007f59efb66700: <debug> (subscribers::BrokerMessageReaders.h@90) preparing to process 2 messagesfrom /data/spool/state_change
api-node-broker_1  | 2021-06-14 00:42:23.972928 0x00007f59ef365700: <debug> (subscribers::BrokerMessageReaders.h@90) preparing to process 1 messagesfrom /data/spool/block_change
api-node-broker_1  | 2021-06-14 00:42:41.982065 0x00007f59ef365700: <debug> (subscribers::BrokerMessageReaders.h@90) preparing to process 1 messagesfrom /data/spool/block_change
api-node-broker_1  | 2021-06-14 00:42:41.982048 0x00007f59efb66700: <debug> (subscribers::BrokerMessageReaders.h@90) preparing to process 2 messagesfrom /data/spool/state_change
api-node_1         | 2021-06-14 00:42:41.523496 0x00007f1bda429700: <debug> (chain::CompareChains.cpp@119) comparing chain scores: 7676859692801638166 (local) vs 7676974281840495032 (remote)
api-node_1         | 2021-06-14 00:42:41.523569 0x00007f1bda429700: <debug> (chain::CompareChains.cpp@145) comparing hashes with local height 67006,starting height 66976, max hashes 1440
api-node_1         | 2021-06-14 00:42:41.529042 0x00007f1bdac2a700: <debug> (chain::ChainSynchronizer.cpp@309) pulling blocks from remote with common height 67006 (fork depth = 0) from DEC1EF1767E76BC31DF2FDADC75C23F6FDA6ECCB22554E4F4C790F81F869F797 @ 10.0.3.199
api-node_1         | 2021-06-14 00:42:41.618591 0x00007f1bdac2a700: <info> (chain::ChainSynchronizer.cpp@217) peer returned 1 blocks (heights 67007 - 67007)
api-node_1         | 2021-06-14 00:42:41.618764 0x00007f1bdac2a700: <debug> (chain::ChainSynchronizer.cpp@223) completing chain synchronization with1 blocks (fork depth = 0)
api-node_1         | 2021-06-14 00:42:41.618805 0x00007f1bdac2a700: <debug> (disruptor::Disruptor.cpp@43) disruptor queuing element 66554 (1 blocks (heights 67007 - 67007) [00000000] from Remote_Pull with size 376B)
api-node_1         | 2021-06-14 00:42:41.618960 0x00007f1bdac2a700: <info> (chain::RemoteApiForwarder.h@69) completed 'synchronizer task' (peer2.mijin.internal @ peer2.mijin.internal:7900) with result Success
api-node_1         | 2021-06-14 00:42:41.676588 0x00007f1bb0ff9700: <debug> (cache::SupplementalDataStorage.cpp@32) wrote last recalculation height 67000 last finalized height 66976 dynamic fee multiplier 0 total transactions 34 (score = [0, 7676974281840495032], height = 67007)
api-node_1         | 2021-06-14 00:42:41.714555 0x00007f1bb07f8700: <info> (disruptor::ConsumerDispatcher.cpp@44) completing processing of element 66554 (1 blocks (heights 67007 - 67007) [833B95DA] from Remote_Pull with size 376B), last consumer is 0 elements behind
api-node_1         | 2021-06-14 00:42:50.247964 0x00007f1bdac2a700: <debug> (chain::RoundContext.cpp@89) not completable - Erv == g(Vrv) and descendant can reach g(Crv) (total weight 15000000, cumulative precommit weight 3000000)
db_1               | 2021-06-02T09:37:24.913+0000 I  NETWORK  [listener] connection accepted from 172.20.0.9:47924 #16 (15 connections now open)
db_1               | 2021-06-02T09:37:24.913+0000 I  NETWORK  [conn16] received client metadata from 172.20.0.9:47924 conn16: { driver: { name: "nodejs", version: "3.6.0" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "5.4.0-1029-aws" }, platform: "'Node.js v12.18.1, LE (legacy)" }
db_1               | 2021-06-02T09:39:05.968+0000 I  NETWORK  [listener] connection accepted from 172.20.0.9:47942 #17 (16 connections now open)
db_1               | 2021-06-02T09:39:05.969+0000 I  NETWORK  [conn17] received client metadata from 172.20.0.9:47942 conn17: { driver: { name: "nodejs", version: "3.6.0" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "5.4.0-1029-aws" }, platform: "'Node.js v12.18.1, LE (legacy)" }
db_1               | 2021-06-02T09:42:43.866+0000 I  NETWORK  [listener] connection accepted from 172.20.0.9:47948 #18 (17 connections now open)
db_1               | 2021-06-02T09:42:43.869+0000 I  NETWORK  [conn18] received client metadata from 172.20.0.9:47948 conn18: { driver: { name: "nodejs", version: "3.6.0" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "5.4.0-1029-aws" }, platform: "'Node.js v12.18.1, LE (legacy)" }
db_1               | 2021-06-08T05:37:00.594+0000 I  NETWORK  [listener] connection accepted from 172.20.0.9:58874 #19 (18 connections now open)
db_1               | 2021-06-08T05:37:00.596+0000 I  NETWORK  [conn19] received client metadata from 172.20.0.9:58874 conn19: { driver: { name: "nodejs", version: "3.6.0" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "5.4.0-1029-aws" }, platform: "'Node.js v12.18.1, LE (legacy)" }
db_1               | 2021-06-12T02:52:21.305+0000 I  NETWORK  [listener] connection accepted from 172.20.0.9:37814 #20 (19 connections now open)
db_1               | 2021-06-12T02:52:21.310+0000 I  NETWORK  [conn20] received client metadata from 172.20.0.9:37814 conn20: { driver: { name: "nodejs", version: "3.6.0" }, os: { type: "Linux", name: "linux", architecture: "x64", version: "5.4.0-1029-aws" }, platform: "'Node.js v12.18.1, LE (legacy)" }
rest-gateway_1     | > node _build/index.js "/userconfig/rest.json"
rest-gateway_1     |
rest-gateway_1     | [winston] Attempt to write logs with no transports {"message":"loading config from /userconfig/rest.json","level":"info"}
rest-gateway_1     | info: loading config from /userconfig/rest.json
rest-gateway_1     | verbose: finished loading rest server config {"network":{"name":"mijin","description":"mijin network"},"port":3000,"crossDomain":{"allowedHosts":["*"],"allowedMethods":["GET","POST","PUT","OPTIONS"]},"extensions":["accountLink","aggregate","lockHash","lockSecret","mosaic","metadata","multisig","namespace","receipts","restrictions","transfer"],"db":{"url":"mongodb://db:27017/","name":"catapult","pageSizeMin":10,"pageSizeMax":100,"maxConnectionAttempts":7,"baseRetryDelay":750},"apiNode":{"host":"api-node","port":7900,"tlsClientCertificatePath":"/userconfig/resources/cert/node.crt.pem","tlsClientKeyPath":"/userconfig/resources/cert/node.key.pem","tlsCaCertificatePath":"/userconfig/resources/cert/ca.cert.pem","timeout":1000,"networkPropertyFilePath":"/api-node-config/config-network.properties","nodePropertyFilePath":"/api-node-config/config-node.properties"},"websocket":{"mq":{"host":"api-node-broker","port":7902,"monitorInterval":500,"connectTimeout":10000,"monitorLoggingThrottle":60000},"allowOptionalAddress":true},"throttling":{"burst":100,"rate":30},"logging":{"console":{"formats":["colorize","simple"],"level":"verbose","handleExceptions":true},"file":{"formats":["prettyPrint"],"level":"verbose","handleExceptions":true,"filename":"catapult-rest.log","maxsize":20971520,"maxFiles":100}},"numBlocksTransactionFeeStats":300,"timestamp":"2021-06-02T09:27:19.336Z"}
rest-gateway_1     | info: connecting to mongodb://db:27017/ (database:catapult) {"timestamp":"2021-06-02T09:27:19.407Z"}
rest-gateway_1     | (node:24) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
rest-gateway_1     | verbose: connected to mongo at mongodb://db:27017/catapult {"timestamp":"2021-06-02T09:27:19.443Z"}
rest-gateway_1     | info: registering routes {"timestamp":"2021-06-02T09:27:19.445Z"}
rest-gateway_1     | info: listening on port 3000 {"timestamp":"2021-06-02T09:27:19.462Z"}

3.3.2.6.2. Checks for each specified container

By specifying the hostname of a container, the log output is focused on a specific container.
Host names are fixed.
  • api-node

  • peer-node

  • api-node-broker

  • db

  • rest-gateway

docker-compose logs [コンテナ名 Container name]
catapult@api1:~/mijin-catapult-package/package/api/catapult$ docker-compose logs rest-gateway
Attaching to catapult_rest-gateway_1
rest-gateway_1     |
rest-gateway_1     | > catapult-api-rest@0.0.0 start /app/catapult-rest/rest
rest-gateway_1     | > node _build/index.js "/userconfig/rest.json"
rest-gateway_1     |
rest-gateway_1     | [winston] Attempt to write logs with no transports {"message":"loading config from /userconfig/rest.json","level":"info"}
rest-gateway_1     | info: loading config from /userconfig/rest.json
rest-gateway_1     | verbose: finished loading rest server config {"network":{"name":"mijin","description":"mijin network"},"port":3000,"crossDomain":{"allowedHosts":["*"],"allowedMethods":["GET","POST","PUT","OPTIONS"]},"extensions":["accountLink","aggregate","lockHash","lockSecret","mosaic","metadata","multisig","namespace","receipts","restrictions","transfer"],"db":{"url":"mongodb://db:27017/","name":"catapult","pageSizeMin":10,"pageSizeMax":100,"maxConnectionAttempts":7,"baseRetryDelay":750},"apiNode":{"host":"api-node","port":7900,"tlsClientCertificatePath":"/userconfig/resources/cert/node.crt.pem","tlsClientKeyPath":"/userconfig/resources/cert/node.key.pem","tlsCaCertificatePath":"/userconfig/resources/cert/ca.cert.pem","timeout":1000,"networkPropertyFilePath":"/api-node-config/config-network.properties","nodePropertyFilePath":"/api-node-config/config-node.properties"},"websocket":{"mq":{"host":"api-node-broker","port":7902,"monitorInterval":500,"connectTimeout":10000,"monitorLoggingThrottle":60000},"allowOptionalAddress":true},"throttling":{"burst":100,"rate":30},"logging":{"console":{"formats":["colorize","simple"],"level":"verbose","handleExceptions":true},"file":{"formats":["prettyPrint"],"level":"verbose","handleExceptions":true,"filename":"catapult-rest.log","maxsize":20971520,"maxFiles":100}},"numBlocksTransactionFeeStats":300,"timestamp":"2021-06-02T09:27:19.336Z"}
rest-gateway_1     | info: connecting to mongodb://db:27017/ (database:catapult) {"timestamp":"2021-06-02T09:27:19.407Z"}
rest-gateway_1     | (node:24) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
rest-gateway_1     | verbose: connected to mongo at mongodb://db:27017/catapult {"timestamp":"2021-06-02T09:27:19.443Z"}
rest-gateway_1     | info: registering routes {"timestamp":"2021-06-02T09:27:19.445Z"}
rest-gateway_1     | info: listening on port 3000 {"timestamp":"2021-06-02T09:27:19.462Z"}