Ping monitoring returns garbled data upon failure #3290

Closed
opened 2026-02-28 03:24:32 -05:00 by deekerman · 16 comments
Owner

Originally created by @ghost on GitHub (Apr 22, 2024).

No related issues found

🛡️ Security Policy

Description

image

👟 Reproduction steps

A ping monitoring has been configured, and when a fault alarm occurs in the ping monitoring, the returned information is garbled

👀 Expected behavior

Will result in the inability to analyze and determine the specific cause of the malfunction

😓 Actual Behavior

The actual returned code is garbled and cannot determine the specific fault phenomenon

🐻 Uptime-Kuma Version

1.23.12

💻 Operating System and Arch

WindowsServer2012 Installed the relevant environment as required

🌐 Browser

Version 124.0.6367.61 (official version) (64 bit)

🖥️ Deployment Environment

  • Runtime: WindowsServer2012 Node.js v20.12.2 npm10.5.0
  • Database: sqllite
  • Filesystem used to store the database on: ntfs
  • number of monitors: 41

📝 Relevant log output

���� Ping IPaddress ���� 56 �ֽڵ�����: ����ʱ�� IPaddress �� Ping ͳ����Ϣ: ���ݰ�: �ѷ��� = 1���ѽ��� = 0����ʧ = 1 (100% ��ʧ)��
Originally created by @ghost on GitHub (Apr 22, 2024). ### 📑 I have found these related issues/pull requests No related issues found ### 🛡️ Security Policy - [X] I agree to have read this project [Security Policy](https://github.com/louislam/uptime-kuma/security/policy) ### Description ![image](https://github.com/louislam/uptime-kuma/assets/97371434/4567e11d-945f-4e78-b28d-df198cc0663e) ### 👟 Reproduction steps A ping monitoring has been configured, and when a fault alarm occurs in the ping monitoring, the returned information is garbled ### 👀 Expected behavior Will result in the inability to analyze and determine the specific cause of the malfunction ### 😓 Actual Behavior The actual returned code is garbled and cannot determine the specific fault phenomenon ### 🐻 Uptime-Kuma Version 1.23.12 ### 💻 Operating System and Arch WindowsServer2012 Installed the relevant environment as required ### 🌐 Browser Version 124.0.6367.61 (official version) (64 bit) ### 🖥️ Deployment Environment - Runtime: WindowsServer2012 Node.js v20.12.2 npm10.5.0 - Database: sqllite - Filesystem used to store the database on: ntfs - number of monitors: 41 ### 📝 Relevant log output ```shell ���� Ping IPaddress ���� 56 �ֽڵ�����: ����ʱ�� IPaddress �� Ping ͳ����Ϣ: ���ݰ�: �ѷ��� = 1���ѽ��� = 0����ʧ = 1 (100% ��ʧ)�� ```
Author
Owner

@ghost commented on GitHub (Apr 22, 2024):

This issue should be caused by a character set encoding related issue. We kindly request optimization or resolution. Thank you very much!

@ghost commented on GitHub (Apr 22, 2024): This issue should be caused by a character set encoding related issue. We kindly request optimization or resolution. Thank you very much!
Author
Owner

@louislam commented on GitHub (Apr 22, 2024):

See https://github.com/louislam/uptime-kuma/issues/570

This issue is not easy to be fixed in our side unfortunately. You have to change your Windows' language to English in order to display it correctly.

@louislam commented on GitHub (Apr 22, 2024): See https://github.com/louislam/uptime-kuma/issues/570 This issue is not easy to be fixed in our side unfortunately. You have to change your Windows' language to English in order to display it correctly.
Author
Owner

@ghost commented on GitHub (Apr 22, 2024):

See #570

This issue is not easy to be fixed in our side unfortunately. You have to change your Windows' language to English in order to display it correctly.

Do you really want to inquire about the implementation principle of this ping monitoring? Is it calling the ping tool of the Windows system or?
Also, is there a solution at the code level for this? For example, adding character set selection?

@ghost commented on GitHub (Apr 22, 2024): > See #570 > > This issue is not easy to be fixed in our side unfortunately. You have to change your Windows' language to English in order to display it correctly. Do you really want to inquire about the implementation principle of this ping monitoring? Is it calling the ping tool of the Windows system or? Also, is there a solution at the code level for this? For example, adding character set selection?
Author
Owner

@ghost commented on GitHub (Apr 22, 2024):

See #570

This issue is not easy to be fixed in our side unfortunately. You have to change your Windows' language to English in order to display it correctly.

I have researched and found a solution here
I'm not sure if the ping monitoring in the code was done by calling the Windows command prompt. I tried changing the default character set in the Windows built-in command prompt tool to not use Chinese in the United States, and I'll test if it works again

image

@ghost commented on GitHub (Apr 22, 2024): > See #570 > > This issue is not easy to be fixed in our side unfortunately. You have to change your Windows' language to English in order to display it correctly. I have researched and found a solution here I'm not sure if the ping monitoring in the code was done by calling the Windows command prompt. I tried changing the default character set in the Windows built-in command prompt tool to not use Chinese in the United States, and I'll test if it works again ![image](https://github.com/louislam/uptime-kuma/assets/97371434/70e2b1dc-3605-49b8-9dcc-cccf2293027b)
Author
Owner

@ghost commented on GitHub (Apr 22, 2024):

See #570

This issue is not easy to be fixed in our side unfortunately. You have to change your Windows' language to English in order to display it correctly.

I took a look and it seems that every ping is a ping command executed by calling the Windows command prompt. If that's the case, then my method should be suitable. I will pay more attention to this solution. If it is feasible, then it can be used as a solution to this problem.

@ghost commented on GitHub (Apr 22, 2024): > See #570 > > This issue is not easy to be fixed in our side unfortunately. You have to change your Windows' language to English in order to display it correctly. I took a look and it seems that every ping is a ping command executed by calling the Windows command prompt. If that's the case, then my method should be suitable. I will pay more attention to this solution. If it is feasible, then it can be used as a solution to this problem.
Author
Owner

@CommanderStorm commented on GitHub (Apr 22, 2024):

WindowsServer2012

Please consider upgrading. That is a really old OS

Is it calling the ping tool of the Windows system or?

The arguments for child_process.spawn code executing the ping on windows is found here:

https://github.com/louislam/node-ping/blob/master/lib/builder/win.js

@CommanderStorm commented on GitHub (Apr 22, 2024): > WindowsServer2012 Please consider upgrading. That is a really old OS > Is it calling the ping tool of the Windows system or? The arguments for [`child_process.spawn`](https://nodejs.org/api/child_process.html#child_processspawncommand-args-options) code executing the ping on windows is found here: https://github.com/louislam/node-ping/blob/master/lib/builder/win.js
Author
Owner

@ghost commented on GitHub (Apr 22, 2024):

WindowsServer2012

Please consider upgrading. That is a really old OS

Hello, the server version cannot be upgraded due to hardware limitations.

Is it calling the ping tool of the Windows system or?

The arguments for child_process.spawn code executing the ping on windows is found here:

https://github.com/louislam/node-ping/blob/master/lib/builder/win.js

Let me first see if the method mentioned above can solve the problem of garbled characters.
As long as it can solve the problem in the end, that's all.

@ghost commented on GitHub (Apr 22, 2024): > > WindowsServer2012 > > Please consider upgrading. That is a really old OS Hello, the server version cannot be upgraded due to hardware limitations. > > Is it calling the ping tool of the Windows system or? > > The arguments for [`child_process.spawn`](https://nodejs.org/api/child_process.html#child_processspawncommand-args-options) code executing the ping on windows is found here: > > https://github.com/louislam/node-ping/blob/master/lib/builder/win.js Let me first see if the method mentioned above can solve the problem of garbled characters. As long as it can solve the problem in the end, that's all.
Author
Owner

@ghost commented on GitHub (Apr 25, 2024):

I have researched and found a solution here I'm not sure if the ping monitoring in the code was done by calling the Windows command prompt. I tried changing the default character set in the Windows built-in command prompt tool to not use Chinese in the United States, and I'll test if it works again

After testing, this method is feasible and can be used as a reference method. @louislam @CommanderStorm

@ghost commented on GitHub (Apr 25, 2024): > I have researched and found a solution here I'm not sure if the ping monitoring in the code was done by calling the Windows command prompt. I tried changing the default character set in the Windows built-in command prompt tool to not use Chinese in the United States, and I'll test if it works again After testing, this method is feasible and can be used as a reference method. @louislam @CommanderStorm
Author
Owner

@CommanderStorm commented on GitHub (Apr 25, 2024):

What do you mean by reference method?

@CommanderStorm commented on GitHub (Apr 25, 2024): What do you mean by reference method?
Author
Owner

@ghost commented on GitHub (Apr 25, 2024):

I have researched and found a solution here I'm not sure if the ping monitoring in the code was done by calling the Windows command prompt. I tried changing the default character set in the Windows built-in command prompt tool to not use Chinese in the United States, and I'll test if it works again

I have researched and found a solution here I'm not sure if the ping monitoring in the code was done by calling the Windows command prompt. I tried changing the default character set in the Windows built-in command prompt tool to not use Chinese in the United States, and I'll test if it works again

@ghost commented on GitHub (Apr 25, 2024): > I have researched and found a solution here I'm not sure if the ping monitoring in the code was done by calling the Windows command prompt. I tried changing the default character set in the Windows built-in command prompt tool to not use Chinese in the United States, and I'll test if it works again I have researched and found a solution here I'm not sure if the ping monitoring in the code was done by calling the Windows command prompt. I tried changing the default character set in the Windows built-in command prompt tool to not use Chinese in the United States, and I'll test if it works again
Author
Owner

@CommanderStorm commented on GitHub (Apr 25, 2024):

I don't get what happened here. @niujinkai what do you mean?

So you set the default character set in the Windows built-in command prompt and this fixes the character encoding issue?

@CommanderStorm commented on GitHub (Apr 25, 2024): I don't get what happened here. @niujinkai what do you mean? So you set the default character set in the Windows built-in command prompt and this fixes the character encoding issue?
Author
Owner

@ghost commented on GitHub (Apr 25, 2024):

I don't get what happened here. @niujinkai what do you mean?

So you set the default character set in the Windows built-in command prompt and this fixes the character encoding issue?

Yes, I set the default character set in the Windows built-in command prompt to American or English, which solved the problem of garbled characters.
@CommanderStorm

@ghost commented on GitHub (Apr 25, 2024): > I don't get what happened here. @niujinkai what do you mean? > > So you set the default character set in the Windows built-in command prompt and this fixes the character encoding issue? Yes, I set the default character set in the Windows built-in command prompt to American or English, which solved the problem of garbled characters. @CommanderStorm
Author
Owner

@CommanderStorm commented on GitHub (Apr 25, 2024):

Did it do it for the whole system (including uptime-kuma) or just the command prompt in question?

@CommanderStorm commented on GitHub (Apr 25, 2024): Did it do it for the whole system (including uptime-kuma) or just the command prompt in question?
Author
Owner

@ghost commented on GitHub (Apr 25, 2024):

Did it do it for the whole system (including uptime-kuma) or just the command prompt in question?

I have only made settings for the command prompt. Right click on the command prompt title bar, click on default values, and you can set them in the options. However, this is for the server2012 system, and the settings may be different for other versions of the operating system. Additionally, I did not change all English for the entire operating system.

@ghost commented on GitHub (Apr 25, 2024): > Did it do it for the whole system (including uptime-kuma) or just the command prompt in question? I have only made settings for the command prompt. Right click on the command prompt title bar, click on default values, and you can set them in the options. However, this is for the server2012 system, and the settings may be different for other versions of the operating system. Additionally, I did not change all English for the entire operating system.
Author
Owner

@CommanderStorm commented on GitHub (Apr 25, 2024):

Does uptime-kuma still return garabled ping responses changing said setting?

@CommanderStorm commented on GitHub (Apr 25, 2024): Does uptime-kuma still return garabled ping responses changing said setting?
Author
Owner

@ghost commented on GitHub (Apr 25, 2024):

Does uptime-kuma still return garabled ping responses changing said setting?

There is no need to make any adjustments when returning normally. I see that when the fault state is restored, no information is returned and there are no errors

@ghost commented on GitHub (Apr 25, 2024): > Does uptime-kuma still return garabled ping responses changing said setting? There is no need to make any adjustments when returning normally. I see that when the fault state is restored, no information is returned and there are no errors
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/uptime-kuma#3290
No description provided.