SCCM integration error

Hi,
I am getting the following error when setting up the sccm plugin, tested via telnet on the orchestrator and it connects fine.
Connect: Connecting…
rapid7/Microsoft SCCM:2.1.0. Step name: add_devices_to_collection
Connection test failed!

There is likely an issue with the connection details, or the plugin can not communicate via WinRM on the SCCM host. An error occurred while fetching the SCCM site based on site path: CCM, please review the error for additional details: (‘Connection aborted.’, ConnectionResetError(104, ‘Connection reset by peer’))
Traceback (most recent call last):
File “/usr/local/lib/python3.8/site-packages/urllib3-1.26.9-py3.8.egg/urllib3/connectionpool.py”, line 703, in urlopen
httplib_response = self._make_request(
File “/usr/local/lib/python3.8/site-packages/urllib3-1.26.9-py3.8.egg/urllib3/connectionpool.py”, line 386, in _make_request
self._validate_conn(conn)
File “/usr/local/lib/python3.8/site-packages/urllib3-1.26.9-py3.8.egg/urllib3/connectionpool.py”, line 1040, in validate_conn
conn.connect()
File “/usr/local/lib/python3.8/site-packages/urllib3-1.26.9-py3.8.egg/urllib3/connection.py”, line 414, in connect
self.sock = ssl_wrap_socket(
File "/usr/local/lib/python3.8/site-packages/urllib3-1.26.9-py3.8.egg/urllib3/util/ssl
.py", line 449, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(
File "/usr/local/lib/python3.8/site-packages/urllib3-1.26.9-py3.8.egg/urllib3/util/ssl
.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File “/usr/local/lib/python3.8/ssl.py”, line 500, in wrap_socket
return self.sslsocket_class._create(
File “/usr/local/lib/python3.8/ssl.py”, line 1040, in _create
self.do_handshake()
File “/usr/local/lib/python3.8/ssl.py”, line 1309, in do_handshake
self._sslobj.do_handshake()
ConnectionResetError: [Errno 104] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.8/site-packages/requests-2.27.1-py3.8.egg/requests/adapters.py”, line 440, in send
resp = conn.urlopen(
File “/usr/local/lib/python3.8/site-packages/urllib3-1.26.9-py3.8.egg/urllib3/connectionpool.py”, line 785, in urlopen
retries = retries.increment(
File “/usr/local/lib/python3.8/site-packages/urllib3-1.26.9-py3.8.egg/urllib3/util/retry.py”, line 550, in increment
raise six.reraise(type(error), error, _stacktrace)
File “/usr/local/lib/python3.8/site-packages/urllib3-1.26.9-py3.8.egg/urllib3/packages/six.py”, line 769, in reraise
raise value.with_traceback(tb)
File “/usr/local/lib/python3.8/site-packages/urllib3-1.26.9-py3.8.egg/urllib3/connectionpool.py”, line 703, in urlopen
httplib_response = self._make_request(
File “/usr/local/lib/python3.8/site-packages/urllib3-1.26.9-py3.8.egg/urllib3/connectionpool.py”, line 386, in _make_request
self._validate_conn(conn)
File “/usr/local/lib/python3.8/site-packages/urllib3-1.26.9-py3.8.egg/urllib3/connectionpool.py”, line 1040, in validate_conn
conn.connect()
File “/usr/local/lib/python3.8/site-packages/urllib3-1.26.9-py3.8.egg/urllib3/connection.py”, line 414, in connect
self.sock = ssl_wrap_socket(
File "/usr/local/lib/python3.8/site-packages/urllib3-1.26.9-py3.8.egg/urllib3/util/ssl
.py", line 449, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(
File "/usr/local/lib/python3.8/site-packages/urllib3-1.26.9-py3.8.egg/urllib3/util/ssl
.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File “/usr/local/lib/python3.8/ssl.py”, line 500, in wrap_socket
return self.sslsocket_class._create(
File “/usr/local/lib/python3.8/ssl.py”, line 1040, in _create
self.do_handshake()
File “/usr/local/lib/python3.8/ssl.py”, line 1309, in do_handshake
self._sslobj.do_handshake()
urllib3.exceptions.ProtocolError: (‘Connection aborted.’, ConnectionResetError(104, ‘Connection reset by peer’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.8/site-packages/microsoft_sccm_rapid7_plugin-2.1.0-py3.8.egg/icon_microsoft_sccm/connection/connection.py”, line 32, in test
run_script = util.powershell(self, script, self.logger, False)
File “/usr/local/lib/python3.8/site-packages/microsoft_sccm_rapid7_plugin-2.1.0-py3.8.egg/icon_microsoft_sccm/util/util.py”, line 49, in powershell
run_script = powershell_session.run_ps(script)
File “/usr/local/lib/python3.8/site-packages/winrm/init.py”, line 50, in run_ps
rs = self.run_cmd(‘powershell -encodedcommand {0}’.format(encoded_ps))
File “/usr/local/lib/python3.8/site-packages/winrm/init.py”, line 37, in run_cmd
shell_id = self.protocol.open_shell()
File “/usr/local/lib/python3.8/site-packages/winrm/protocol.py”, line 157, in open_shell
res = self.send_message(xmltodict.unparse(req))
File “/usr/local/lib/python3.8/site-packages/winrm/protocol.py”, line 234, in send_message
resp = self.transport.send_message(message)
File “/usr/local/lib/python3.8/site-packages/winrm/transport.py”, line 272, in send_message
response = self._send_message_request(prepared_request, message)
File “/usr/local/lib/python3.8/site-packages/winrm/transport.py”, line 277, in _send_message_request
response = self.session.send(prepared_request, timeout=self.read_timeout_sec)
File “/usr/local/lib/python3.8/site-packages/requests-2.27.1-py3.8.egg/requests/sessions.py”, line 645, in send
r = adapter.send(request, **kwargs)
File “/usr/local/lib/python3.8/site-packages/requests-2.27.1-py3.8.egg/requests/adapters.py”, line 501, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: (‘Connection aborted.’, ConnectionResetError(104, ‘Connection reset by peer’))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/local/lib/python3.8/site-packages/insightconnect_plugin_runtime-4.7.0-py3.8.egg/insightconnect_plugin_runtime/plugin.py”, line 373, in handle_step
output = self.start_step(
File “/usr/local/lib/python3.8/site-packages/insightconnect_plugin_runtime-4.7.0-py3.8.egg/insightconnect_plugin_runtime/plugin.py”, line 529, in start_step
output = func()
File “/usr/local/lib/python3.8/site-packages/microsoft_sccm_rapid7_plugin-2.1.0-py3.8.egg/icon_microsoft_sccm/connection/connection.py”, line 35, in test
raise ConnectionTestException(
insightconnect_plugin_runtime.exceptions.ConnectionTestException: Connection test failed!

There is likely an issue with the connection details, or the plugin can not communicate via WinRM on the SCCM host. An error occurred while fetching the SCCM site based on site path: CCM, please review the error for additional details: (‘Connection aborted.’, ConnectionResetError(104, ‘Connection reset by peer’))

The credentials i am using are domain admin.

Thanks.

Hey @jmason, I wanted to let you know that we have a ticket in our system to further investigate the SCCM plugin regarding this error, and we’ll let you know about any updates. Thanks for posting it here!

Thanks Holly, i fixed the issue.

I created the self signed certificate on the SCCM site server and applied it to the winrm listener which resolved the error.

1 Like

Awesome, glad you got it resolved!