'socket.getPeerCertificate is not a function' on Uptime Kuma v1.23.13 using podman
📑 I have found these related issues/pull requests
I unable find any related issues
🛡️ Security Policy
- [X] I agree to have read this project Security Policy
Description
Uptime Kuma v1.23.13 (podman deployment) always displays the error message "socket.getPeerCertificate is not a function," and all tested websites are down.
👟 Reproduction steps
Running Uptime Kuma v1.23.13 using docker
👀 Expected behavior
It should work as normal...
😓 Actual Behavior
socket.getPeerCertificate is not a function
🐻 Uptime-Kuma Version
1.23.13
💻 Operating System and Arch
Fedora 40
🌐 Browser
Google Chrome 126.0.6478.61
🖥️ Deployment Environment
- Runtime: podman 5.1.1 / nodejs 18.20.2
- Database:
- Filesystem used to store the database on:
- number of monitors:
📝 Relevant log output
2024-06-21T08:35:30+08:00 [MONITOR] WARN: Monitor #1 '充电桩-后台PC端': Pending: socket.getPeerCertificate is not a function | Max retries: 3 | Retry: 2 | Retry Interval: 60 seconds | Type: http
2024-06-21T08:36:32+08:00 [MONITOR] WARN: Monitor #1 '充电桩-后台PC端': Pending: socket.getPeerCertificate is not a function | Max retries: 3 | Retry: 3 | Retry Interval: 60 seconds | Type: http
2024-06-21T08:37:34+08:00 [MONITOR] WARN: Monitor #1 '充电桩-后台PC端': Failing: socket.getPeerCertificate is not a function | Interval: 60 seconds | Type: http | Down Count: 0 | Resend Interval: 0
2024-06-21T08:37:40+08:00 [MONITOR] INFO: Get Monitor: 1 User ID: 1
2024-06-21T08:37:57+08:00 [MONITOR] INFO: Get Monitor: 1 User ID: 1
2024-06-21T08:38:01+08:00 [MANAGE] INFO: Resume Monitor: 1 User ID: 1
2024-06-21T08:38:01+08:00 [MONITOR] INFO: Get Monitor: 1 User ID: 1
2024-06-21T08:38:02+08:00 [MONITOR] WARN: Monitor #1 '充电桩-后台PC端': Pending: socket.getPeerCertificate is not a function | Max retries: 3 | Retry: 1 | Retry Interval: 60 seconds | Type: http
2024-06-21T08:38:13+08:00 [MONITOR] INFO: Get Monitor: 1 User ID: 1
2024-06-21T08:38:21+08:00 [MANAGE] INFO: Resume Monitor: 1 User ID: 1
2024-06-21T08:38:21+08:00 [MONITOR] INFO: Get Monitor: 1 User ID: 1
2024-06-21T08:38:23+08:00 [MONITOR] WARN: Monitor #1 '充电桩-后台PC端': Pending: socket.getPeerCertificate is not a function | Max retries: 3 | Retry: 1 | Retry Interval: 60 seconds | Type: http
2024-06-21T08:39:25+08:00 [MONITOR] WARN: Monitor #1 '充电桩-后台PC端': Pending: socket.getPeerCertificate is not a function | Max retries: 3 | Retry: 2 | Retry Interval: 60 seconds | Type: http
I also encountered the same problem
Uptime-Kuma Version
1.23.13
💻 Operating System and Arch
Ubuntu 22.04.4
Deployment Environment
my docker-compose.yml
name: uptime
services:
uptime-kuma:
image: louislam/uptime-kuma:1.23.13
restart: always
ports:
- 3001:3001
volumes:
- ./data:/app/data
environment:
- https_proxy=http://172.x.x.x:7890
- http_proxy=http://172.x.x.x:7890
reproduce setp
- add https_proxy,http_proxy
- add https request I found that when I added http proxy and https proxy variables, this error would occur when detecting https requests. However, this error would not occur if I only detected http protocol requests.
📝Relevant log output
2024-07-11T16:43:07+08:00 [MONITOR] WARN: Monitor #1 'server-api': Pending: socket.getPeerCertificate is not a function | Max retries: 10 | Retry: 2 | Retry Interval: 20 seconds | Type: http
2024-07-11T16:43:27+08:00 [MONITOR] WARN: Monitor #1 'server-api': Pending: socket.getPeerCertificate is not a function | Max retries: 10 | Retry: 3 | Retry Interval: 20 seconds | Type: http
images
same here when used in conjunction with self-signed corporate certificates
This is already happening on 1.23.11 but will not cause the Monitor to go down:
kuma_1 | 2024-08-01T15:26:28+02:00 [MONITOR] ERROR: Caught error
kuma_1 | 2024-08-01T15:26:28+02:00 [MONITOR] ERROR: res.request.res.socket.getPeerCertificate is not a function
kuma_1 | 2024-08-01T15:26:28+02:00 [MONITOR] ERROR: Caught error
kuma_1 | 2024-08-01T15:26:28+02:00 [MONITOR] ERROR: res.request.res.socket.getPeerCertificate is not a function
kuma_1 | 2024-08-01T15:26:29+02:00 [MONITOR] ERROR: Caught error
kuma_1 | 2024-08-01T15:26:29+02:00 [MONITOR] ERROR: res.request.res.socket.getPeerCertificate is not a function
kuma_1 | 2024-08-01T15:26:30+02:00 [MONITOR] ERROR: Caught error
kuma_1 | 2024-08-01T15:26:30+02:00 [MONITOR] ERROR: res.request.res.socket.getPeerCertificate is not a function
kuma_1 | 2024-08-01T15:26:30+02:00 [MONITOR] ERROR: Caught error
kuma_1 | 2024-08-01T15:26:31+02:00 [MONITOR] ERROR: res.request.res.socket.getPeerCertificate is not a function
kuma_1 | 2024-08-01T15:26:31+02:00 [MONITOR] ERROR: Caught error
kuma_1 | 2024-08-01T15:26:31+02:00 [MONITOR] ERROR: res.request.res.socket.getPeerCertificate is not a function
In the newest version 1.23.13 this will cause the monitor to go down:
kuma_1 | 2024-08-01T15:22:31+02:00 [MONITOR] WARN: Monitor #19 'xxxx (xxxx)': Failing: socket.getPeerCertificate is not a function | Interval: 60 seconds | Type: http | Down Count: 0 | Resend Interval: 0
Also we got another issue which prevents us from using 1.23.12, so we'r sticking to 1.23.11 probably (this may be fixed in 1.23.13 but as we cant use that, we tried 1.23.12 instead):
kuma_1 | 2024-08-01T15:23:46+02:00 [MONITOR] WARN: Monitor #52 'xxxx (xxxx)': Failing: Cannot set properties of undefined (setting 'valid') | Interval: 60 seconds | Type: http | Down Count: 0 | Resend Interval: 0
We tried upgrading as none of our Monitors is displaying the certificate expiry time. Which we hoped is fixed in 1.23.13 but is probably not. Maybe a issue with the bundled node version in the docker container?
//EDIT: We'r also using a corporate certificate added using "NODE_EXTRA_CA_CERTS"
I have the same problem using corporate certificates.
+1
I test the issue fix or not, I'm sure fixed in v1.23.16.