Skip to content

Cannot connect oracledb_exporter v1.6.1 to Oracle database with new variable format (ORA-01017) #244

Closed
@swanez

Description

@swanez

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! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions