<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Internal server Error when exposing 8089 port for splunkd rest API with an ingress. in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Internal-server-Error-when-exposing-8089-port-for-splunkd-rest/m-p/706306#M21014</link>
    <description>&lt;P&gt;I have been trying to set up splunk on my Kubernetes cluster so i can use it with a python script to access the rest API.&lt;BR /&gt;&lt;BR /&gt;i have a splunk enterprise standalone instance running.&lt;BR /&gt;&lt;BR /&gt;i used traefik ingress to expose port 8089&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: splunk-ingress
  namespace: splunk
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-issuer
    traefik.ingress.kubernetes.io/router.entrypoints: websecure
spec:
  ingressClassName: common-traefik
  tls:
    - hosts:
        - splunk.example.com
      secretName: app-certificate
  rules:
    - host: splunk.example.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: splunk-stdln-standalone-service
                port:
                  number: 8089&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i try to curl to the client it returns internal server error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -X POST https://splunk.example.com/services/auth/login --data-urlencode username=admin --data-urlencode password=&amp;lt;mysplunkpassword&amp;gt; -k -v&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;* Host splunk.example.com:443 was resolved.
* IPv6: (none)
* IPv4: xx.xx.xxx.xxx
*   Trying xx.xx.xxx.xxx:443...
* Connected to splunk.example.com (xx.xx.xxx.xxx) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 / [blank] / UNDEF
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=splunk.example.com
*  start date: Dec  6 23:53:06 2024 GMT
*  expire date: Mar  6 23:53:05 2025 GMT
*  issuer: C=US; O=Let's Encrypt; CN=R10
*  SSL certificate verify ok.
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://splunk.example.com/services/auth/login
* [HTTP/2] [1] [:method: POST]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: splunk.example.com]
* [HTTP/2] [1] [:path: /services/auth/login]
* [HTTP/2] [1] [user-agent: curl/8.7.1]
* [HTTP/2] [1] [accept: */*]
* [HTTP/2] [1] [content-length: 34]
* [HTTP/2] [1] [content-type: application/x-www-form-urlencoded]
&amp;gt; POST /services/auth/login HTTP/2
&amp;gt; Host: splunk.example.com
&amp;gt; User-Agent: curl/8.7.1
&amp;gt; Accept: */*
&amp;gt; Content-Length: 34
&amp;gt; Content-Type: application/x-www-form-urlencoded
&amp;gt; 
* upload completely sent off: 34 bytes
&amp;lt; HTTP/2 500 
&amp;lt; content-length: 21
&amp;lt; date: Mon, 09 Dec 2024 06:54:50 GMT
&amp;lt; 
* Connection #0 to host splunk.example.com left intact
Internal Server Error%   &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;when i port forward to localhost the curl works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -X POST https://localhost:8089/services/auth/login --data-urlencode username=admin --data-urlencode password=&amp;lt;mysplunkpassword&amp;gt; -k -v&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Note: Unnecessary use of -X or --request, POST is already inferred.
* Host localhost:8089 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
*   Trying [::1]:8089...
* Connected to localhost (::1) port 8089
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384 / [blank] / UNDEF
* ALPN: server did not agree on a protocol. Uses default.
* Server certificate:
*  subject: CN=SplunkServerDefaultCert; O=SplunkUser
*  start date: Dec  9 02:21:04 2024 GMT
*  expire date: Dec  9 02:21:04 2027 GMT
*  issuer: C=US; ST=CA; L=San Francisco; O=Splunk; CN=SplunkCommonCA; emailAddress=support@splunk.com
*  SSL certificate verify result: self signed certificate in certificate chain (19), continuing anyway.
* using HTTP/1.x
&amp;gt; POST /services/auth/login HTTP/1.1
&amp;gt; Host: localhost:8089
&amp;gt; User-Agent: curl/8.7.1
&amp;gt; Accept: */*
&amp;gt; Content-Length: 34
&amp;gt; Content-Type: application/x-www-form-urlencoded
&amp;gt; 
* upload completely sent off: 34 bytes
&amp;lt; HTTP/1.1 200 OK
&amp;lt; Date: Mon, 09 Dec 2024 06:59:54 GMT
&amp;lt; Expires: Thu, 26 Oct 1978 00:00:00 GMT
&amp;lt; Cache-Control: no-store, no-cache, must-revalidate, max-age=0
&amp;lt; Content-Type: text/xml; charset=UTF-8
&amp;lt; X-Content-Type-Options: nosniff
&amp;lt; Content-Length: 204
&amp;lt; Connection: Keep-Alive
&amp;lt; X-Frame-Options: SAMEORIGIN
&amp;lt; Server: Splunkd
&amp;lt; 
&amp;lt;response&amp;gt;
  &amp;lt;sessionKey&amp;gt; {some sessionKey...} &amp;lt;/sessionKey&amp;gt;
  &amp;lt;messages&amp;gt;
    &amp;lt;msg code=""&amp;gt;&amp;lt;/msg&amp;gt;
  &amp;lt;/messages&amp;gt;
&amp;lt;/response&amp;gt;
* Connection #0 to host localhost left intact&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am using default confs&lt;BR /&gt;not sure if i need to update my server.conf&amp;nbsp; for this&lt;BR /&gt;&lt;BR /&gt;more context:&lt;BR /&gt;i checked the splunkd.log from when i made the request&lt;BR /&gt;and i get these logs:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;12-09-2024 17:19:36.904 +0000 WARN  SSLCommon [951 HTTPDispatch] - Received fatal SSL3 alert. ssl_state='SSLv3 read client key exchange A', alert_description='bad certificate'.

12-09-2024 17:19:36.904 +0000 WARN  HttpListener [951 HTTPDispatch] - Socket error from 192.168.xx.xx:52528 while idling: error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate&lt;/LI-CODE&gt;</description>
    <pubDate>Mon, 09 Dec 2024 17:22:32 GMT</pubDate>
    <dc:creator>shail</dc:creator>
    <dc:date>2024-12-09T17:22:32Z</dc:date>
    <item>
      <title>Internal server Error when exposing 8089 port for splunkd rest API with an ingress.</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Internal-server-Error-when-exposing-8089-port-for-splunkd-rest/m-p/706306#M21014</link>
      <description>&lt;P&gt;I have been trying to set up splunk on my Kubernetes cluster so i can use it with a python script to access the rest API.&lt;BR /&gt;&lt;BR /&gt;i have a splunk enterprise standalone instance running.&lt;BR /&gt;&lt;BR /&gt;i used traefik ingress to expose port 8089&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: splunk-ingress
  namespace: splunk
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-issuer
    traefik.ingress.kubernetes.io/router.entrypoints: websecure
spec:
  ingressClassName: common-traefik
  tls:
    - hosts:
        - splunk.example.com
      secretName: app-certificate
  rules:
    - host: splunk.example.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: splunk-stdln-standalone-service
                port:
                  number: 8089&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;when i try to curl to the client it returns internal server error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -X POST https://splunk.example.com/services/auth/login --data-urlencode username=admin --data-urlencode password=&amp;lt;mysplunkpassword&amp;gt; -k -v&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;* Host splunk.example.com:443 was resolved.
* IPv6: (none)
* IPv4: xx.xx.xxx.xxx
*   Trying xx.xx.xxx.xxx:443...
* Connected to splunk.example.com (xx.xx.xxx.xxx) port 443
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* (304) (IN), TLS handshake, Unknown (8):
* (304) (IN), TLS handshake, Certificate (11):
* (304) (IN), TLS handshake, CERT verify (15):
* (304) (IN), TLS handshake, Finished (20):
* (304) (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / AEAD-CHACHA20-POLY1305-SHA256 / [blank] / UNDEF
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=splunk.example.com
*  start date: Dec  6 23:53:06 2024 GMT
*  expire date: Mar  6 23:53:05 2025 GMT
*  issuer: C=US; O=Let's Encrypt; CN=R10
*  SSL certificate verify ok.
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://splunk.example.com/services/auth/login
* [HTTP/2] [1] [:method: POST]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: splunk.example.com]
* [HTTP/2] [1] [:path: /services/auth/login]
* [HTTP/2] [1] [user-agent: curl/8.7.1]
* [HTTP/2] [1] [accept: */*]
* [HTTP/2] [1] [content-length: 34]
* [HTTP/2] [1] [content-type: application/x-www-form-urlencoded]
&amp;gt; POST /services/auth/login HTTP/2
&amp;gt; Host: splunk.example.com
&amp;gt; User-Agent: curl/8.7.1
&amp;gt; Accept: */*
&amp;gt; Content-Length: 34
&amp;gt; Content-Type: application/x-www-form-urlencoded
&amp;gt; 
* upload completely sent off: 34 bytes
&amp;lt; HTTP/2 500 
&amp;lt; content-length: 21
&amp;lt; date: Mon, 09 Dec 2024 06:54:50 GMT
&amp;lt; 
* Connection #0 to host splunk.example.com left intact
Internal Server Error%   &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;when i port forward to localhost the curl works&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;curl -X POST https://localhost:8089/services/auth/login --data-urlencode username=admin --data-urlencode password=&amp;lt;mysplunkpassword&amp;gt; -k -v&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Note: Unnecessary use of -X or --request, POST is already inferred.
* Host localhost:8089 was resolved.
* IPv6: ::1
* IPv4: 127.0.0.1
*   Trying [::1]:8089...
* Connected to localhost (::1) port 8089
* ALPN: curl offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* (304) (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384 / [blank] / UNDEF
* ALPN: server did not agree on a protocol. Uses default.
* Server certificate:
*  subject: CN=SplunkServerDefaultCert; O=SplunkUser
*  start date: Dec  9 02:21:04 2024 GMT
*  expire date: Dec  9 02:21:04 2027 GMT
*  issuer: C=US; ST=CA; L=San Francisco; O=Splunk; CN=SplunkCommonCA; emailAddress=support@splunk.com
*  SSL certificate verify result: self signed certificate in certificate chain (19), continuing anyway.
* using HTTP/1.x
&amp;gt; POST /services/auth/login HTTP/1.1
&amp;gt; Host: localhost:8089
&amp;gt; User-Agent: curl/8.7.1
&amp;gt; Accept: */*
&amp;gt; Content-Length: 34
&amp;gt; Content-Type: application/x-www-form-urlencoded
&amp;gt; 
* upload completely sent off: 34 bytes
&amp;lt; HTTP/1.1 200 OK
&amp;lt; Date: Mon, 09 Dec 2024 06:59:54 GMT
&amp;lt; Expires: Thu, 26 Oct 1978 00:00:00 GMT
&amp;lt; Cache-Control: no-store, no-cache, must-revalidate, max-age=0
&amp;lt; Content-Type: text/xml; charset=UTF-8
&amp;lt; X-Content-Type-Options: nosniff
&amp;lt; Content-Length: 204
&amp;lt; Connection: Keep-Alive
&amp;lt; X-Frame-Options: SAMEORIGIN
&amp;lt; Server: Splunkd
&amp;lt; 
&amp;lt;response&amp;gt;
  &amp;lt;sessionKey&amp;gt; {some sessionKey...} &amp;lt;/sessionKey&amp;gt;
  &amp;lt;messages&amp;gt;
    &amp;lt;msg code=""&amp;gt;&amp;lt;/msg&amp;gt;
  &amp;lt;/messages&amp;gt;
&amp;lt;/response&amp;gt;
* Connection #0 to host localhost left intact&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I am using default confs&lt;BR /&gt;not sure if i need to update my server.conf&amp;nbsp; for this&lt;BR /&gt;&lt;BR /&gt;more context:&lt;BR /&gt;i checked the splunkd.log from when i made the request&lt;BR /&gt;and i get these logs:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;12-09-2024 17:19:36.904 +0000 WARN  SSLCommon [951 HTTPDispatch] - Received fatal SSL3 alert. ssl_state='SSLv3 read client key exchange A', alert_description='bad certificate'.

12-09-2024 17:19:36.904 +0000 WARN  HttpListener [951 HTTPDispatch] - Socket error from 192.168.xx.xx:52528 while idling: error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 09 Dec 2024 17:22:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Internal-server-Error-when-exposing-8089-port-for-splunkd-rest/m-p/706306#M21014</guid>
      <dc:creator>shail</dc:creator>
      <dc:date>2024-12-09T17:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Internal server Error when exposing 8089 port for splunkd rest API with an ingress.</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Internal-server-Error-when-exposing-8089-port-for-splunkd-rest/m-p/706316#M21018</link>
      <description>&lt;P&gt;Let me ask you first, why would you want to map your 8089 splunkd port to 443? 443 is for webUI (if enabled and redirected from the default 8000). 8089 is the port your API is expected to be at.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2024 10:11:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Internal-server-Error-when-exposing-8089-port-for-splunkd-rest/m-p/706316#M21018</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2024-12-09T10:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Internal server Error when exposing 8089 port for splunkd rest API with an ingress.</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Internal-server-Error-when-exposing-8089-port-for-splunkd-rest/m-p/706371#M21038</link>
      <description>&lt;P&gt;my goal was to test splunk Rest API, Since I just needed to create an endpoint to access it&lt;BR /&gt;so i used the hostname directly. I dont need to use the webUI&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Does this affect the splunk configuration?&lt;BR /&gt;I am not sure what the issue is here or why would i get an internal server error?&lt;BR /&gt;Any hints appreciated!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2024 17:11:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Internal-server-Error-when-exposing-8089-port-for-splunkd-rest/m-p/706371#M21038</guid>
      <dc:creator>shail</dc:creator>
      <dc:date>2024-12-09T17:11:16Z</dc:date>
    </item>
  </channel>
</rss>

