Failed to post createEvent
In ProgressI want to notify event from outside plugin by post request.
But whenever I post 'createEvent', I got error.
Might I have done SSL setting correctly. What would be the cause of this issue?
Below is the error log from python request.
(by digest authentication for user who is accepted digest authentication)
Traceback (most recent call last):
File "C:\Users\Fujiwara\anaconda3\lib\threading.py", line 980, in _bootstrap_inner
self.run()
File "C:\Users\Fujiwara\anaconda3\lib\threading.py", line 917, in run
* Detected change in 'C:\\Users\\Fujiwara\\anaconda3\\Lib\\threading.py', reloading
self._target(*self._args, **self._kwargs)
File "path\to\main.py", line 31, in send_event
requests.post("https://127.0.0.1:7001/api/createEvent",
File "C:\Users\Fujiwara\anaconda3\lib\site-packages\requests\api.py", line 115, in post
return request("post", url, data=data, json=json, **kwargs)
File "C:\Users\Fujiwara\anaconda3\lib\site-packages\requests\api.py", line 59, in request
* Detected change in 'C:\\Users\\Fujiwara\\anaconda3\\Lib\\site-packages\\requests\\api.py', reloading
return session.request(method=method, url=url, **kwargs)
File "C:\Users\Fujiwara\anaconda3\lib\site-packages\requests\sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "C:\Users\Fujiwara\anaconda3\lib\site-packages\requests\sessions.py", line 701, in send
* Detected change in 'C:\\Users\\Fujiwara\\anaconda3\\Lib\\site-packages\\requests\\sessions.py', reloading
r = adapter.send(request, **kwargs)
File "C:\Users\Fujiwara\anaconda3\lib\site-packages\requests\adapters.py", line 563, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='127.0.0.1', port=7001): Max retries exceeded with url: /api/createEvent (Caused by SSLError(CertificateError("hostname '127.0.0.1' doesn't match '127.0.0.1'")))
-
Hi Fujiwara Daichi,
Thank you for your question.
Unfortunately, we’re having difficulty fully understanding the description in your post. Let me address the points based on the details provided:1. SSL Configuration
- You mentioned, “I might have done the SSL setting correctly.” Could you clarify what specific steps you followed that make you believe the SSL setup is correct?
- Are you using your own SSL certificate? If so, is it self-signed or issued by a trusted Certificate Authority?
- How was the certificate created, and can you provide more details about its configuration and installation?2.Error Log Details
- Based on the error log, the request appears to fail because the SSL certificate is “invalid.”
- SSL certificates must match the hostname they are issued for. If you are using an IP address, ensure it has been encoded correctly in the certificate as the hostname during creation.3.Troubleshooting SSL
- This issue is likely related to SSL certificate configuration, not Python, the API, or the application itself.
- The Python requests module is raising this error because the SSL certificate validation failed, which is expected behavior.
- The mismatch between the hostname and the certificate details seems to be the root cause. You might want to start debugging the SSL handshake to verify the certificate and hostname alignment.4.Request Behavior and Code Sample
To assist further, could you provide a snippet of the code you are using? This will help confirm if there’s any issue with the request implementation itself.Feel free to share additional details or clarify the setup so we can check the issue more effectively.
Thanks.
Please sign in to leave a comment.
Comments
1 comment