[ZBX-21086] Zabbix 6.0 breaks web scenarios with ISO-8859-1 Created: 2022 May 20  Updated: 2024 Apr 10  Resolved: 2022 Jul 10

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 6.0.4
Fix Version/s: 6.0.7rc1, 6.2.0rc3, 6.4.0alpha1, 6.4 (plan)

Type: Problem report Priority: Critical
Reporter: Francys Nivea (Inactive) Assignee: Vladislavs Sokurenko
Resolution: Fixed Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File ZBX-21086-6.0.diff     File example_page.tar.gz    
Issue Links:
Causes
Sub-task
depends on ZBX-16149 Server returned invalid UTF-8 sequence Confirmed
Team: Team A
Sprint: Sprint 90 (Jul 2022)
Story Points: 0.25

 Description   

Description of the problem and how to reproduce.
I reproduced the steps and encountered the same error:

The page being monitored (for which this error occurs) is encoded with the character set ISO-8859-1 and also includes that character set’s non-breaking space character (hex a0) as a literal (i.e. not via a HTML entity).

I’ve attached a tar.gz archive containing a simple HTML file (example.html) which is encoded with the character set ISO-8859-1 and which contains, between <p> and </p> elements (within its <body>) the character set’s non-breaking space character (hex a0).

When the the web server is ready, following the below steps in Zabbix 6.0(.4) to reproduce the issue:

  1. In Configuration > Hosts, select Web scenarios for a host of your choice
  2. Click Create web scenario
  3. On the Scenario tab, set Name to Example
  4. In the Steps of web scenario , set Required string to Page title
  5. In the Steps of web scenario , set Required status codes to 200
  6. In the Steps of web scenario , click Add
  7. Click Add (the 'main' Add button)
  8. View Monitoring > Latest data for the same host and await execution of the web scenario after which Failed step of scenario "Example" should have value 1 and Last error message of scenario "Example" should have value 
    {{required pattern "Page title" was not found on http:// {IP}/example.html}}

     

  1. Also review the zabbix_server log file which should have message(s) ending regexp_exec() failed with error -22

I’ve also tried increasing the verbosity of http poller logs by running this command several times:

zabbix_server -R log_level_increase='http poller'

After that’s been done, I’ve reviewed log messages from executions of the web scenario. The regexp_exec() failed with error -22 messages are display shortly after logging of the retrieved page data. I’ve noticed the logged page data (page.data) omits the line which contains the ISO-8859-1 character set's non-breaking space character (hex a0). See the below from the zabbix_server log file (for comparison with example.html from the tar.gz archive):

993008:20220520:151411.380 process_httptest() page.data from http://172.23.80.50/example.html:'<html>          
<head>
<title>Page title</title>     
</head>
<body>
</body>
'

This behaviour is a regression from previous Zabbix releases, including 5.4(.11). Indeed if the same web scenario detailed above is setup with Zabbix 5.4(.11) the issue does not occur (i.e. the web scenario completes successfully). We have several crucial internal websites which are monitored with Zabbix web scenarios that are affected by the issue and therefore we cannot upgrade to Zabbix 6.0.x until this is fixed.

example_page.tar.gz



 Comments   
Comment by Ramon [ 2022 May 23 ]

x2 ,  We also have several major internal websites that are monitored with Zabbix web scenarios that are affected by the issue.

Comment by Cícero Silva [ 2022 Jun 15 ]

I have the same problem. Several websites that use ISO-8859-1 encoding and are being monitored via web scenarios returns: Error: required pattern "example" was not found on http://example.com. And also occurs using HTTP Agent, returns: Server returned invalid UTF-8 sequence. I'm using zabbix version 6.0.5.

Comment by Vladislavs Sokurenko [ 2022 Jun 30 ]

It is not mandatory to compile with libpcre2, also please see ZBXNEXT-4922

Comment by Vladislavs Sokurenko [ 2022 Jun 30 ]

If possible then please check if ZBX-21086-6.0.diff helps

Comment by Vladislavs Sokurenko [ 2022 Jun 30 ]

Fixed in pull request feature/ZBX-21086-6.0

Comment by Vladislavs Sokurenko [ 2022 Jul 06 ]

Fixed in:

Generated at Mon May 05 07:20:46 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.