iamseth / oracledb_exporter

Prometheus Oracle database exporter.
MIT License
490 stars 236 forks source link

missing port in address,DATA_SOURCE_NAME=oracle://username:passwd@ip address:1521/server_name #363

Open Liangyuesan opened 1 year ago

Liangyuesan commented 1 year ago

My oracle version 19.3 i have error "missing port in address" my Data_source_name is export DATA_SOURCE_NAME=oracle://username:passwd@ip address:1521/server_name what's the problemn?

help me help me help me

Liangyuesan commented 1 year ago

sqlplus username:passwd@ip address:1521/server_name is ok

Liangyuesan commented 1 year ago

the oracledb_exporter version is Release 0.5.1 help me man

suvendunayak commented 1 year ago

I have too similar problem, I am using pre compiled Linux version of it.

export DATA_SOURCE_NAME=oracle://system:Password#123@DBHostname:1525/ORCL

ts=2023-08-24T16:08:32.017Z caller=tls_config.go:274 level=info msg="Listening on" address=[::]:9161 ts=2023-08-24T16:08:32.017Z caller=tls_config.go:277 level=info msg="TLS is disabled." http2=false address=[::]:9161 ts=2023-08-24T16:08:32.500Z caller=collector.go:262 level=error Errorpingingoracle:="parse \"oracle://system:Password\": invalid port \":Password\" after host" ts=2023-08-24T16:08:47.497Z caller=collector.go:262 level=error Errorpingingoracle:="parse \"oracle://system:Password\": invalid port \":Password\" after host" ts=2023-08-24T16:09:02.496Z caller=collector.go:262 level=error Errorpingingoracle:="parse \"oracle://system:Password\": invalid port \":Password\" after host"

towo commented 1 year ago

Same as I'm seeing, it appears to be parsing # as a comment. @Liangyuesan, did you also have a # in the string?

towo commented 1 year ago

Yeah, probably a dupe of #352

suvendunayak commented 1 year ago

The behavior is same for other users without # as well.

saurabh-m-w commented 9 months ago

Hi, is there any update on this issue, or any workaround, we are also facing similar issue logs are below


ts=2024-02-08T11:13:09.682Z caller=collector.go:262 level=error Errorpingingoracle:="missing port in address" 
ts=2024-02-08T11:14:09.6842 caller=collector.go:262 level=error Errorpingingoracle:="missing port in address"
DATA_SOURCE_NAME=oracle://user:password%23123@hostname:1523/service_name

Password contains # which is replaced with %23

We are using latest version 0.5.2 of oracledb exporter Linux version of node Linux Red Hat 8.9 oracledo up metrices value coming as 0.

Same setup is working for Rhel 7 version nodes Observed that it’s giving issues for Rhel 8 nodes only