Getting Data In

Splunk DB Connect: Why am I getting jbridge.log error "java.io.IOException: Server returned HTTP response code: 401 for URL..."?

basanthp
Path Finder

I get the following error in jbridge.log. Can someone advice on the fix.

2015-01-13 08:21:11,348 DEBUG options=['-Xmx512m', '-Dfile.encoding=UTF-8', '-server', '-Duser.language=en', '-Duser.region=', '-Dsplunk.app.ctx=dbx']
2015-01-13 08:21:11,348 INFO Checking for obsolete java libraries in /apps/splunk/etc/apps/dbx/bin/lib
2015-01-13 08:21:11,348 DEBUG Starting JavaBridgeServer...
2015-01-13 08:21:11,349 DEBUG Executing (native) CMD /usr/java/jdk-1.6.0_26-x86_64/bin/java -cp /apps/splunk/etc/apps/dbx/bin/lib/jdbm-2.2.jar:/apps/splunk/etc/apps/dbx/bin/lib/jtds-1.2.6.jar:/apps/splunk/etc/apps/dbx/bin/lib/dbx.jar:/apps/splunk/etc/apps/dbx/bin/lib/h2-1.3.162.jar:/apps/splunk/etc/apps/dbx/bin/lib/antlr-2.7.7.jar:/apps/splunk/etc/apps/dbx/bin/lib/commons-pool-1.5.6.jar:/apps/splunk/etc/apps/dbx/bin/lib/commons-logging-1.0.4.jar:/apps/splunk/etc/apps/dbx/bin/lib/log4j-1.2.15.jar:/apps/splunk/etc/apps/dbx/bin/lib/postgresql-9.0-801.jdbc3.jar:/apps/splunk/etc/apps/dbx/bin/lib/stringtemplate-3.2.1.jar:/apps/splunk/etc/apps/dbx/bin/lib/xstream-1.4.1.jar:/apps/splunk/etc/apps/dbx/bin/lib/hsqldb.jar:/apps/splunk/etc/apps/dbx/bin/lib/sqlite-jdbc-3.7.2.jar -Xmx512m -Dfile.encoding=UTF-8 -server -Duser.language=en -Duser.region= -Dsplunk.app.ctx=dbx com.splunk.bridge.JavaBridgeServer 13747
2015-01-13 08:21:11,349 INFO Started JavaBridgeServer PID=13779
2015-01-13 08:21:11,350 DEBUG starting pid watcher...
2015-01-13 08:21:12,422 ERROR Java process returned error code 1! Error: Initializing Splunk context... Environment: SplunkEnvironment{SPLUNK_HOME=/apps/splunk,SPLUNK_DB=/apps/splunk/var/lib/splunk} Configuring Log4j... Exception in thread "main" com.splunk.config.SplunkConfigurationException: IO Error while reading configuration from Splunkd: java.io.IOException: Server returned HTTP response code: 401 for URL: https://127.0.0.1:8089/servicesNS/nobody/-/admin/conf-java?count=10000 at com.splunk.config.rest.RESTAdapter.request(RESTAdapter.java:195) at com.splunk.config.rest.RESTAdapter.readConfig(RESTAdapter.java:203) at com.splunk.config.cache.CachedConfigurationAdapter.readConfig(CachedConfigurationAdapter.java:32) at com.splunk.config.cache.CachedConfigurationAdapter.readStanza(CachedConfigurationAdapter.java:40) at com.splunk.env.SplunkContext.getConfigStanza(SplunkContext.java:313) at com.splunk.env.SplunkContext.initialize(SplunkContext.java:128) at com.splunk.bridge.JavaBridgeServer.main(JavaBridgeServer.java:34) Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: https://127.0.0.1:8089/servicesNS/nobody/-/admin/conf-java?count=10000 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1491) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1485) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1139) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234) at com.splunk.rest.Response.getContent(Response.java:49) at com.splunk.rest.Response.readXML(Response.java:57) at com.splunk.config.rest.RESTAdapter.request(RESTAdapter.java:193) ... 6 more Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: https://127.0.0.1:8089/servicesNS/nobody/-/admin/conf-java?count=10000 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:318) at com.splunk.rest.Response.(Response.java:26) at com.splunk.rest.Splunkd.request(Splunkd.java:208) at com.splunk.rest.Splunkd.request(Splunkd.java:98) ... 7 more
2015-01-13 08:21:12,422 ERROR Command output: None
2015-01-13 08:21:12,422 DEBUG Error waiting for process: Java process returned error code 1! Error: Initializing Splunk context... Environment: SplunkEnvironment{SPLUNK_HOME=/apps/splunk,SPLUNK_DB=/apps/splunk/var/lib/splunk} Configuring Log4j... Exception in thread "main" com.splunk.config.SplunkConfigurationException: IO Error while reading configuration from Splunkd: java.io.IOException: Server returned HTTP response code: 401 for URL: https://127.0.0.1:8089/servicesNS/nobody/-/admin/conf-java?count=10000 at com.splunk.config.rest.RESTAdapter.request(RESTAdapter.java:195) at com.splunk.config.rest.RESTAdapter.readConfig(RESTAdapter.java:203) at com.splunk.config.cache.CachedConfigurationAdapter.readConfig(CachedConfigurationAdapter.java:32) at com.splunk.config.cache.CachedConfigurationAdapter.readStanza(CachedConfigurationAdapter.java:40) at com.splunk.env.SplunkContext.getConfigStanza(SplunkContext.java:313) at com.splunk.env.SplunkContext.initialize(SplunkContext.java:128) at com.splunk.bridge.JavaBridgeServer.main(JavaBridgeServer.java:34) Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: https://127.0.0.1:8089/servicesNS/nobody/-/admin/conf-java?count=10000 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1491) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1485) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1139) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:234) at com.splunk.rest.Response.getContent(Response.java:49) at com.splunk.rest.Response.readXML(Response.java:57) at com.splunk.config.rest.RESTAdapter.request(RESTAdapter.java:193) ... 6 more Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: https://127.0.0.1:8089/servicesNS/nobody/-/admin/conf-java?count=10000 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1436) at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:318) at com.splunk.rest.Response.(Response.java:26) at com.splunk.rest.Splunkd.request(Splunkd.java:208) at com.splunk.rest.Splunkd.request(Splunkd.java:98) ... 7 more
2015-01-13 08:21:12,422 DEBUG JavaBridgeServer terminated

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Error 401 is "Unauthorized". Have you checked your credentials?

---
If this reply helps you, Karma would be appreciated.
0 Karma

basanthp
Path Finder

Yes. I have admin privileges.

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...