Comments (5)
The Python SDK is now on version 0.11.7, 6 whole months in and it's still the same old story with this bug when running on "windowsservercore:ltsc2016" docker images, as usual, well played Microsoft.
from applicationinsights-python.
@reyang can you take a look? If you plan to re-use this channel in OC - you will likely hit this issue
from applicationinsights-python.
Thanks @SergeyKanzhelev. I don't plan to re-use the channel.
from applicationinsights-python.
The bug is occurring here due to SSL certificate exception:
https://github.com/Microsoft/ApplicationInsights-Python/blob/0e8342023f79e422cb718ade544bc34af9baf6d3/applicationinsights/channel/SenderBase.py#L136
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)>
This is a known issue with Python in Windows Docker container:
https://bugs.python.org/issue36137
The prescribed temporary workaround which worked for me was the following:
certutil -generateSSTFromWU roots.sst && certutil -addstore -f root roots.sst && del roots.sst
from applicationinsights-python.
Hi @reyang, I'm running into the same issue on Docker; tc.flush()
hangs on forever.
Is there any solution for this? The request never seems to time out.
When I force exit the program, I get the following output:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/applicationinsights/channel/SenderBase.py", line 136, in send
response = HTTPClient.urlopen(request, timeout=self._timeout)
File "/usr/local/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.7/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/local/lib/python3.7/urllib/request.py", line 543, in _open
'_open', req)
File "/usr/local/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.7/urllib/request.py", line 1360, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/local/lib/python3.7/urllib/request.py", line 1317, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/usr/local/lib/python3.7/http/client.py", line 1229, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.7/http/client.py", line 1275, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.7/http/client.py", line 1224, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.7/http/client.py", line 1016, in _send_output
self.send(msg)
File "/usr/local/lib/python3.7/http/client.py", line 956, in send
self.connect()
File "/usr/local/lib/python3.7/http/client.py", line 1384, in connect
super().connect()
File "/usr/local/lib/python3.7/http/client.py", line 928, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/local/lib/python3.7/socket.py", line 716, in create_connection
sock.connect(sa)
followed by:
KeyboardInterrupt
Original exception was:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/app/hydrate/__main__.py", line 82, in <module>
main()
File "/app/hydrate/__main__.py", line 78, in main
telemetry.flush()
File "/app/hydrate/telemetry.py", line 84, in flush
self._telemetry_client.flush()
File "/usr/local/lib/python3.7/site-packages/applicationinsights/TelemetryClient.py", line 59, in flush
self._channel.flush()
File "/usr/local/lib/python3.7/site-packages/applicationinsights/channel/TelemetryChannel.py", line 73, in flush
self._queue.flush()
File "/usr/local/lib/python3.7/site-packages/applicationinsights/channel/SynchronousQueue.py", line 31, in flush
local_sender.send(data)
File "/usr/local/lib/python3.7/site-packages/applicationinsights/channel/SenderBase.py", line 136, in send
response = HTTPClient.urlopen(request, timeout=self._timeout)
File "/usr/local/lib/python3.7/urllib/request.py", line 222, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.7/urllib/request.py", line 525, in open
response = self._open(req, data)
File "/usr/local/lib/python3.7/urllib/request.py", line 543, in _open
'_open', req)
File "/usr/local/lib/python3.7/urllib/request.py", line 503, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.7/urllib/request.py", line 1360, in https_open
context=self._context, check_hostname=self._check_hostname)
File "/usr/local/lib/python3.7/urllib/request.py", line 1317, in do_open
encode_chunked=req.has_header('Transfer-encoding'))
File "/usr/local/lib/python3.7/http/client.py", line 1229, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/local/lib/python3.7/http/client.py", line 1275, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.7/http/client.py", line 1224, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/local/lib/python3.7/http/client.py", line 1016, in _send_output
self.send(msg)
File "/usr/local/lib/python3.7/http/client.py", line 956, in send
self.connect()
File "/usr/local/lib/python3.7/http/client.py", line 1384, in connect
super().connect()
File "/usr/local/lib/python3.7/http/client.py", line 928, in connect
(self.host,self.port), self.timeout, self.source_address)
File "/usr/local/lib/python3.7/socket.py", line 716, in create_connection
sock.connect(sa)
Thank you!
from applicationinsights-python.
Related Issues (20)
- Log level cannot be configured through `logging_level` argument HOT 1
- Vendor instrumentations
- Add custom exporter support for all pillars HOT 1
- Separate Attach logic into new package that depends on distro HOT 1
- Add documentation for useful instrumentation configurations. HOT 1
- This repo is missing important files HOT 1
- Confirm licensing approach for vendoring is correct HOT 1
- Support for OpenTelemetry instrumentation aiohttp-client HOT 2
- Support for OpenTelemetry instrumentation grpc HOT 2
- Benefit from this package without using AzureInsights? (Offline Use within docker-compose?) HOT 4
- Inbound requests to FastAPI Route are not getting logged in App Insights HOT 3
- No tracing with Opentelemetry distro for Azure + Python + Fastapi HOT 3
- Unwanted dependencies are tracked which are not required HOT 3
- Not able to set cloudrole name HOT 3
- Flask auto-instrumentation doesn't configure itself properly HOT 9
- No insights in application map from sample code correlated logs HOT 2
- 'MessageData' is required but missing or empty HOT 3
- What's the problem with duplicated logs? HOT 12
- Too much traces in AppInsights HOT 8
- Resource error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from applicationinsights-python.