Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.11.2 fgt-workspace apihub fails frequently with "Parent process did not answer. Shutting down..." #126

Closed
joaoluis-pdm opened this issue Nov 15, 2022 · 5 comments
Labels
bug Something isn't working

Comments

@joaoluis-pdm
Copy link
Contributor

joaoluis-pdm commented Nov 15, 2022

One example

...
2022-11-15T12:24:11.386028539Z INFO     0x00 1668515051385 bricking    apihub/bric Looking for domain traceability
2022-11-15T12:24:11.387242142Z INFO     0x00 1668515051387 Logger      apihub/logg 172.16.63.2:8080 - [2022-11-15T12:24:11.385Z] PUT:/bricking/traceability/put-brick 201 1.227ms
2022-11-15T12:24:11.398700214Z INFO     0x00 1668515051398 bricking    apihub/bric Looking for domain traceability
2022-11-15T12:24:11.402626050Z INFO     0x00 1668515051402 Logger      apihub/logg 172.16.63.2:8080 - [2022-11-15T12:24:11.398Z] PUT:/bricking/traceability/put-brick 201 4.075ms
2022-11-15T12:24:11.411464608Z INFO     0x00 1668515051411 Logger      apihub/logg 172.16.63.2:8080 - [2022-11-15T12:24:11.410Z] GET:/anchor/traceability/get-last-version/2eg3XSYLuY9m6WqTiuqrGAy3mMB9s3Bko4sAy714qgJfhioh53i2XbZDD1967hkt8MNrD4tAZ4FmuyKSmrCR5Ar2QzLXakVhTUgoaCTEGY9j7rh
K1uytizpoFepZ5Ef1ABLK8axzzTUcb7x3GtH2cy92fTD 200 1.273ms
2022-11-15T12:24:11.773361481Z INFO     0x00 1668515051773 Logger      apihub/logg 172.16.63.2:8080 - [2022-11-15T12:24:11.417Z] GET:/anchor/traceability/get-all-versions/2eg3XSYLuY9m6WqTiuqrGAy3mMB9s3Bko4sAy714qgJfhioh53i2XbZDD1967hkt8MNrD4tAZ4FmuyKSmrCR5Ar2QzLXakVhTUgoaCTEGY9j7rh
K1uytizpoFepZ5Ef1ABLK8axzzTUcb7x3GtH2cy92fTD 200 355.719ms
2022-11-15T12:24:11.914421584Z INFO     0x00 1668515051914 Logger      apihub/logg 172.16.63.2:8080 - [2022-11-15T12:24:11.849Z] PUT:/anchor/traceability/append-to-anchor/2eg3XSYLuY9m6WqTiuqrGAy3mMB9s3Bko4sAy714qgJfhioh53i2XbZDD1967hkt8MNrD4tAZ4FmuyKSmrCR5Ar2QzLXakVhTUgoaCTEGY9j7rh
K1uytizpoFepZ5Ef1ABLK8axzzTUcb7x3GtH2cy92fTD/4qnrBhooj78L2psbyjJ44LqFA4DA5yU6nf5Xvm5vqGk8LRkCA7CfwLzbCitgHLsYfMQUgtcuGmeSz1B8sjP57V9b7mKYiSU5zLJR6rWHAPLRG5dZQMQ5PByE98aS5eAAPq2kSNpsGBS7Ck34npF9So1cAenb4zpMk68stx6s3MDngHdpGfbVhJ9uDhAuStDuQUGen6N97qkewF5NsyrTxgFfscpT8rmwYT9zpgRyxB 20
1 65.03ms
2022-11-15T12:24:11.923967598Z INFO     0x00 1668515051923 bricking    apihub/bric Looking for domain traceability
2022-11-15T12:24:11.925086271Z INFO     0x00 1668515051924 Logger      apihub/logg 172.16.63.2:8080 - [2022-11-15T12:24:11.923Z] PUT:/bricking/traceability/put-brick 201 1.157ms
2022-11-15T12:24:11.936654552Z INFO     0x00 1668515051936 bricking    apihub/bric Looking for domain traceability
2022-11-15T12:24:11.939244737Z INFO     0x00 1668515051939 Logger      apihub/logg 172.16.63.2:8080 - [2022-11-15T12:24:11.936Z] PUT:/bricking/traceability/put-brick 201 2.665ms
2022-11-15T12:24:11.948534122Z INFO     0x00 1668515051948 Logger      apihub/logg 172.16.63.2:8080 - [2022-11-15T12:24:11.947Z] GET:/anchor/traceability/get-last-version/2eg3XSYLuY9m6WqTiuqrGAy3mMB9s3Bko4sAy714qgJfhioh53i2XbZDD1967hkt8MNrD4tAZ4FmuyKSmrCR5Ar2QzLXakVhTUgoaCTEGY9j7rh
K1uytizpoFepZ5Ef1ABLK8axzzTUcb7x3GtH2cy92fTD 200 1.201ms
2022-11-15T12:24:12.309914118Z INFO     0x00 1668515052309 Logger      apihub/logg 172.16.63.2:8080 - [2022-11-15T12:24:11.953Z] GET:/anchor/traceability/get-all-versions/2eg3XSYLuY9m6WqTiuqrGAy3mMB9s3Bko4sAy714qgJfhioh53i2XbZDD1967hkt8MNrD4tAZ4FmuyKSmrCR5Ar2QzLXakVhTUgoaCTEGY9j7rh
K1uytizpoFepZ5Ef1ABLK8axzzTUcb7x3GtH2cy92fTD 200 355.923ms
2022-11-15T12:24:12.447438202Z INFO     0x00 1668515052447 Logger      apihub/logg 172.16.63.2:8080 - [2022-11-15T12:24:12.381Z] PUT:/anchor/traceability/append-to-anchor/2eg3XSYLuY9m6WqTiuqrGAy3mMB9s3Bko4sAy714qgJfhioh53i2XbZDD1967hkt8MNrD4tAZ4FmuyKSmrCR5Ar2QzLXakVhTUgoaCTEGY9j7rh
K1uytizpoFepZ5Ef1ABLK8axzzTUcb7x3GtH2cy92fTD/4qnrBhooj78L2psbyjJ44LqFA4DA5yiQcszJ5XjqNNa8HMapdDDyfp6eRwCzpRMv51SaQkR24zApwFhA5332FEK8wruCMhBKYyTzQdp9EKDGhXLWay6rmZRjKFwo58L3TPMP41RixakqCxfv6cddZpPffcfXah5SUWmxqr76ZxNtf6eywjjeZvMLYkfKXY827huhkSzwDSxgqcWA4S7ZtDnVaJiBqep28BNk8kqERV 20
1 65.465ms
2022-11-15T12:24:12.453926424Z INFO     0x00 1668515052453 bricking    apihub/bric Looking for domain traceability
2022-11-15T12:24:12.455168456Z INFO     0x00 1668515052455 Logger      apihub/logg 172.16.63.2:8080 - [2022-11-15T12:24:12.453Z] PUT:/bricking/traceability/put-brick 201 1.261ms
2022-11-15T12:24:12.467674902Z INFO     0x00 1668515052467 bricking    apihub/bric Looking for domain traceability
2022-11-15T12:24:12.470500835Z INFO     0x00 1668515052470 Logger      apihub/logg 172.16.63.2:8080 - [2022-11-15T12:24:12.467Z] PUT:/bricking/traceability/put-brick 201 2.916ms
2022-11-15T12:24:12.479298193Z INFO     0x00 1668515052479 Logger      apihub/logg 172.16.63.2:8080 - [2022-11-15T12:24:12.477Z] GET:/anchor/traceability/get-last-version/2eg3XSYLuY9m6WqTiuqrGAy3mMB9s3Bko4sAy714qgJfhioh53i2XbZDD1967hkt8MNrD4tAZ4FmuyKSmrCR5Ar2QzLXakVhTUgoaCTEGY9j7rh
K1uytizpoFepZ5Ef1ABLK8axzzTUcb7x3GtH2cy92fTD 200 1.356ms
2022-11-15T12:24:12.844855704Z INFO     0x00 1668515052841 Logger      apihub/logg 172.16.63.2:8080 - [2022-11-15T12:24:12.484Z] GET:/anchor/traceability/get-all-versions/2eg3XSYLuY9m6WqTiuqrGAy3mMB9s3Bko4sAy714qgJfhioh53i2XbZDD1967hkt8MNrD4tAZ4FmuyKSmrCR5Ar2QzLXakVhTUgoaCTEGY9j7rh
K1uytizpoFepZ5Ef1ABLK8axzzTUcb7x3GtH2cy92fTD 200 356.752ms
2022-11-15T12:24:12.896804186Z INFO     0x00 1668515052896 Logger      apihub/logg 127.0.0.1:8080 - [2022-11-15T12:24:12.895Z] GET:/ 200 0.836ms
2022-11-15T12:24:12.983198294Z INFO     0x00 1668515052982 Logger      apihub/logg 172.16.63.2:8080 - [2022-11-15T12:24:12.918Z] PUT:/anchor/traceability/append-to-anchor/2eg3XSYLuY9m6WqTiuqrGAy3mMB9s3Bko4sAy714qgJfhioh53i2XbZDD1967hkt8MNrD4tAZ4FmuyKSmrCR5Ar2QzLXakVhTUgoaCTEGY9j7rh
K1uytizpoFepZ5Ef1ABLK8axzzTUcb7x3GtH2cy92fTD/4qnrBhooj78L2psbyjJ44LqFA4DA5xDe38u9hnmzPXwXpnLRsZhVKHjk5fjPfQsxrYKFhxJXn2PuingPxG4Mf3VjtAvsvJLuuGDmmxETguEg2W8YTWvpkKgnm5KL27PoGtCtFuRG83aMPP9CyA5sTJMXcbNyJcUNKZRgonQssJZoqpivfErNoBkFvsbxTCm9xRtRpkLgx1LrX5hCns78k6aetR43d7JsfTDNHeebqq 20
1 64.36ms
2022-11-15T12:24:12.989197128Z INFO     0x00 1668515052989 bricking    apihub/bric Looking for domain traceability
2022-11-15T12:24:12.990704599Z INFO     0x00 1668515052990 Logger      apihub/logg 172.16.63.2:8080 - [2022-11-15T12:24:12.989Z] PUT:/bricking/traceability/put-brick 201 1.236ms
2022-11-15T12:24:13.002363940Z INFO     0x00 1668515053002 bricking    apihub/bric Looking for domain traceability
2022-11-15T12:24:13.004667256Z INFO     0x00 1668515053004 Logger      apihub/logg 172.16.63.2:8080 - [2022-11-15T12:24:13.002Z] PUT:/bricking/traceability/put-brick 201 2.394ms
2022-11-15T12:24:13.013811652Z INFO     0x00 1668515053013 Logger      apihub/logg 172.16.63.2:8080 - [2022-11-15T12:24:13.012Z] GET:/anchor/traceability/get-last-version/2eg3XSYLuY9m6WqTiuqrGAy3mMB9s3Bko4sAy714qgJfhioh53i2XbZDD1967hkt8MNrD4tAZ4FmuyKSmrCR5Ar2QzLXakVhTUgoaCTEGY9j7rh
K1uytizpoFepZ5Ef1ABLK8axzzTUcb7x3GtH2cy92fTD 200 1.223ms
2022-11-15T12:24:13.386184613Z INFO     0x00 1668515053385 Logger      apihub/logg 172.16.63.2:8080 - [2022-11-15T12:24:13.019Z] GET:/anchor/traceability/get-all-versions/2eg3XSYLuY9m6WqTiuqrGAy3mMB9s3Bko4sAy714qgJfhioh53i2XbZDD1967hkt8MNrD4tAZ4FmuyKSmrCR5Ar2QzLXakVhTUgoaCTEGY9j7rh
K1uytizpoFepZ5Ef1ABLK8axzzTUcb7x3GtH2cy92fTD 200 365.895ms
2022-11-15T12:24:13.388708928Z Parent process did not answer. Shutting down... [
2022-11-15T12:24:13.388725348Z   '/usr/local/bin/node',
2022-11-15T12:24:13.388730808Z   '/fgt-workspace/privatesky/psknode/bin/scripts/pskApiHubLauncher.js'
2022-11-15T12:24:13.388735598Z ] false
2022-11-15T12:24:13.408691689Z ESC[33mExit caught on spawned file /fgt-workspace/privatesky/psknode/bin/scripts/pskApiHubLauncher.js ESC[0m
2022-11-15T12:24:13.409263646Z Process will restart in 100 ms ...
2022-11-15T12:24:13.511663989Z [ServiceLauncher] Starting a new process using </fgt-workspace/privatesky/psknode/bin/scripts/pskApiHubLauncher.js>
2022-11-15T12:24:13.514241213Z [ServiceLauncher] Process with PID=[6009] was spawned.

While apihub goes down, other "clients" will fail with "Bad Gateway".

Does seem to happen on TST (with simulated blockchain), but not on DEV (with hlf anchoring for fgt-workspace).

@joaoluis-pdm
Copy link
Contributor Author

@asaccool created a psk-release 2f1d49f168cdad784008a610b4c48cea311b755c with ping-pong disabled.
Using it to test v0.11.3 ASAP.

@joaoluis-pdm
Copy link
Contributor Author

v0.11.3 does not seem to work. Participants do not start:

...
wallet Loaded
App dashboard load with credentials {
  "name": {
    "secret": "PDM the Wholesaler",
    "public": true
  },
  "id": {
    "secret": "WHS000002",
    "public": true
  },
  "email": {
    "secret": "[email protected]",
    "public": true
  },
  "address": {
    "public": true,
    "secret": "Lisbon, Portugal"
  },
  "pass": {
    "secret": "********"
  },
  "passrepeat": {
    "secret": "********"
  }
}.
SSI: [object Object]
Could not initialize base manager Error: Could not get Identity(Path </participant/id/info> not found.)
/fgt-workspace/fgt-api/utils.js:130
                    throw new Error(err);
                          ^

Error: Error: Could not get Identity(Path </participant/id/info> not found.)
    at /fgt-workspace/fgt-api/utils.js:130:27
    at /fgt-workspace/fgt-dsu-wizard/managers/ParticipantManager.js:29:24
    at /fgt-workspace/pdm-dsu-toolkit/managers/BaseManager.js:94:32
    at ParticipantManager._err (/fgt-workspace/pdm-dsu-toolkit/services/utils.js:185:38)
    at /fgt-workspace/pdm-dsu-toolkit/managers/BaseManager.js:248:28
    at ParticipantManager._err (/fgt-workspace/pdm-dsu-toolkit/services/utils.js:185:38)
    at /fgt-workspace/pdm-dsu-toolkit/managers/BaseManager.js:240:24
    at ParticipantManager._err (/fgt-workspace/pdm-dsu-toolkit/services/utils.js:185:38)
    at /fgt-workspace/pdm-dsu-toolkit/managers/BaseManager.js:401:29
    at /fgt-workspace/bin/environment/utils.js:102:23
    at newFn (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:44557:20)
    at _readFile (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:774:49)
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:1360:17
    at waitIfDSUIsRefreshing (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:446:20)
    at Archive.readFile (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:1349:9)
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:1368:36
    at newFn (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:44557:20)
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:2122:32
    at Object.Manifest.manifestHandler.getArchiveForPath (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:7681:9)
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:2115:25
    at getManifest (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:1280:20)
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:2105:13
    at waitIfDSUIsRefreshing (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:446:20)
    at Archive.getArchiveForPath (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:2102:9)
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:1362:22
    at waitIfDSUIsRefreshing (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:446:20)
    at Archive.readFile (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:1349:9)
    at Archive.getObject (/fgt-workspace/bin/environment/utils.js:100:13)
    at ParticipantManager.getIdentity (/fgt-workspace/pdm-dsu-toolkit/managers/BaseManager.js:399:25)
    at getIdentity (/fgt-workspace/pdm-dsu-toolkit/managers/BaseManager.js:239:18)
    at /fgt-workspace/pdm-dsu-toolkit/managers/BaseManager.js:247:19
    at /fgt-workspace/pdm-dsu-toolkit/managers/BaseManager.js:234:17
    at Archive.dsu.enableDirectAccess (/fgt-workspace/bin/environment/utils.js:89:44)
    at enableDirectAccess (/fgt-workspace/pdm-dsu-toolkit/managers/BaseManager.js:232:29)
    at ParticipantManager._initialize (/fgt-workspace/pdm-dsu-toolkit/managers/BaseManager.js:245:20)
    at initializer (/fgt-workspace/pdm-dsu-toolkit/managers/BaseManager.js:90:18)
    at new BaseManager (/fgt-workspace/pdm-dsu-toolkit/managers/BaseManager.js:103:20)
    at new ParticipantManager (/fgt-workspace/fgt-dsu-wizard/managers/ParticipantManager.js:27:9)
    at getParticipantManager (/fgt-workspace/fgt-dsu-wizard/managers/ParticipantManager.js:210:30)
    at init (/fgt-workspace/fgt-api/utils.js:128:13)
    at /fgt-workspace/fgt-api/utils.js:163:17
    at /fgt-workspace/fgt-api/utils.js:116:9
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:29957:24
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:597:24
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:15971:17
    at executeForSingleEntry (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:31660:13)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

No previous errors noticed (so far...)

@joaoluis-pdm joaoluis-pdm reopened this Nov 15, 2022
@joaoluis-pdm
Copy link
Contributor Author

Weird stuff... not even the basic OpenDSU APIs work well with this psk-release.
For example, test

https://github.com/PharmaLedger-IMI/fgt-workspace/blob/master/tests/privateksy/createOneDSU.js

fails on deriving an sRead SSI from the seedSSI:

bash-5.1$ node createOneDSU.js 
Logger not available, using console
Redefining require for node
seedSSI identifier: ssi:seed:traceability:WHS000001-WHS000001-2022-04-01T13:44:02.656Z:v0:v0
Data written succesfully! :) 
KeySSI identifier:  ssi:seed:traceability:exPvR5MEIOr4j6aN6HjNA9OXk+CcfQiUSn5d3ox4dXY=::v0
/fgt-workspace/privatesky/psknode/bundles/openDSU.js:15323
        callback(undefined, sReadSSI);
        ^

TypeError: callback is not a function
    at SeedSSI.self.derive (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:15323:9)
    at /fgt-workspace/tests/privateksy/createOneDSU.js:58:53
    at ArchiveConfigurator.getKeySSI (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:2569:20)
    at Archive.getKeySSIAsObject (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:633:29)
    at /fgt-workspace/tests/privateksy/createOneDSU.js:52:29
    at newFn (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:44557:20)
    at endAnchoring (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:3725:24)
    at /fgt-workspace/privatesky/psknode/bundles/openDSU.js:4318:29
    at LatestVersionStrategy.afterBrickMapAnchoring (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:6285:9)
    at updateAnchorCallback (/fgt-workspace/privatesky/psknode/bundles/openDSU.js:4313:34)
...

joaoluis-pdm added a commit that referenced this issue Nov 15, 2022
@joaoluis-pdm
Copy link
Contributor Author

joaoluis-pdm commented Nov 15, 2022

In the previous commit 035d6d8 , a patch file

https://github.com/PharmaLedger-IMI/fgt-workspace/blob/035d6d8478a6730f96a47a24a3cc0ebe26b74f3f/blockchain-patch/apply/privatesky/psknode/core/utils/pingpongFork.js

is applied (only in the fgt-workspace) to the apihub code.

psk-release is set back at be8027202d04032bed93fb8de74253d61ec6a3b9

@joaoluis-pdm joaoluis-pdm changed the title apihub fails frequently with "Parent process did not answer. Shutting down..." fgt-workspace apihub fails frequently with "Parent process did not answer. Shutting down..." Nov 15, 2022
@joaoluis-pdm
Copy link
Contributor Author

After running for around 8 hours (performing shippings and sales, which usually involves concurrent DSU updates, but on distinct DSUs), the apihub restart problem did not appear.I guess that the pingpong patch above is good enough for FGT Stage 5 testing.

Thank you @asaccool

(I don't really understand well why we have not bumped into this issue before, but at least for now, it seems to work, on v0.11.4).

@joaoluis-pdm joaoluis-pdm changed the title fgt-workspace apihub fails frequently with "Parent process did not answer. Shutting down..." v0.11.2 fgt-workspace apihub fails frequently with "Parent process did not answer. Shutting down..." Nov 16, 2022
@joaoluis-pdm joaoluis-pdm added the bug Something isn't working label Nov 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant