Deployment Architecture

db connect jbridge won't start

a212830
Champion

Hi,

I installed and configured splunk db connect, but the java bridge won't start. I've installed it on other servers without any issues. I noticed the following in the jbridge.log:

2013-09-04 08:29:20,957 DEBUG Error waiting for process: Java process returned error code 1! Error: Initializing Splunk context... Environment: SplunkEnvironment{SPLUNK_HOME=/elfaprd1A/misc/splunk,SPLUNK_DB=/elfaprd1A/misc/splunk/var/lib/splunk} Configuring Log4j... Exception in thread "main" com.splunk.env.SplunkEnvironmentException: Error running InitializationTask com.splunk.dbx.sql.factory.DatabaseFactoryInitializer: com.splunk.config.crypt.SplunkEncryptionException: Error decrypting configuration value: javax.crypto.BadPaddingException: Given final block not properly padded   at com.splunk.env.SplunkContext.doStartup(SplunkContext.java:253)   at com.splunk.env.SplunkContext.initialize(SplunkContext.java:132)  at com.splunk.bridge.JavaBridgeServer.main(JavaBridgeServer.java:34) Caused by: com.splunk.config.crypt.SplunkEncryptionException: Error decrypting configuration value: javax.crypto.BadPaddingException: Given final block not properly padded    at com.splunk.config.crypt.Crypt.decrypt(Crypt.java:85)     at com.splunk.config.SplunkConfig.decryptValue(SplunkConfig.java:142)   at com.splunk.dbx.sql.Database.<init>(Database.java:79)     at com.splunk.dbx.sql.factory.DefaultDatabaseFactory.loadDatabase(DefaultDatabaseFactory.java:63)   at com.splunk.dbx.sql.factory.PersistentDatabaseFactory.preloadDatabases(PersistentDatabaseFactory.java:100)    at com.splunk.dbx.sql.factory.PersistentDatabaseFactory.<init>(PersistentDatabaseFactory.java:38)   at com.splunk.dbx.sql.factory.PooledConnectionFactory.<init>(PooledConnectionFactory.java:52)   at com.splunk.dbx.sql.Database.initializeFactory(Database.java:788)     at com.splunk.dbx.sql.Database.getFactory(Database.java:772)    at com.splunk.dbx.sql.factory.DatabaseFactoryInitializer.initialize(DatabaseFactoryInitializer.java:17)     at com.splunk.env.SplunkContext.doStartup(SplunkContext.java:251)   ... 2 more Caused by: javax.crypto.BadPaddingException: Given final block not properly padded   at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:811)  at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676)  at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:313)  at javax.crypto.Cipher.doFinal(Cipher.java:2087)    at com.splunk.config.crypt.Crypt.decrypt(Crypt.java:82)     ... 12 more 

Does anyone know what this might be telling me?

0 Karma

jcoates_splunk
Splunk Employee
Splunk Employee

Hi,

we've just released DB Connect 1.1, which can now be installed on a search head pool.

app

search head pooling docs

Thanks,
Jack

lukejadamec
Super Champion

I'm curious. Which app? What was the reference?

0 Karma

a212830
Champion

Found it. Installed an app that referenced db connect...

0 Karma

lukejadamec
Super Champion

That is very odd. My splunk home is different, but otherwise the error is identical.

Check the permissions in the dbx directory.

0 Karma

a212830
Champion

I've never made it that far - this is after installing the app and configuring the jdk location and memory settings.

0 Karma

lukejadamec
Super Champion

I saw this during a recent migration.

Your dbx/local/databases.conf file contains encrypted passwords that did not migrate/update.
To test, remove the databases.conf file and restart splunk - jbridge should start normally.
If that works, then restore the databases.conf and delete all of the encrypted passwords.
Restart Splunk and from dbconnect reset the passwords for all of your database connections.

0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...