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

There is no current event loop in thread and process already finished, ignoring input #107

Closed
csphoenix1 opened this issue Apr 5, 2018 · 2 comments

Comments

@csphoenix1
Copy link
Contributor

csphoenix1 commented Apr 5, 2018

Hi !

On the version 1.10-rc2, (and also on an older version), I have king of this message in the server log file whereas the web interface is always running (when I click on the button STOP, it doesn't work, the process still continue to running, but in fact, the log file tell the opposite).

RuntimeError: There is no current event loop in thread 'Thread-16'.
Exception in thread Thread-15:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.6/threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "src/execution/process_base.py", line 99, in notify_finished
    listener.finished()
  File "src/server.py", line 354, in finished
    tornado.ioloop.IOLoop.current().add_callback(web_socket.close)
  File "/usr/local/lib/python3.6/site-packages/tornado/ioloop.py", line 283, in current
    loop = asyncio.get_event_loop()
  File "/usr/local/lib/python3.6/asyncio/events.py", line 676, in get_event_loop
    return get_event_loop_policy().get_event_loop()
  File "/usr/local/lib/python3.6/asyncio/events.py", line 584, in get_event_loop
    % threading.current_thread().name)
RuntimeError: There is no current event loop in thread 'Thread-15'.

2018-04-05 02:10:30,161 [tornado.access.INFO] 200 POST /scripts/execute/stop (10.10.10.150) 0.63ms
2018-04-05 02:10:32,386 [script_server.ScriptExecutor.WARNING] process already finished, ignoring input
2018-04-05 02:10:32,970 [script_server.ScriptExecutor.WARNING] process already finished, ignoring input
2018-04-05 02:10:34,511 [tornado.access.INFO] 200 POST /scripts/execute/stop (10.10.10.150) 0.60ms
2018-04-05 02:10:42,867 [tornado.access.INFO] 200 POST /scripts/execute/stop (10.10.10.150) 0.87ms

Could I tell you other things which could help you to resolve this problem?

Thank you !

@bugy
Copy link
Owner

bugy commented Apr 5, 2018

Hi @csphoenix1, thank you for the report. Please have a look at #105
This is a problem with Tornado 5.
For the temporary solution, please replace src/server.py file with https://github.com/bugy/script-server/files/1864885/server.zip

In master branch the issue is already resolved, but I believe I have to cherry-pick it to release as well

@csphoenix1
Copy link
Contributor Author

Hi @bugy
Ok thank you @bugy for these informations.

@bugy bugy closed this as completed Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants