Ad Widget

Collapse

Cannot read data from SSH server" happens when SSH agent script includes |(pipe)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sheine
    Junior Member
    • Oct 2023
    • 3

    #1

    Cannot read data from SSH server" happens when SSH agent script includes |(pipe)

    Hi community,
    we're using zabbix 6.4.7 and I tried to get some info via ssh from a linux server. Each time I use a pipe, the error appears "cannot read data from ssh server". If I remove the pipe symbol it works...
    Any suggestions?
    Thanks a lot
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Examples?
    You may need to escape that pipe or it breaks your command line maybe...

    Comment

    • sheine
      Junior Member
      • Oct 2023
      • 3

      #3
      My example:field executed script from my host item is filled with: cat /etc/os-release | grep -oP 'PRETTY_NAME="\K[^"]+' This delivers "ssh read error" most the time, sometimes (after 2 hours or 5 hours, it differs) there is an answer. If I remove the part with the pipe I get an answer. Behavior is described in ZBX-21337
      Last edited by sheine; 30-10-2023, 17:37.

      Comment

      • dimir
        Zabbix developer
        • Apr 2011
        • 1080

        #4
        Did you go through notes that were added in that ticket?

        Comment

        • sheine
          Junior Member
          • Oct 2023
          • 3

          #5
          I didn't see these notes - we have made an update of ubuntu 20.04 to 22.04 and now we can use the pipe symbol without errors! Thank's a lot.

          Comment

          • cyber
            Senior Member
            Zabbix Certified SpecialistZabbix Certified Professional
            • Dec 2006
            • 4807

            #6
            • Using the pipe "|" in the SSH script may lead to a "Cannot read data from SSH server" error. In this case it is recommended to upgrade the libssh library version. See also ZBX-21337 for details.
            I guess upgrading OS also updated libssh... ​

            Comment

            Working...