SEL-Columbia / modelrunner

Framework for running models as long running jobs via the web
1 stars 2 forks source link

FileNotFoundError: ./electrificationplanner.sh #108

Closed ingenieroariel closed 6 years ago

ingenieroariel commented 6 years ago
(electrificationplanner) ubuntu@ip-172-31-20-197:~/modelrunner$ cat job_worker_electrificationplanner.log 
2018-07-06 13:15:07,276 - modelrunner - INFO - modelrunner 0.7.2 (Python 3.6.6)
2018-07-06 13:15:07,277 - modelrunner - INFO - waiting for commands on queue modelrunner:queues:electrificationplanner
2018-07-06 13:15:07,281 - modelrunner - INFO - waiting for commands on channels ['modelrunner:channels:http://54.244.1.118:8888;electrificationplanner', 'modelrunner:channels:nodes']
2018-07-06 13:15:07,281 - modelrunner - INFO - message received {'type': 'subscribe', 'pattern': None, 'channel': 'modelrunner:channels:http://54.244.1.118:8888;electrificationplanner', 'data': 1}
2018-07-06 13:15:07,281 - modelrunner - INFO - message received {'type': 'subscribe', 'pattern': None, 'channel': 'modelrunner:channels:nodes', 'data': 2}
2018-07-06 13:17:28,481 - modelrunner - INFO - command received PROCESS_JOB
2018-07-06 13:17:28,482 - modelrunner - INFO - preparing input for job 4c63e601-4dca-445e-b239-ba312a4bb7ea
2018-07-06 13:17:28,483 - modelrunner - INFO - fetching data from http://52.37.178.243:8000/data/4c63e601-4dca-445e-b239-ba312a4bb7ea/input.zip
2018-07-06 13:17:28,483 - modelrunner - INFO - Downloading from url http://52.37.178.243:8000/data/4c63e601-4dca-445e-b239-ba312a4bb7ea/input.zip
2018-07-06 13:17:28,487 - modelrunner - ERROR - Failed prepping data for job 4c63e601-4dca-445e-b239-ba312a4bb7ea
2018-07-06 13:17:28,488 - modelrunner - INFO - adding command {'command': 'COMPLETE_JOB', 'job_uuid': '4c63e601-4dca-445e-b239-ba312a4bb7ea'} to queue modelrunner:queues:http://52.37.178.243:8000
2018-07-06 13:17:51,397 - modelrunner - INFO - message received {'type': 'message', 'pattern': None, 'channel': 'modelrunner:channels:nodes', 'data': '{"command": "UPDATE_STATUS"}'}
2018-07-06 13:17:51,397 - modelrunner - INFO - command received UPDATE_STATUS
2018-07-06 13:22:24,083 - modelrunner - INFO - command received PROCESS_JOB
2018-07-06 13:22:24,085 - modelrunner - INFO - preparing input for job 8f207892-2df3-449c-8b33-8998280f0765
2018-07-06 13:22:24,086 - modelrunner - INFO - fetching data from http://52.37.178.243:8000/data/8f207892-2df3-449c-8b33-8998280f0765/input.zip
2018-07-06 13:22:24,086 - modelrunner - INFO - Downloading from url http://52.37.178.243:8000/data/8f207892-2df3-449c-8b33-8998280f0765/input.zip
2018-07-06 13:22:24,119 - modelrunner - INFO - Finished retrieving file from url http://52.37.178.243:8000/data/8f207892-2df3-449c-8b33-8998280f0765/input.zip
2018-07-06 13:22:24,128 - modelrunner - INFO - starting job 8f207892-2df3-449c-8b33-8998280f0765
2018-07-06 13:22:24,128 - modelrunner - INFO - running command ./electrificationplanner.sh /home/ubuntu/modelrunner/worker_data/8f207892-2df3-449c-8b33-8998280f0765/input /home/ubuntu/modelrunner/worker_data/8f207892-2df3-449c-8b33-8998280f0765/output
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/home/ubuntu/miniconda/envs/modelrunner/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/home/ubuntu/miniconda/envs/modelrunner/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "/home/ubuntu/miniconda/envs/modelrunner/lib/python3.6/site-packages/modelrunner-0.7.2-py3.6.egg/modelrunner/dispatcher.py", line 106, in wait_for_queue_commands
    self.process_command(command_dict)
  File "/home/ubuntu/miniconda/envs/modelrunner/lib/python3.6/site-packages/modelrunner-0.7.2-py3.6.egg/modelrunner/dispatcher.py", line 118, in process_command
    self.command_handler.dispatch[command](command_dict)
  File "/home/ubuntu/miniconda/envs/modelrunner/lib/python3.6/site-packages/modelrunner-0.7.2-py3.6.egg/modelrunner/worker_server.py", line 126, in process_job
    popen_proc = self._run_subprocess(command, job, job_data_log)
  File "/home/ubuntu/miniconda/envs/modelrunner/lib/python3.6/site-packages/modelrunner-0.7.2-py3.6.egg/modelrunner/worker_server.py", line 262, in _run_subprocess
    stderr=job_data_log)
  File "/home/ubuntu/miniconda/envs/modelrunner/lib/python3.6/subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "/home/ubuntu/miniconda/envs/modelrunner/lib/python3.6/subprocess.py", line 1344, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: './electrificationplanner.sh': './electrificationplanner.sh'

2018-07-06 13:23:45,272 - modelrunner - INFO - message received {'type': 'message', 'pattern': None, 'channel': 'modelrunner:channels:nodes', 'data': '{"command": "UPDATE_STATUS"}'}
2018-07-06 13:23:45,272 - modelrunner - INFO - command received UPDATE_STATUS
2018-07-06 13:23:47,072 - modelrunner - INFO - message received {'type': 'message', 'pattern': None, 'channel': 'modelrunner:channels:nodes', 'data': '{"command": "UPDATE_STATUS"}'}
2018-07-06 13:23:47,072 - modelrunner - INFO - command received UPDATE_STATUS
2018-07-06 13:24:02,753 - modelrunner - INFO - message received {'type': 'message', 'pattern': None, 'channel': 'modelrunner:channels:nodes', 'data': '{"command": "UPDATE_STATUS"}'}
2018-07-06 13:24:02,753 - modelrunner - INFO - command received UPDATE_STATUS
2018-07-06 13:40:16,430 - modelrunner - INFO - message received {'type': 'message', 'pattern': None, 'channel': 'modelrunner:channels:nodes', 'data': '{"command": "UPDATE_STATUS"}'}
2018-07-06 13:40:16,430 - modelrunner - INFO - command received UPDATE_STATUS
ingenieroariel commented 6 years ago

This was caused by the setup model function having failed before. Once the setup function ran to completion this error disappeared.

chrisnatali commented 6 years ago

Yah, when in doubt about setup of worker, you should be able to "stop" it and update the model as you did. Thanks for troubleshooting and posting resolution!