Security

REST API Modular input "EOF occured in violation of protocol"

mactho
New Member

Hello
I have the REST API Modular Input APP on a Universal Forwarder configured to consume (make rest calls) to management/health endpoints on rabbit queues. However I get this error turning up in the splunkd.log file whenever the app attempts to contact the endpoint:

Exception performing request: [Errno 8] _ssl.c:490: EOF occurred in violation of protocol

inputs.conf ssl section:

[SSL]
serverCert = <path to my trust store>

Was working fine on HTTP but then stopped working on HTTPS

Tags (1)
0 Karma

Damien_Dallimor
Ultra Champion

That error message and the SSL stanza have absolutely nothing to do with the REST Mod Input.

What are you actually trying to accomplish? Guessing here , but are you trying to setup client certificate based authentication for a HTTPs request using the REST Mod Input ?

0 Karma

mactho
New Member

Ok I have it sorted. I had to implement this :

class MyAdapter(HTTPAdapter):
    def init_poolmanager(self, connections, maxsize, block=False):
        self.poolmanager = PoolManager(num_pools=connections,
                                       maxsize=maxsize,
                                       block=block,
                                       ssl_version=ssl.PROTOCOL_TLSv1)


        s = requests.Session()
        s.mount('https://', MyAdapter())

in rest.py and then use the session object to make the request.

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...