Hi,
I have install mongosqld in debian
My current and running DB is having at digital ocean. we use to connect mongodb using connecting string URL like mongo compass or from ubuntu CLI from there we able to access DB live.
Now using connecting string uri. I want to connect using bi - connector
im getting error when i execute this command
mongosqld --config mongotest.conf
after i execute i got below error
tail -f /var/log/mongodb/mongosqld.log
RTT: 0, Last error: connection() error occured during connection handshake: dial tcp: lookup db-mongo.ondigitalocean.com on 8.8.8.8:53: no such host }, ] }
2024-09-25T15:38:50.471+0000 I SCHEMA [manager] attempting to initialize schema
2024-09-25T15:38:50.472+0000 I SCHEMA [manager] fetching stored schema with name "mySchema"
2024-09-25T15:38:55.472+0000 W SCHEMA [manager] error initializing schema: unable to execute command: server selection error: context deadline exceeded, current topology: { Type: ReplicaSetNoPrimary, Servers: [{ Addr: db-mongo.ondigitalocean.com:27017, Type: Unknown, Average RTT: 0, Last error: connection() error occured during connection handshake: dial tcp: lookup db-mongo.ondigitalocean.com on 8.8.8.8:53: no such host }, ] }
2024-09-25T15:39:00.473+0000 I SCHEMA [manager] attempting to initialize schema
2024-09-25T15:39:00.473+0000 I SCHEMA [manager] fetching stored schema with name "mySchema"
2024-09-25T15:39:05.474+0000 W SCHEMA [manager] error initializing schema: unable to execute command: server selection error: context deadline exceeded, current topology: { Type: ReplicaSetNoPrimary, Servers: [{ Addr: db-mongo.ondigitalocean.com:27017, Type: Unknown, Average RTT: 0, Last error: connection() error occured during connection handshake: dial tcp: lookup db-mongo.ondigitalocean.com on 8.8.8.8:53: no such host }, ] }
here is the mongotest.conf
# https://docs.mongodb.com/bi-connector/master/reference/mongosqld/#network-options
net:
bindIp: "0.0.0.0" # To bind to multiple IP addresses, enter a list of comma separated values.
port: "3307"
# unixDomainSocket:
# enabled: false
# pathPrefix: "/var"
# filePermissions: "0600"
#ssl:
# mode: "requireSSL"
# allowInvalidCertificates: false
# PEMKeyFile: <string>
# PEMKeyPassword: <string>
# CAFile: <string>
# minimumTLSVersion: TLS1_1
## MongoDB options - configure how mongosqld should connect to your MongoDB cluster.
## https://docs.mongodb.com/bi-connector/master/reference/mongosqld/#mongodb-host-options
mongodb:
# versionCompatibility: <string>
net:
uri: "mongodb://db-mongo.ondigitalocean.com:27017/?tls=true&replicaSet=db-mongodb-test" # https://docs.mongodb.com/manual/reference/connection-string/#mongodb-uri
ssl:
enabled: true
## https://docs.mongodb.com/bi-connector/master/reference/mongosqld/#mongodb-tls-ssl-options
# allowInvalidCertificates: false
# allowInvalidHostnames: false
# PEMKeyFile: <string>
# PEMKeyPassword: <string>
# CAFile: <string>
# CRLFile: <string>
# FIPSMode: false
# minimumTLSVersion: TLSv1_1
auth:
username: axxxxxxxx
password: 7xxxxxxxxxx
source: wexxxxx # This is the name of the database to authenticate against.
# mechanism: SCRAM-SHA-1
# gssapiServiceName: mongodb
# Security options - configure mongosqld's authentication (disabled by default).
## Enable security options if your MongoDB cluster requires authentication.
## https://docs.mongodb.com/bi-connector/master/reference/mongosqld/#security-options
security:
enabled: true
# defaultMechanism: "SCRAM-SHA-1"
# defaultSource: "admin"
# gssapi:
# hostname: <string>
# serviceName: "mongosql"
## Logging options
## https://docs.mongodb.com/bi-connector/master/reference/mongosqld/#logging-options
systemLog:
## The path to the file where log output will be written to.
## Defaults to stderr.
path: '/var/log/mongodb/mongosqld.log'
quiet: false
## 0|1|2 - Verbosity of the log output, this is overridden if `quiet` is true.
verbosity: 1
logAppend: true
logRotate: "rename" # "rename"|"reopen"
## Schema options
## These configuration options define how the mongosqld should sample your MongoDB
## data so that it can be used by the relational application.
## https://docs.mongodb.com/bi-connector/master/reference/mongosqld/#data-sampling-options
schema:
## If you've generated a DRDL schema file using mongodrdl, you can supply the
## path for mongosqld to use that schema DRDL file.
# path: <string>
# maxVarcharLength: <integer>
## Use the `refreshIntervalSecs` option to specify an interval in seconds for
## mongosqld to update its schema, either by resampling or by re-reading from
## the schema source. The default value for this option is 0, which means that
## mongosqld does not automatically refresh the schema after it is
## initialized.
refreshIntervalSecs: 0
stored:
mode: "custom" # "auto"|"custom"
source: "mongosqld_data" # the database where schemas are stored in stored-schema modes
name: "mySchema" # the named schema to read/write to in stored-schema modes
sample:
size: 1000 # The amount of random documents we sample from each collection.
namespaces: ["*.*"]
# prejoin: false
# uuidSubtype3Encoding: "old" # <[old|csharp|java]>
## Process management options
## https://docs.mongodb.com/bi-connector/master/reference/mongosqld/#process-management-options
processManagement:
service:
name: "mongosql"
displayName: "MongoSQL Service"
description: "MongoSQL accesses MongoDB data with SQL"
## Runtime options
## https://docs.mongodb.com/bi-connector/master/reference/mongosqld/#runtime-options
# runtime:
# memory:
# ## A value of `0` indicates there is no enforced maximum.
# maxPerStage: 0
# maxPerServer: 0
# maxPerConnection: 0
please tell me where im wrong