The leading data integration platform for ETL / ELT data pipelines from APIs, databases & files to data warehouses, data lakes & data lakehouses. Both self-hosted and Cloud-hosted.
We are getting Configuration check failed: Format specifier '%s' error for MongoDB standalone instance and for replica set.
Part with error looks ok.
MongoUtils.MONGODB_REPLICA_URL has 3 placeholders and 3 variables set in append.
case REPLICA -> {
connectionStrBuilder.append(
String.format(MongoUtils.MONGODB_REPLICA_URL,
credentials,
instanceConfig.get(MongoUtils.SERVER_ADDRESSES).asText(),
config.get(JdbcUtils.DATABASE_KEY).asText()));
if (instanceConfig.has(MongoUtils.REPLICA_SET)) {
connectionStrBuilder.append(String.format("&replicaSet=%s", instanceConfig.get(MongoUtils.REPLICA_SET).asText()));
}
}
Relevant log output
2024-02-20 11:18:44 [46mplatform[0m > Docker volume job log path: /tmp/workspace/9c0108e9-06bf-4616-bef1-19e26d3ac792/0/logs.log
2024-02-20 11:18:44 [46mplatform[0m > Executing worker wrapper. Airbyte version: 0.50.45
2024-02-20 11:18:44 [46mplatform[0m > Attempt 0 to save workflow id for cancellation
2024-02-20 11:18:44 [46mplatform[0m >
2024-02-20 11:18:44 [46mplatform[0m > Using default value for environment variable SIDECAR_KUBE_CPU_LIMIT: '2.0'
2024-02-20 11:18:44 [46mplatform[0m > ----- START CHECK -----
2024-02-20 11:18:44 [46mplatform[0m >
2024-02-20 11:18:44 [46mplatform[0m > Using default value for environment variable SOCAT_KUBE_CPU_LIMIT: '2.0'
2024-02-20 11:18:44 [46mplatform[0m > Using default value for environment variable SIDECAR_KUBE_CPU_REQUEST: '0.1'
2024-02-20 11:18:44 [46mplatform[0m > Using default value for environment variable SOCAT_KUBE_CPU_REQUEST: '0.1'
2024-02-20 11:18:44 [46mplatform[0m > Using default value for environment variable LAUNCHDARKLY_KEY: ''
2024-02-20 11:18:44 [46mplatform[0m > Checking if airbyte/destination-mongodb:0.2.0 exists...
2024-02-20 11:18:44 [46mplatform[0m > airbyte/destination-mongodb:0.2.0 was found locally.
2024-02-20 11:18:44 [46mplatform[0m > Creating docker container = destination-mongodb-check-9c0108e9-06bf-4616-bef1-19e26d3ac792-0-sbeix with resources io.airbyte.config.ResourceRequirements@44d17502[cpuRequest=,cpuLimit=,memoryRequest=,memoryLimit=,additionalProperties={}] and allowedHosts null
2024-02-20 11:18:44 [46mplatform[0m > Preparing command: docker run --rm --init -i -w /data/9c0108e9-06bf-4616-bef1-19e26d3ac792/0 --log-driver none --name destination-mongodb-check-9c0108e9-06bf-4616-bef1-19e26d3ac792-0-sbeix --network host -v airbyte_workspace:/data -v /tmp/airbyte_local:/local -e DEPLOYMENT_MODE=OSS -e WORKER_CONNECTOR_IMAGE=airbyte/destination-mongodb:0.2.0 -e AUTO_DETECT_SCHEMA=true -e LAUNCHDARKLY_KEY= -e SOCAT_KUBE_CPU_REQUEST=0.1 -e SOCAT_KUBE_CPU_LIMIT=2.0 -e FIELD_SELECTION_WORKSPACES= -e USE_STREAM_CAPABLE_STATE=true -e AIRBYTE_ROLE=dev -e WORKER_ENVIRONMENT=DOCKER -e APPLY_FIELD_SELECTION=false -e WORKER_JOB_ATTEMPT=0 -e OTEL_COLLECTOR_ENDPOINT=http://host.docker.internal:4317 -e FEATURE_FLAG_CLIENT=config -e AIRBYTE_VERSION=0.50.45 -e WORKER_JOB_ID=9c0108e9-06bf-4616-bef1-19e26d3ac792 airbyte/destination-mongodb:0.2.0 check --config source_config.json
2024-02-20 11:18:44 [46mplatform[0m > Reading messages from protocol version 0.2.0
2024-02-20 11:18:45 [46mplatform[0m > INFO i.a.i.d.m.MongodbDestination(main):63 starting destination: class io.airbyte.integrations.destination.mongodb.MongodbDestination
2024-02-20 11:18:45 [46mplatform[0m > INFO i.a.i.b.IntegrationCliParser(parseOptions):126 integration args: {check=null, config=source_config.json}
2024-02-20 11:18:45 [46mplatform[0m > INFO i.a.i.b.IntegrationRunner(runInternal):106 Running integration: io.airbyte.integrations.base.ssh.SshWrappedDestination
2024-02-20 11:18:45 [46mplatform[0m > INFO i.a.i.b.IntegrationRunner(runInternal):107 Command: CHECK
2024-02-20 11:18:45 [46mplatform[0m > INFO i.a.i.b.IntegrationRunner(runInternal):108 Integration config: IntegrationConfig{command=CHECK, configPath='source_config.json', catalogPath='null', statePath='null'}
2024-02-20 11:18:45 [46mplatform[0m > WARN c.n.s.JsonMetaSchema(newValidator):278 Unknown keyword order - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword
2024-02-20 11:18:45 [46mplatform[0m > WARN c.n.s.JsonMetaSchema(newValidator):278 Unknown keyword airbyte_secret - you should define your own Meta Schema. If the keyword is irrelevant for validation, just use a NonValidationKeyword
2024-02-20 11:18:45 [46mplatform[0m > INFO i.a.i.b.s.SshTunnel(getInstance):204 Starting connection with method: NO_TUNNEL
2024-02-20 11:18:45 [46mplatform[0m > ERROR i.a.i.d.m.MongodbDestination(check):85 Check failed. java.util.MissingFormatArgumentException: Format specifier '%s'
at java.util.Formatter.format(Formatter.java:2688) ~[?:?]
at java.util.Formatter.format(Formatter.java:2625) ~[?:?]
at java.lang.String.format(String.java:4143) ~[?:?]
at io.airbyte.integrations.destination.mongodb.MongodbDestination.buildConnectionString(MongodbDestination.java:174) ~[io.airbyte.airbyte-integrations.connectors-destination-mongodb-24.0.2.jar:?]
at io.airbyte.integrations.destination.mongodb.MongodbDestination.getConnectionString(MongodbDestination.java:150) ~[io.airbyte.airbyte-integrations.connectors-destination-mongodb-24.0.2.jar:?]
at io.airbyte.integrations.destination.mongodb.MongodbDestination.getDatabase(MongodbDestination.java:136) ~[io.airbyte.airbyte-integrations.connectors-destination-mongodb-24.0.2.jar:?]
at io.airbyte.integrations.destination.mongodb.MongodbDestination.check(MongodbDestination.java:71) ~[io.airbyte.airbyte-integrations.connectors-destination-mongodb-24.0.2.jar:?]
at io.airbyte.integrations.base.ssh.SshTunnel.sshWrap(SshTunnel.java:270) ~[io.airbyte.airbyte-integrations.bases-base-java-24.0.2.jar:?]
at io.airbyte.integrations.base.ssh.SshWrappedDestination.check(SshWrappedDestination.java:67) ~[io.airbyte.airbyte-integrations.bases-base-java-24.0.2.jar:?]
at io.airbyte.integrations.base.IntegrationRunner.runInternal(IntegrationRunner.java:124) ~[io.airbyte.airbyte-integrations.bases-base-java-24.0.2.jar:?]
at io.airbyte.integrations.base.IntegrationRunner.run(IntegrationRunner.java:99) ~[io.airbyte.airbyte-integrations.bases-base-java-24.0.2.jar:?]
at io.airbyte.integrations.destination.mongodb.MongodbDestination.main(MongodbDestination.java:64) ~[io.airbyte.airbyte-integrations.connectors-destination-mongodb-24.0.2.jar:?]
Stack Trace: java.util.MissingFormatArgumentException: Format specifier '%s'
at java.base/java.util.Formatter.format(Formatter.java:2688)
at java.base/java.util.Formatter.format(Formatter.java:2625)
at java.base/java.lang.String.format(String.java:4143)
at io.airbyte.integrations.destination.mongodb.MongodbDestination.buildConnectionString(MongodbDestination.java:174)
at io.airbyte.integrations.destination.mongodb.MongodbDestination.getConnectionString(MongodbDestination.java:150)
at io.airbyte.integrations.destination.mongodb.MongodbDestination.getDatabase(MongodbDestination.java:136)
at io.airbyte.integrations.destination.mongodb.MongodbDestination.check(MongodbDestination.java:71)
at io.airbyte.integrations.base.ssh.SshTunnel.sshWrap(SshTunnel.java:270)
at io.airbyte.integrations.base.ssh.SshWrappedDestination.check(SshWrappedDestination.java:67)
at io.airbyte.integrations.base.IntegrationRunner.runInternal(IntegrationRunner.java:124)
at io.airbyte.integrations.base.IntegrationRunner.run(IntegrationRunner.java:99)
at io.airbyte.integrations.destination.mongodb.MongodbDestination.main(MongodbDestination.java:64)
2024-02-20 11:18:45 [46mplatform[0m > INFO i.a.i.b.IntegrationRunner(runInternal):197 Completed integration: io.airbyte.integrations.base.ssh.SshWrappedDestination
2024-02-20 11:18:45 [46mplatform[0m > INFO i.a.i.d.m.MongodbDestination(main):65 completed destination: class io.airbyte.integrations.destination.mongodb.MongodbDestination
2024-02-20 11:18:45 [46mplatform[0m > Check connection job received output: io.airbyte.config.StandardCheckConnectionOutput@23fe479b[status=failed,message=Format specifier '%s',additionalProperties={}]
2024-02-20 11:18:45 [46mplatform[0m >
2024-02-20 11:18:45 [46mplatform[0m > ----- END CHECK -----
2024-02-20 11:18:45 [46mplatform[0m >
There is a woraround - If you use destination -mongodb v 0.1.9.
Go to Settings -> Workspace -> Destinations and use the Change button to change the version.
I've confirmed that v0.1.9 works
Connector Name
destination-mongodb
Connector Version
0.50.45
What step the error happened?
Configuring a new connector
Relevant information
We are getting
Configuration check failed: Format specifier '%s'
error for MongoDB standalone instance and for replica set.Part with error looks ok. MongoUtils.MONGODB_REPLICA_URL has 3 placeholders and 3 variables set in append.
Relevant log output
Contribute