[ZBX-23982] Protocol "ftp" not supported or disabled in libcurl Created: 2024 Jan 24  Updated: 2024 Apr 10  Resolved: 2024 Mar 01

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 6.0.25
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Tony Assignee: dimir
Resolution: Won't fix Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

debian 11 - zabbix server 6.0.25-1


Attachments: PNG File Capture d’écran 2024-01-24 à 12.46.48.png     PNG File Capture d’écran 2024-01-24 à 12.47.31.png     PNG File Capture d’écran 2024-02-14 à 17.26.27.png     Text File zabbix-6.0.26-web-monitoring-ftp-rtsp.patch    
Team: Team A
Sprint: Sprint candidates, S2401-2

 Description   

Problem appears since zabbix upgrade from 6.0.9 to 6.0.25

Steps to reproduce:

  1. Add a web scenario to check a ftp url like this : 
  2. URL : ftp://login:[email protected]
  3. Check response code 226

Result:
error in the check :

Protocol "ftp" not supported or disabled in libcurl


Expected:

Should work like on 6.0.9



 Comments   
Comment by dimir [ 2024 Jan 29 ]

What does

curl-config --protocols

say?

Comment by Tony [ 2024 Jan 29 ]

I remark curl binary was not installed  as curl-config (coming from libcurl4-gnutls-dev package on debian bullseye). I installed curl and libcurl4-gnutls-dev and here what curl-config --protocols response : 

 

$ curl-config --protocols
DICT
FILE
FTP
FTPS
GOPHER
HTTP
HTTPS
IMAP
IMAPS
LDAP
LDAPS
MQTT
POP3
POP3S
RTMP
RTSP
SCP
SFTP
SMB
SMBS
SMTP
SMTPS
TELNET
TFTP

 

Below some additionnal informations :

 

$ lsb_release -a
No LSB modules are available.
Distributor ID:    Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:    11
Codename:    bullseye

 

$ dpkg -l | grep curl
ii  curl                           7.74.0-1.3+deb11u11              amd64        command line tool for transferring data with URL syntax
ii  libcurl3-gnutls:amd64          7.74.0-1.3+deb11u11              amd64        easy-to-use client-side URL transfer library (GnuTLS flavour)
ii  libcurl4:amd64                 7.74.0-1.3+deb11u11              amd64        easy-to-use client-side URL transfer library (OpenSSL flavour)
ii  libcurl4-gnutls-dev:amd64      7.74.0-1.3+deb11u11              amd64        development files and documentation for libcurl (GnuTLS flavour)
ii  python3-pycurl                 7.43.0.6-5                       amd64        Python bindings to libcurl (Python 3)

 

curl -v  -i ftp://xxxx:[email protected]/
*   Trying xxxxxx:21...
* Connected to ftp.xxxx.com (xxxx) port 21 (#0)
< 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
< 220-You are user number 1 of 100 allowed.
< 220-Local time is now 16:46. Server port: 21.
< 220-This is a private system - No anonymous login
< 220-IPv6 connections are also welcome on this server.
< 220 You will be disconnected after 15 minutes of inactivity.
> USER xxxx
< 331 User xxxx OK. Password required
> PASS yyyyy
< 230 OK. Current restricted directory is /
> PWD
< 257 "/" is your current location
* Entry path is '/'
* Request has same path as previous transfer
> EPSV
* Connect data stream passively
* ftp_perform ends with SECONDARY: 0
< 229 Extended Passive mode OK (|||11424|)
*   Trying xxxxx:11424...
* Connecting to xxxxx (xxxxx) port 11424
* Connected to ftp.xxxxxx.com (xxxxx) port 21 (#0)
> TYPE A
< 200 TYPE is now ASCII
> LIST
< 150 Accepted data connection
* Maxdownload = -1
* Remembering we are in dir ""
< 226-Options: -l
< 226 0 matches total
* Connection #0 to host ftp.xxxxxx.com left intact

 

 

wOrking nice with curl command, with a 226 status code return 

Regards

Comment by dimir [ 2024 Jan 31 ]

Do you use packages from https://repo.zabbix.com ?

What's the output of the command:

ldd /usr/sbin/zabbix_server | grep curl
Comment by Tony [ 2024 Jan 31 ]

$ ldd /usr/sbin/zabbix_server | grep curl
libcurl.so.4 => /usr/lib/x86_64-linux-gnu/libcurl.so.4 (0x00007fc830d38000)

$ dpkg -S  /usr/lib/x86_64-linux-gnu/libcurl.so.4
libcurl4:amd64: /usr/lib/x86_64-linux-gnu/libcurl.so.4

Yep i am using repo.zabbix.com

$ cat /etc/apt/sources.list.d/zabbix.list
deb https://repo.zabbix.com/zabbix/6.0/debian bullseye main

$ apt-cache policy zabbix-server-mysql
zabbix-server-mysql:
  Installé : 1:6.0.25-1+debian11
  Candidat : 1:6.0.26-1+debian11
 Table de version :
     1:6.0.26-1+debian11 500
        500 https://repo.zabbix.com/zabbix/6.0/debian bullseye/main amd64 Packages
 *** 1:6.0.25-1+debian11 100
        100 /var/lib/dpkg/status
     1:5.0.8+dfsg-1 500
        500 http://debian.mirrors.ovh.net/debian bullseye/main amd64 Packages

I will upgrade to the new 6.0.26-1+debian11 version to see if it s better.

Tony

Comment by dimir [ 2024 Feb 14 ]

For security reasons we dropped protocols other than "http" and "https" in Web Monitoring, this indeed was introduced in 6.0.16: ZBX-22588

Comment by dimir [ 2024 Feb 14 ]

ZBXNEXT-9015 asks to make this configurable, you're welcome to vote.

Meanwhile, here's a patch that enables "ftp" support that you can try with version 6.0.26: zabbix-6.0.26-web-monitoring-ftp-rtsp.patch

Comment by Tony [ 2024 Feb 14 ]

Unfortunately i cannot apply the patch on my production environment, as my zabbix installation comes from zabbix-6.0.26 binaries pre-compiled from your official zabbix repository.

I cannot re-compile easily all my zabbix stack.

Any chance the patch will be applied into a future release ? or the ZBX-22588 modifications will be definitively active (means no other protocols other than http/https in web monitoring ?

I would like to have the possibility to active other protocols even if the default ones (http/https are only available). But in Administration -> General -> Other options like on the screenshot below, i have ftp mentionned (but this does not seem to have any effect on 6.0.26)

Thanks for your support

Tony OGER

Comment by dimir [ 2024 Feb 14 ]

Currently the Valid URI schemes do not affect Web Monitoring. This is why I have created ZBXNEXT. You have only 3 options:

  • stay on any version before ZBX-22588
  • apply the patch and re-build
  • wait for ZBXNEXT-9015 (there is no guarantee it will be implemented even, it is a request, well, unless you or someone else sponsor the development)
Comment by Tony [ 2024 Feb 15 ]

Thanks for your support. 

We hope the exception protocol security checkbox in  ZBXNEXT-9015 will be implemented in a future release , because for us this is a regression feature in a LTS that is used (not only in my company)

Regards

Tony 

Comment by dimir [ 2024 Mar 01 ]

Closing Won't Fix because this behaviour is expected. Feel free to vote for ZBXNEXT-9015 if you need this.

Generated at Fri Jul 04 07:31:30 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.