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

Fix server output not found errors for python servers #14

Open
MrCreosote opened this issue Nov 22, 2024 · 0 comments
Open

Fix server output not found errors for python servers #14

MrCreosote opened this issue Nov 22, 2024 · 0 comments

Comments

@MrCreosote
Copy link
Member

In some cases the python server can throw an exception and not write the output.json file. All exceptions need to be trapped; output should always be written other than in catastrophic cases. One example from the callback server tests:

Running async in dir temp_test_callback/cbt1295545023945077284
Docker logger stdout: 1732318768.35 - CallbackServer: Subjob method: njs_sdk_test_1.run JobID: 66853bab-c31a-4c3a-a46e-a024c61233c2
Docker logger stdout: 1732318768.44 - CallbackServer: Running module njs_sdk_test_1:
url: https://github.com/kbasetest/njs_sdk_test_1
commit: 03b9210ac825858c1ae6339786686cea5dac5929
version: 0.0.3
release: dev

1732318769.46 njs_sdk_test_1 ID: None: Callback URL: http://172.17.0.1:39503
/usr/local/lib/python2.7/dist-packages/urllib3/util/ssl_.py:339: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
  InsecurePlatformWarning
Traceback (most recent call last):
  File "/kb/module/bin/../lib/njs_sdk_test_1/njs_sdk_test_1Server.py", line 606, in <module>
    sys.exit(process_async_cli(sys.argv[1], sys.argv[2], token))
  File "/kb/module/bin/../lib/njs_sdk_test_1/njs_sdk_test_1Server.py", line 558, in process_async_cli
    user = application.auth_client.get_user(token)
  File "/kb/module/lib/njs_sdk_test_1/authclient.py", line 79, in get_user
    ret = _requests.post(self._authurl, data=d)
  File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 112, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 502, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 612, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 504, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='ci.kbase.us', port=443): Max retries exceeded with url: /services/auth/api/legacy/KBase/Sessions/Login (Caused by SSLError(SSLError(1, '_ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure'),))
Docker logger stderr: 1732318770.05 - CallbackServer[66853bab-c31a-4c3a-a46e-a024c61233c2]: "njs_sdk_test_1.run" job threw an error, name="JSONRPCError", code=-32601, message="Unknown server error (output data wasn't produced)"
got traceback from server in test:
Unknown server error (output data wasn't produced)
@MrCreosote MrCreosote changed the title Fix server output not found erorrs for python servers Fix server output not found errors for python servers Nov 23, 2024
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

1 participant