Page MenuHomeVyOS Platform

"show ha-proxy" returns traceback error when configured with highest max-connections.
Open, NormalPublicBUG

Description

Configuration to reproduce the issue:

set load-balancing haproxy backend FRONTEND balance 'least-connection'
set load-balancing haproxy backend FRONTEND mode 'tcp'
set load-balancing haproxy backend FRONTEND server FRONTEND1 address '192.168.0.2'
set load-balancing haproxy backend FRONTEND server FRONTEND1 check port '5223'
set load-balancing haproxy backend FRONTEND server FRONTEND1 port '5223'
set load-balancing haproxy backend FRONTEND server FRONTEND2 address '192.168.0.3'
set load-balancing haproxy backend FRONTEND server FRONTEND2 check port '5223'
set load-balancing haproxy backend FRONTEND server FRONTEND2 port '5223'
set load-balancing haproxy backend FRONTEND timeout check '10'
set load-balancing haproxy backend FRONTEND timeout connect '10'
set load-balancing haproxy backend FRONTEND timeout server '10'
set load-balancing haproxy global-parameters tls-version-min '1.3'
set load-balancing haproxy service FRONTEND backend 'FRONTEND'
set load-balancing haproxy service FRONTEND listen-address 192.168.0.1
set load-balancing haproxy service FRONTEND mode 'tcp'
set load-balancing haproxy service FRONTEND port '5223'
set load-balancing haproxy service FRONTEND timeout client '10'
set load-balancing haproxy timeout check '10'
set load-balancing haproxy timeout client '10'
set load-balancing haproxy timeout connect '10'
set load-balancing haproxy timeout server '10'
set load-balancing haproxy global-parameters max-connections '2000000'

The commit is successful, but the op-cmd fails with following error:

vyos@vyos# run sh haproxy
Traceback (most recent call last):
Error: [Errno 2] No such file or directory
  File "/usr/libexec/vyos/op_mode/load-balancing_haproxy.py", line 232, in <module>
    res = vyos.opmode.run(sys.modules[__name__])
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/opmode.py", line 313, in run
    res = func(**args)
          ^^^^^^^^^^^^
  File "/usr/libexec/vyos/op_mode/load-balancing_haproxy.py", line 223, in show
    data = _get_raw_data()
           ^^^^^^^^^^^^^^^
  File "/usr/libexec/vyos/op_mode/load-balancing_haproxy.py", line 148, in _get_raw_data
    data = json.loads(_get_json_data())
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/json/__init__.py", line 339, in loads
    raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not NoneType

It does not throw this error if it is deleted and re-added again or applied in a second commit. The error is also found for the values in the same range.

Details

Version
1.5.0-S1
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

SrividyaA renamed this task from "show ha-proxy" returns traceback error when confirued with highest max-connections. to "show ha-proxy" returns traceback error when configured with highest max-connections..Jul 10 2026, 10:41 AM
SrividyaA updated the task description. (Show Details)
Viacheslav triaged this task as Normal priority.Jul 10 2026, 3:31 PM