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

Address wrong socket type error #71

Open
andy-maier opened this issue Dec 2, 2020 · 1 comment
Open

Address wrong socket type error #71

andy-maier opened this issue Dec 2, 2020 · 1 comment

Comments

@andy-maier
Copy link
Member

andy-maier commented Dec 2, 2020

Every now and then, presumably when Prometheus contacts the exporter using https or when a browser directed to the export port uses https, the exporter thread that serves the export port, shows an OSError complaining about the wrong socket type. The exporter is still functional after showing the error.

@andy-maier andy-maier self-assigned this Dec 2, 2020
@andy-maier andy-maier added area: code type: bug Something isn't working type: cleanup and removed type: bug Something isn't working labels Dec 2, 2020
@andy-maier
Copy link
Member Author

andy-maier commented Mar 17, 2021

Example when calling with -vv:

Collecting metrics
Fetching metrics from HMC
Building family objects
Returning family objects
Done collecting metrics
Traceback (most recent call last):
  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.8/lib/python3.8/wsgiref/handlers.py", line 138, in run
    self.finish_response()
  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.8/lib/python3.8/wsgiref/handlers.py", line 184, in finish_response
    self.write(data)
  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.8/lib/python3.8/wsgiref/handlers.py", line 288, in write
    self.send_headers()
  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.8/lib/python3.8/wsgiref/handlers.py", line 346, in send_headers
    self.send_preamble()
  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.8/lib/python3.8/wsgiref/handlers.py", line 272, in send_preamble
    self._write(('Server: %s\r\n' % self.server_software).encode('iso-8859-1'))
  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.8/lib/python3.8/wsgiref/handlers.py", line 467, in _write
    result = self.stdout.write(data)
  File "/usr/local/opt/[email protected]/Frameworks/Python.framework/Versions/3.8/lib/python3.8/socketserver.py", line 799, in write
    self._sock.sendall(b)
OSError: [Errno 41] Protocol wrong type for socket
Collecting metrics
Fetching metrics from HMC
Building family objects
Returning family objects
Done collecting metrics

Environment:

  • zhmc_prometheis_exporter from master as of 2021-03-17
  • prometheus-client 0.9.0
  • Python 3.8.7 on macOS

@andy-maier andy-maier removed their assignment Jan 12, 2024
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

1 participant