mickem / nscp

NSClient++
http://nsclient.org
GNU General Public License v2.0
239 stars 94 forks source link

Nsclient/NRDPclient not working over HTTPS #677

Open adrianoluiz90 opened 4 years ago

adrianoluiz90 commented 4 years ago

Issue and Steps to Reproduce

Hello, Using nsclient with nrdp client to perform passive checks, i can't perform a passive check with https, it works only with http. My test webserver responds on port 80 and 443

The nsclient/nrdpclient session, needs some configuration specified to work with https?

It´s work:
[/settings/NRDP/client/targets/default]
address=192.168.20.130
port=80
timeout=5
retries=2
token=MyToken

It´s not work:
[/settings/NRDP/client/targets/default]
address=192.168.20.130
port=443
timeout=5
retries=2
token=MyToken

The server is acessible over https (/nrdp/server).

Details

Additional Details

NSClient++ trace log error:

D ext-script Command line: cmd /c echo TESTE
T       nrdp Target configuration: address: ://192.168.20.130:443, timeout: 5, retry: 2, data: { retries: 1, token: MyToken, }
T       nrdp Connecting tuo: protocol: , host: 192.168.20.130:443, port: 443, path: /nrdp/server/, timeout: 30, token: MyToken, sender:
T       nrdp Sending: <?xml version="1.0" encoding="UTF-8"?>
<checkresults>
    <checkresult type="service">
        <hostname>DESKTOP-4H86P25</hostname>
        <servicename>ServiceTest</servicename>
        <state>0</state>
        <output>TESTE</output>
    </checkresult>
</checkresults>

E   schedule Failed to submit ServiceTest: Socket error: read_until: End of file
                    c:\source\master\modules\Scheduler\Scheduler.cpp:173