Closed VanDavv closed 1 year ago
[2022-11-07T13:41:43.569+0100 INFO dapp_runner.log] Using log file `/home/vandavv/.local/share/dapp_runner/49AUoP_20221107_13:41:43/log`
yapapi version: 0.10.0a0
Using subnet: devnet-beta, payment driver: erc20, and network: rinkeby
Starting app: ToDo List App
[2022-11-07T13:41:43.717+0100 INFO yapapi.network] Created network: Network { id: 79b37df061354e529f1395690b0da185, ip: 192.168.0.0, mask: 255.255.255.0}
[2022-11-07T13:41:43.941+0100 INFO dapp_runner.runner] Starting app: ToDo List App, startup timeout: 0:04:00, maximum running time: None
{"db": {"0": "pending"}}
[2022-11-07T13:41:45.949+0100 INFO yapapi.summary] [Job 1] Agreement proposed to provider 'office_8_80' (0xd9a4a6ba9e1800e4f61cd88dc23f082527f4ee28)
[2022-11-07T13:41:46.254+0100 INFO yapapi.summary] [Job 1] Agreement confirmed by provider 'office_8_80'
[2022-11-07T13:41:46.571+0100 INFO yapapi.summary] Received proposals from 9 providers so far
[2022-11-07T13:41:47.107+0100 INFO yapapi.services.service_runner] <DappService-db starting on office_8_80 [ 0xd9a4a6ba9e1800e4f61cd88dc23f082527f4ee28 ] @ 192.168.0.2> commissioned
{"db": {"0": "starting"}}
[2022-11-07T13:41:49.572+0100 INFO yapapi.summary] Received proposals from 11 providers so far
{"db": {"0": [{"command": {"run": {"entry_point": "/bin/run_rqlite.sh", "args": [], "capture": {"stdout": {"stream": {}}, "stderr": {"stream": {}}}}}, "success": true, "stdout": null, "stderr": null}]}}
{"db": {"0": "running"}}
{"db": {"0": "running"}, "api": {"0": "pending"}}
[2022-11-07T13:42:01.964+0100 INFO yapapi.summary] [Job 2] Agreement proposed to provider 'golem2005' (0x7803bb53dc04b333c80931aef447dec958ac6c4e)
[2022-11-07T13:42:02.283+0100 INFO yapapi.summary] [Job 2] Agreement confirmed by provider 'golem2005'
[2022-11-07T13:42:03.165+0100 INFO yapapi.services.service_runner] <DappService-api starting on golem2005 [ 0x7803bb53dc04b333c80931aef447dec958ac6c4e ] @ 192.168.0.3> commissioned
{"db": {"0": "running"}, "api": {"0": "starting"}}
{"api": {"0": [{"command": {"run": {"entry_point": "/bin/bash", "args": ["-c", "cd /webapp && python app.py --db-address 192.168.0.2 --db-port 4001 initdb"], "capture": {"stdout": {"stream": {}}, "stderr": {"stream": {}}}}}, "success": true, "stdout": "2022-11-07 12:42:20,939 INFO sqlalchemy.engine.Engine BEGIN (implicit)\n2022-11-07 12:42:20,941 INFO sqlalchemy.engine.Engine PRAGMA main.table_info(\"to_do\")\n2022-11-07 12:42:20,943 INFO sqlalchemy.engine.Engine [raw sql] ()\n2022-11-07 12:42:21,125 INFO sqlalchemy.engine.Engine PRAGMA temp.table_info(\"to_do\")\n2022-11-07 12:42:21,125 INFO sqlalchemy.engine.Engine [raw sql] ()\n2022-11-07 12:42:21,360 INFO sqlalchemy.engine.Engine \nCREATE TABLE to_do (\n\tid INTEGER NOT NULL, \n\ttext VARCHAR(255), \n\tstatus VARCHAR(255), \n\tPRIMARY KEY (id)\n)\n\n\n2022-11-07 12:42:21,360 INFO sqlalchemy.engine.Engine [no key 0.00041s] ()\n2022-11-07 12:42:21,589 INFO sqlalchemy.engine.Engine COMMIT\n", "stderr": null}, {"command": {"run": {"entry_point": "/bin/bash", "args": ["-c", "cd /webapp && python app.py --db-address 192.168.0.2 --db-port 4001 run > /webapp/out 2> /webapp/err &"], "capture": {"stdout": {"stream": {}}, "stderr": {"stream": {}}}}}, "success": true, "stdout": null, "stderr": null}]}}
{"db": {"0": "running"}, "api": {"0": "running"}}
{"db": {"0": "running"}, "api": {"0": "running"}, "web": {"0": "pending"}}
[2022-11-07T13:42:24.985+0100 INFO yapapi.summary] [Job 3] Agreement proposed to provider 'office_8_230' (0xee8993fe1dcff6b131d3fd759c6b3ddcb82d1655)
[2022-11-07T13:42:25.338+0100 INFO yapapi.summary] [Job 3] Agreement confirmed by provider 'office_8_230'
[2022-11-07T13:42:26.190+0100 INFO yapapi.services.service_runner] <DappService-web starting on office_8_230 [ 0xee8993fe1dcff6b131d3fd759c6b3ddcb82d1655 ] @ 192.168.0.4> commissioned
{"db": {"0": "running"}, "api": {"0": "running"}, "web": {"0": "starting"}}
[2022-11-07T13:42:46.975+0100 WARNING yapapi.services.service_runner] Unhandled exception in service
Traceback (most recent call last):
File "/home/vandavv/dev/dapps/venv/lib/python3.9/site-packages/yapapi/services/service_runner.py", line 318, in _run_instance
batch = batch_task.result()
File "/home/vandavv/dev/dapps/venv/lib/python3.9/site-packages/dapp_runner/runner/service.py", line 70, in start
init_output = yield script
File "/home/vandavv/dev/dapps/venv/lib/python3.9/site-packages/yapapi/services/service_runner.py", line 334, in _run_instance
fut_result = yield batch
File "/home/vandavv/dev/dapps/venv/lib/python3.9/site-packages/yapapi/engine.py", line 720, in process_batches
results = await get_batch_results()
File "/home/vandavv/dev/dapps/venv/lib/python3.9/site-packages/yapapi/engine.py", line 701, in get_batch_results
event = script.process_batch_event(event_class, event_kwargs)
File "/home/vandavv/dev/dapps/venv/lib/python3.9/site-packages/yapapi/script/__init__.py", line 95, in process_batch_event
raise CommandExecutionError(str(command), event.message, event.stderr)
yapapi.rest.activity.CommandExecutionError: Command 'Run /bin/run_web.sh 192.168.0.3 ()' failed on provider; message: 'Runtime error: Error { code: Internal, message: "Running process failed, exit code: 2", context: {} }'
[2022-11-07T13:42:46.975+0100 INFO yapapi.services.service_runner] <DappService-web terminated on office_8_230 [ 0xee8993fe1dcff6b131d3fd759c6b3ddcb82d1655 ] @ 192.168.0.4> decommissioned
[2022-11-07T13:42:47.133+0100 INFO yapapi.summary] [Job 3] Terminated agreement with office_8_230
{"db": {"0": "running"}, "api": {"0": "running"}, "web": {"0": "terminated"}}
[2022-11-07T13:42:47.236+0100 INFO yapapi.services.service_runner] Restarting service <DappService-web terminated on office_8_230 [ 0xee8993fe1dcff6b131d3fd759c6b3ddcb82d1655 ] @ 192.168.0.4>
[2022-11-07T13:42:47.888+0100 INFO yapapi.summary] [Job 3] Accepted invoice from 'office_8_230', amount: 0.001342386593250000
[2022-11-07T13:42:48.253+0100 INFO yapapi.summary] [Job 3] Agreement proposed to provider 'q53' (0x44df807cd832393b254378ec33efb65adee837b8)
[2022-11-07T13:42:51.488+0100 INFO yapapi.summary] [Job 3] Agreement confirmed by provider 'q53'
[2022-11-07T13:42:57.100+0100 INFO yapapi.summary] [Job 3] Terminated agreement with q53
[2022-11-07T13:42:57.595+0100 INFO yapapi.summary] [Job 3] Agreement proposed to provider 'office_8_67' (0xc6871fbc0f552a8b7ba0f2f777ca40026286bc56)
[2022-11-07T13:42:58.040+0100 INFO yapapi.summary] [Job 3] Agreement confirmed by provider 'office_8_67'
[2022-11-07T13:43:05.228+0100 INFO yapapi.summary] [Job 3] Terminated agreement with office_8_67
[2022-11-07T13:43:05.271+0100 INFO yapapi.summary] [Job 3] Agreement proposed to provider 'office_10_216' (0xccf5d4e9f6dcfc553e7a4ba6a08b8b3e4fd785a2)
[2022-11-07T13:43:05.667+0100 INFO yapapi.summary] [Job 3] Agreement confirmed by provider 'office_10_216'
[2022-11-07T13:43:07.016+0100 INFO dapp_runner.runner] Application started.
{"web": {"local_proxy_address": "http://localhost:8080"}}
[2022-11-07T13:43:11.413+0100 INFO yapapi.summary] [Job 3] Terminated agreement with office_10_216
[2022-11-07T13:43:12.171+0100 INFO yapapi.summary] [Job 3] Agreement proposed to provider 'office_8_67' (0xc6871fbc0f552a8b7ba0f2f777ca40026286bc56)
[2022-11-07T13:43:12.528+0100 INFO yapapi.summary] [Job 3] Agreement confirmed by provider 'office_8_67'
[2022-11-07T13:43:14.023+0100 INFO dapp_runner.runner] Stopping the application...
{"db": {"0": "stopping"}, "api": {"0": "stopping"}, "web": {"0": "stopping"}}
{"db": {"0": "stopping"}, "api": {"0": "stopping"}, "web": {"0": "stopping"}}
[2022-11-07T13:43:14.030+0100 INFO yapapi.network] Removed network: Network { id: 79b37df061354e529f1395690b0da185, ip: 192.168.0.0, mask: 255.255.255.0}
[2022-11-07T13:43:14.279+0100 INFO yapapi.services.service_runner] <DappService-db terminated on office_8_80 [ 0xd9a4a6ba9e1800e4f61cd88dc23f082527f4ee28 ] @ 192.168.0.2> decommissioned
[2022-11-07T13:43:14.351+0100 INFO yapapi.services.service_runner] <DappService-api terminated on golem2005 [ 0x7803bb53dc04b333c80931aef447dec958ac6c4e ] @ 192.168.0.3> decommissioned
[2022-11-07T13:43:14.410+0100 INFO yapapi.summary] [Job 1] Terminated agreement with office_8_80
[2022-11-07T13:43:14.465+0100 INFO yapapi.summary] [Job 2] Terminated agreement with golem2005
[2022-11-07T13:43:15.040+0100 INFO yapapi.summary] [Job 1] Accepted invoice from 'office_8_80', amount: 0.004650492203849999
[2022-11-07T13:43:15.136+0100 INFO yapapi.summary] [Job 2] Accepted invoice from 'golem2005', amount: 0.004039792135350001
{"db": {"0": "terminated"}, "api": {"0": "terminated"}, "web": {"0": "stopping"}}
{"db": {"0": "terminated"}, "api": {"0": "terminated"}, "web": {"0": "stopping"}}
[2022-11-07T13:43:16.584+0100 INFO yapapi.summary] [Job 3] Job finished in 53.6s
[2022-11-07T13:43:16.584+0100 INFO yapapi.summary] [Job 3] Negotiated 5 agreements with 4 providers
[2022-11-07T13:43:16.585+0100 INFO yapapi.summary] [Job 3] Provider 'q53' did not compute any tasks
[2022-11-07T13:43:16.585+0100 INFO yapapi.summary] [Job 3] Provider 'office_8_67' did not compute any tasks
[2022-11-07T13:43:16.585+0100 INFO yapapi.summary] [Job 3] Provider 'office_10_216' did not compute any tasks
[2022-11-07T13:43:16.585+0100 INFO yapapi.summary] [Job 3] Provider 'office_8_67' did not compute any tasks
[2022-11-07T13:43:16.588+0100 INFO yapapi.summary] [Job 2] Job finished in 76.6s
[2022-11-07T13:43:16.589+0100 INFO yapapi.summary] [Job 2] Negotiated 1 agreements with 1 provider
[2022-11-07T13:43:16.592+0100 INFO yapapi.executor] Golem is shutting down...
[2022-11-07T13:43:16.592+0100 INFO yapapi.summary] [Job 1] Job finished in 92.6s
[2022-11-07T13:43:16.592+0100 INFO yapapi.summary] [Job 1] Negotiated 1 agreements with 1 provider
[2022-11-07T13:43:16.593+0100 INFO yapapi.executor] All jobs have finished
[2022-11-07T13:43:16.593+0100 INFO yapapi.executor] Waiting for Golem services to finish...
[2022-11-07T13:43:16.604+0100 INFO yapapi.summary] Total cost: 0.01003267093245
[2022-11-07T13:43:16.604+0100 INFO yapapi.summary] Golem engine has shut down
most likely due to: https://github.com/golemfactory/yapapi/issues/614
let's try to reproduce and reassess this after https://github.com/golemfactory/yapapi/pull/1054 is merged and dapp-runner
updated to use the newest yapapi
actually, that still happens anyway:
{"mongo": {"0": "running"}, "backend": {"0": "running"}, "frontend": {"0": "running"}}
[2022-12-08T08:46:20.496+0100 INFO dapp_runner.runner] Application started.
{"frontend": {"local_proxy_address": "http://localhost:8082"}}
[2022-12-08T08:46:37.710+0100 WARNING yapapi.services.service_runner] Unhandled exception in service
Traceback (most recent call last):
File "/home/blue/.envs/dapp-runner/lib/python3.9/site-packages/yapapi/services/service_runner.py", line 318, in _run_instance
batch = batch_task.result()
File "/home/blue/PycharmProjects/dapp-runner/dapp_runner/runner/service.py", line 91, in run
out = yield script
File "/home/blue/.envs/dapp-runner/lib/python3.9/site-packages/yapapi/services/service_runner.py", line 334, in _run_instance
fut_result = yield batch
File "/home/blue/.envs/dapp-runner/lib/python3.9/site-packages/yapapi/engine.py", line 720, in process_batches
results = await get_batch_results()
File "/home/blue/.envs/dapp-runner/lib/python3.9/site-packages/yapapi/engine.py", line 701, in get_batch_results
event = script.process_batch_event(event_class, event_kwargs)
File "/home/blue/.envs/dapp-runner/lib/python3.9/site-packages/yapapi/script/__init__.py", line 95, in process_batch_event
raise CommandExecutionError(str(command), event.message, event.stderr)
yapapi.rest.activity.CommandExecutionError: Command 'Run /bin/bash ('-c', 'cat /watchdog_stderr')' failed on provider; message: 'ExeScript command exited with code 1'; stderr: 'cat: /watchdog_stderr: No such file or directory
'
{"mongo": {"0": "running"}, "backend": {"0": "stopping"}, "frontend": {"0": "running"}}
[2022-12-08T08:46:37.898+0100 INFO yapapi.services.service_runner] <DappService-backend terminated on sharkoon_378.h [ 0x6e53d47fa38d9e768fabc0b6ad42910148ffbc4b ] @ 192.168.0.3> decommissioned
[2022-12-08T08:46:38.014+0100 INFO yapapi.summary] [Job 2] Terminated agreement with sharkoon_378.h
[2022-12-08T08:46:38.518+0100 INFO dapp_runner.runner] Stopping the application...
[2022-12-08T08:46:38.519+0100 INFO yapapi.contrib.service.socket_proxy] Stopping socket proxy...
[2022-12-08T08:46:38.520+0100 INFO yapapi.contrib.service.socket_proxy] Socket proxy stopped.
[2022-12-08T08:46:38.529+0100 INFO yapapi.network] Removed network: Network { id: 53ad6478c3c8480f8237334b55a09d1c, ip: 192.168.0.0, mask: 255.255.255.0}
{"mongo": {"0": "stopping"}, "backend": {"0": "terminated"}, "frontend": {"0": "stopping"}}
{"mongo": {"0": "stopping"}, "backend": {"0": "terminated"}, "frontend": {"0": "stopping"}}
[2022-12-08T08:46:38.574+0100 INFO yapapi.summary] [Job 2] Accepted invoice from 'sharkoon_378.h', amount: 0.01250105083840000
{"mongo": {"0": "stopping"}, "backend": {"0": "terminated"}, "frontend": {"0": "stopping"}}
[2022-12-08T08:46:38.695+0100 INFO yapapi.services.service_runner] <DappService-mongo terminated on mf.h [ 0x0704f0a658f644a5c6f5a4b7b9bbcedac30078ff ] @ 192.168.0.2> decommissioned
[2022-12-08T08:46:38.702+0100 INFO yapapi.services.service_runner] <DappService-frontend terminated on imapp2025.h [ 0x7a66c99526899f9e01c275e0cefc18e011238497 ] @ 192.168.0.4> decommissioned
{"mongo": {"0": "terminated"}, "backend": {"0": "terminated"}, "frontend": {"0": "terminated"}}
{"mongo": {"0": "terminated"}, "backend": {"0": "terminated"}, "frontend": {"0": "terminated"}}
[2022-12-08T08:46:40.384+0100 INFO yapapi.summary] [Job 3] Job finished in 24.9s
[2022-12-08T08:46:40.384+0100 INFO yapapi.summary] [Job 3] Negotiated 1 agreements with 1 provider
[2022-12-08T08:46:40.391+0100 INFO yapapi.summary] [Job 2] Job finished in 193.1s
[2022-12-08T08:46:40.392+0100 INFO yapapi.summary] [Job 2] Negotiated 1 agreements with 1 provider
[2022-12-08T08:46:40.502+0100 INFO yapapi.summary] [Job 1] Terminated agreement with mf.h
[2022-12-08T08:46:40.552+0100 INFO yapapi.summary] [Job 1] Agreement proposed to provider 'jiuzhang.h' (0xed827a418ddd23ead600ce8c4d1fed662a330fdf)
[2022-12-08T08:46:40.629+0100 INFO yapapi.summary] [Job 1] Agreement confirmed by provider 'jiuzhang.h'
[2022-12-08T08:46:40.669+0100 INFO yapapi.summary] [Job 3] Accepted invoice from 'imapp2025.h', amount: 0.001245993087300000
[2022-12-08T08:46:40.760+0100 INFO yapapi.summary] [Job 1] Accepted invoice from 'mf.h', amount: 0.01410003223270000
[2022-12-08T08:46:41.422+0100 WARNING yapapi.summary] [Job 1] Worker for provider 'jiuzhang.h' failed; reason: Can't add_node when in removed.
[2022-12-08T08:46:42.999+0100 INFO yapapi.executor] Golem is shutting down...
[2022-12-08T08:46:43.000+0100 INFO yapapi.summary] [Job 1] Job finished in 258.8s
[2022-12-08T08:46:43.000+0100 INFO yapapi.summary] [Job 1] Negotiated 2 agreements with 2 providers
[2022-12-08T08:46:43.001+0100 INFO yapapi.summary] [Job 1] Provider 'jiuzhang.h' did not compute any tasks
[2022-12-08T08:46:43.001+0100 INFO yapapi.summary] [Job 1] Activity failed 1 time on provider 'jiuzhang.h'
[2022-12-08T08:46:43.001+0100 INFO yapapi.executor] All jobs have finished
[2022-12-08T08:46:43.002+0100 INFO yapapi.executor] Waiting for Golem services to finish...
[2022-12-08T08:46:43.020+0100 INFO yapapi.summary] Total cost: 0.0278470761584
[2022-12-08T08:46:43.021+0100 INFO yapapi.summary] Golem engine has shut down
okay, this works as intended - at least for now
a failure of any service after it reaches the "running" state means that the integrity of the whole app cannot be guaranteed and the only sensible solution is to treat the whole app as defunct.
if we want to change the behavior here, we need to design a process which determines the plan of updates of services and possible options of algorithms governing the app at the "supervise" stage (as opposed to the "deploy" stage implemented now).
log.txt
https://github.com/golemfactory/dapp-experiments/blob/todo_react/01_todo_app/golem-compose.yml
Log: