Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support (Russian)
  3. После перехода с 3.9 на 4.3.1 плохо работает проверка сертификатов

После перехода с 3.9 на 4.3.1 плохо работает проверка сертификатов

Scheduled Pinned Locked Moved Support (Russian)
6 Posts 2 Posters 25.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A
    A
    Akira
    wrote on last edited by
    #1

    Постоянно стало падать в ошибку проверки.
    Причем с тех серверов с которых на 3.9 все время проверялось нормально
    Снимок.PNG

    1 Reply Last reply
    0
    • F
      F
      Filipp Sudanov
      wrote on last edited by
      #2

      На 7 уровне дебага на агенте видны подробности, там openssl вызывается:

      2023.02.15 00:46:09.805 *D* [comm.cs.98        ] Requesting metric "HTTPS.CertificateExpireDate(host)"
      2023.02.15 00:46:09.805 *D* [comm.cs.98        ] H_ExternalMetric called for "HTTPS.CertificateExpireDate(host)" "openssl s_client -showcerts -servername $1 -connect $1:443 </dev/null 2>/dev/null | openssl x509 -inform pem -noout -enddate | cut -d = -f 2"
      2023.02.15 00:46:09.805 *D* [exec              ] RunExternal called for "HTTPS.CertificateExpireDate(host)" "openssl s_client -showcerts -servername $1 -connect $1:443 </dev/null 2>/dev/null | openssl x509 -inform pem -noout -enddate | cut -d = -f 2"
      2023.02.15 00:46:09.806 *D* [exec              ] RunExternal: command line is "openssl s_client -showcerts -servername host -connect host:443 </dev/null 2>/dev/null | openssl x509 -inform pem -noout -enddate | cut -d = -f 2"
      2023.02.15 00:46:09.809 *D* [procexec          ] ProcessExecutor::execute(): process "openssl s_client -showcerts -servername host -connect host:443 </dev/null 2>/dev/null | openssl x509 -inform pem -noout -enddate | cut -d = -f 2" started
      2023.02.15 00:46:09.827 *D* [procexec          ] ProcessExecutor::readOutput(): stopped on read (rc=0 err=Success)
      2023.02.15 00:46:09.827 *D* [comm.cs.98        ] GetMetricValue("HTTPS.CertificateExpireDate(host)"): 0 (SUCCESS) value = "unable to load certificate"

      Можно агента оставить с дебагом на 7 уровне, там будет видно что возвращается. Или просто погонять на эту команду на системе.

      1 Reply Last reply
      0
      • A
        A
        Akira
        wrote on last edited by
        #3

        Windows Server 2019
        дебаг агента 9 уровень, агент 4.3.1
        включен субагент SubAgent = portcheck.nsm
        вызова openssl не видно

        2023.02.15 08:45:36.170 *D* [comm.cs.1          ] Requesting metric "TLS.Certificate.ExpiresIn(mail. ###,443)"
        2023.02.15 08:45:36.201 *D* [netsvc            ] NetConnectTCP(mail. ###.ru:443): connect failed (timeout 30 ms)
        2023.02.15 08:45:36.201 *D* [comm.cs.1          ] GetMetricValue("TLS.Certificate.ExpiresIn(mail.###.ru,443)"): 500 (INTERNAL_ERROR) value = ""

        Нет там таймаута, валится сразу

        Вызов openssl с того же сервера нормально возвращает ответ
        openssl s_client -showcerts -servername mail.###.ru -connect mail.###.ru:443

        P.S. Кстати, агент мне не предлагает параметр  HTTPS.CertificateExpireDate, как в примере.

        1 Reply Last reply
        0
        • F
          F
          Filipp Sudanov
          wrote on last edited by
          #4

          Да, HTTPS.CertificateExpireDate - это я фигню написал - на системе где я смотрел был настроен такой ExternalParameter.

          А с TLS.Certificate.ExpiresIn есть ошибка в коде - там таумаут по умолчанию должен был быть 30 сек, а получился 30 мс. Будет поправлено в следующем патч релизе.

          На сейчас можно сделать так:
          TLS.Certificate.ExpiresIn(mail.###.ru,443,,timeout=30000)
          Только после патч релиза нужно будет это убрать или заменить на timeout=30, иначе таймаут станет 30 тысяч секунд

          1 Reply Last reply
          0
          • F
            F
            Filipp Sudanov
            wrote on last edited by
            #5

            Таймаут все-таки будет задаваться в миллисекундах, так что TLS.Certificate.ExpiresIn(mail.###.ru,443,,timeout=30000) может оставаться и в дальнейшем

            1 Reply Last reply
            0
            • A
              A
              Akira
              wrote on last edited by
              #6

              с такими настройками работает

              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              Powered by NodeBB Contributors
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups