Description
Hello,
I'm facing an issue where the oracledb_exporter v1.6.1 fails to connect to Oracle database when using the new environment variable configuration format:
- DB_USERNAME
- DB_PASSWORD
- DB_CONNECT_STRING
The connection works fine with the previous version (v0.6.0) using the legacy DATA_SOURCE_NAME variable.
First, I thought the issue might be related to the username containing an underscore in it (oracledb_exporter), however thats not the case. A new DB user has been created as oracledbexporternew, password does not contain any special characters, but connection still fails.
Also the legacy version authenticating with the user having "_" in it, just using the DATA_SOURCE_NAME format.
The users can reach the database it has been tested out properly.
Error message received:
oracledb_exporter[1530382]: time=2025-05-22T20:13:06.081Z level=ERROR source=collector.go:230 msg="Error pinging oracle" error="user=\"\" standalone params={authMode:0 connectionClass:<nil> connectionClassLength:0 purity:0 newPassword:<nil> newPasswordLength:0 appContext:<nil> numAppContext:0 externalAuth:0 externalHandle:<nil> pool:<nil> tag:<nil> tagLength:0 matchAnyTag:0 outTag:<nil> outTagLength:0 outTagFound:0 shardingKeyColumns:<nil> numShardingKeyColumns:0 superShardingKeyColumns:<nil> numSuperShardingKeyColumns:0 outNewSession:0}: ORA-01017: invalid username/password; logon denied"
Has anyone else faced this issue or found a workaround?
Thanks a lot in advance! :)