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

pysparkling: h2o on exit does not shut down cleanly #4143

Closed
exalate-issue-sync bot opened this issue May 22, 2023 · 3 comments
Closed

pysparkling: h2o on exit does not shut down cleanly #4143

exalate-issue-sync bot opened this issue May 22, 2023 · 3 comments
Assignees

Comments

@exalate-issue-sync
Copy link

When we shutdown h2o as part of a pysparkling shell exit, all kinds of exceptions are logged to the console which can potentially cause the application to unnecessarily warn the user even though the application successfully completed.
{code:java}

exit()
H2O session _sid_833c closed.
/home/H2O/sparkling-water-2.1.16/py/build/dist/h2o_pysparkling_2.1-2.1.16.zip/pysparkling/context.py:151: UserWarning: Stopping H2OContext. (Restarting H2O is not yet fully supported...)
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/opt/pythonz/pythons/CPython-2.7.5/lib/python2.7/atexit.py", line 24, in _run_exitfuncs
func(*targs, **kargs)
File "/home/H2O/sparkling-water-2.1.16/py/build/dist/h2o_pysparkling_2.1-2.1.16.zip/pysparkling/context.py", line 140, in
atexit.register(lambda: h2o_context.stop_with_jvm())
File "/home/H2O/sparkling-water-2.1.16/py/build/dist/h2o_pysparkling_2.1-2.1.16.zip/pysparkling/context.py", line 147, in stop_with_jvm
self.stop()
File "/home/H2O/sparkling-water-2.1.16/py/build/dist/h2o_pysparkling_2.1-2.1.16.zip/pysparkling/context.py", line 152, in stop
Initializer.clean_temp_dir()
File "/home/H2O/sparkling-water-2.1.16/py/build/dist/h2o_pysparkling_2.1-2.1.16.zip/pysparkling/initializer.py", line 81, in clean_temp_dir
shutil.rmtree(Initializer.__extracted_jar_dir)
File "/opt/pythonz/pythons/CPython-2.7.5/lib/python2.7/shutil.py", line 239, in rmtree
onerror(os.listdir, path, sys.exc_info())
File "/opt/pythonz/pythons/CPython-2.7.5/lib/python2.7/shutil.py", line 237, in rmtree
names = os.listdir(path)
OSError: [Errno 2] No such file or directory: '/tmp/tmpWCvXCm'
Error in sys.exitfunc:
{code}

@exalate-issue-sync
Copy link
Author

Nidhi Mehta commented: [~accountid:557058:eeeb611c-665e-431d-b442-1f255171db6f] Michal thinks it got introduced here - dae9f3a [SW-539] - new functionality registered on shutdown, but it expects to have enough time to make potentionally expensive cleanup

@DinukaH2O
Copy link

JIRA Issue Migration Info

Jira Issue: SW-569
Assignee: Jakub Hava
Reporter: Nidhi Mehta
State: Resolved
Fix Version: 2.0.18
Attachments: N/A
Development PRs: Available

Linked PRs from JIRA

#427

@hasithjp
Copy link
Member

JIRA Issue Migration Info Cont'd

Jira Issue Created Date: 2017-10-23T14:46:29.959-0700

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants