Summary
The user is facing an error with a format specifier ‘%s’ while trying to connect MongoDB standalone as a destination. The error occurs in the MongodbDestination class of the connector.
Question
Hello, I am getting error while connecting mongodb standalone as destination. does anyone know how to fix this?.
"status": "failed",
"message": "Format specifier '%s'",
"jobInfo": {
"id": "3cd474de-9396-4210-9bf8-159ff56d02c8",
"configType": "check_connection_destination",
"configId": "Optional[8b746512-8c2e-6ac1-4adc-b59faafd473c]",
"createdAt": 1704888007106,
"endedAt": 1704888009493,
"succeeded": true,
"connectorConfigurationUpdated": false,
"logs": {
"logLines": ["2024-01-10 12:00:07 [46mplatform[0m > Docker volume job log path: /tmp/workspace/3cd474de-9396-4210-9bf8-159ff56d02c8/0/logs.log","2024-01-10 12:00:07 [46mplatform[0m > Executing worker wrapper. Airbyte version: 0.50.40","2024-01-10 12:00:07 [46mplatform[0m > Attempt 0 to save workflow id for cancellation","2024-01-10 12:00:07 [46mplatform[0m > Using default value for environment variable SIDECAR_KUBE_CPU_LIMIT: '2.0'","2024-01-10 12:00:07 [46mplatform[0m > Using default value for environment variable SOCAT_KUBE_CPU_LIMIT: '2.0'","2024-01-10 12:00:07 [46mplatform[0m > ","2024-01-10 12:00:07 [46mplatform[0m > ----- START check-orchestrator -----","2024-01-10 12:00:07 [46mplatform[0m > ","2024-01-10 12:00:07 [46mplatform[0m > Using default value for environment variable SIDECAR_KUBE_CPU_REQUEST: '0.1'","2024-01-10 12:00:07 [46mplatform[0m > Using default value for environment variable SOCAT_KUBE_CPU_REQUEST: '0.1'","2024-01-10 12:00:07 [46mplatform[0m > Using default value for environment variable LAUNCHDARKLY_KEY: ''","2024-01-10 12:00:07 [46mplatform[0m > Checking if airbyte/destination-mongodb:0.2.0 exists...","2024-01-10 12:00:07 [46mplatform[0m > airbyte/destination-mongodb:0.2.0 was found locally.","2024-01-10 12:00:07 [46mplatform[0m > Creating docker container = destination-mongodb-check-3cd474de-9396-4210-9bf8-159ff56d02c8-0-pasvk with resources io.airbyte.config.ResourceRequirements@2a80e7d8[cpuRequest=,cpuLimit=,memoryRequest=,memoryLimit=,additionalProperties={}] and allowedHosts null","2024-01-10 12:00:07 [46mplatform[0m > Preparing command: docker run --rm --init -i -w /data/3cd474de-9396-4210-9bf8-159ff56d02c8/0 --log-driver none --name destination-mongodb-check-3cd474de-9396-4210-9bf8-159ff56d02c8-0-pasvk --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= -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.40 -e WORKER_JOB_ID=3cd474de-9396-4210-9bf8-159ff56d02c8 airbyte/destination-mongodb:0.2.0 check --config source_config.json","2024-01-10 12:00:07 [46mplatform[0m > Reading messages from protocol version 0.2.0","2024-01-10 12:00:08 [46mplatform[0m > INFO i.a.i.d.m.MongodbDestination(main):63 starting destination: class io.airbyte.integrations.destination.mongodb.MongodbDestination","2024-01-10 12:00:08 [46mplatform[0m > INFO i.a.i.b.IntegrationCliParser(parseOptions):126 integration args: {check=null, config=source_config.json}","2024-01-10 12:00:08 [46mplatform[0m > INFO i.a.i.b.IntegrationRunner(runInternal):106 Running integration: io.airbyte.integrations.base.ssh.SshWrappedDestination","2024-01-10 12:00:08 [46mplatform[0m > INFO i.a.i.b.IntegrationRunner(runInternal):107 Command: CHECK","2024-01-10 12:00:08 [46mplatform[0m > INFO i.a.i.b.IntegrationRunner(runInternal):108 Integration config: IntegrationConfig{command=CHECK, configPath='source_config.json', catalogPath='null', statePath='null'}","2024-01-10 12:00:08 [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-01-10 12:00:08 [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-01-10 12:00:09 [46mplatform[0m > INFO i.a.i.b.s.SshTunnel(getInstance):204 Starting connection with method: NO_TUNNEL","2024-01-10 12:00:09 [46mplatform[0m > ERROR i.a.i.d.m.MongodbDestination(check):85 Check failed. java.util.MissingFormatArgumentException: Format specifier '%s'",
"\tat java.util.Formatter.format(Formatter.java:2688) ~[?:?]",
"\tat java.util.Formatter.format(Formatter.java:2625) ~[?:?]",
"\tat java.lang.String.format(String.java:4143) ~[?:?]",
"\tat io.airbyte.integrations.destination.mongodb.MongodbDestination.buildConnectionString(MongodbDestination.java:168) ~[io.airbyte.airbyte-integrations.connectors-destination-mongodb-24.0.2.jar:?]",
"\tat io.airbyte.integrations.destination.mongodb.MongodbDestination.getConnectionString(MongodbDestination.java:150) ~[io.airbyte.airbyte-integrations.connectors-destination-mongodb-24.0.2.jar:?]",
"\tat io.airbyte.integrations.destination.mongodb.MongodbDestination.getDatabase(MongodbDestination.java:136) ~[io.airbyte.airbyte-integrations.connectors-destination-mongodb-24.0.2.jar:?]",
"\tat io.airbyte.integrations.destination.mongodb.MongodbDestination.check(MongodbDestination.java:71) ~[io.airbyte.airbyte-integrations.connectors-destination-mongodb-24.0.2.jar:?]",
"\tat io.airbyte.integrations.base.ssh.SshTunnel.sshWrap(SshTunnel.java:270) ~[io.airbyte.airbyte-integrations.bases-base-java-24.0.2.jar:?]",
"\tat io.airbyte.integrations.base.ssh.SshWrappedDestination.check(SshWrappedDestination.java:67) ~[io.airbyte.airbyte-integrations.bases-base-java-24.0.2.jar:?]",
"\tat io.airbyte.integrations.base.IntegrationRunner.runInternal(IntegrationRunner.java:124) ~[io.airbyte.airbyte-integrations.bases-base-java-24.0.2.jar:?]",
"\tat io.airbyte.integrations.base.IntegrationRunner.run(IntegrationRunner.java:99) ~[io.airbyte.airbyte-integrations.bases-base-java-24.0.2.jar:?]",
"\tat 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'",
"\tat java.base/java.util.Formatter.format(Formatter.java:2688)",
"\tat java.base/java.util.Formatter.format(Formatter.java:2625)",
"\tat java.base/java.lang.String.format(String.java:4143)",
"\tat io.airbyte.integrations.destination.mongodb.MongodbDestination.buildConnectionString(MongodbDestination.java:168)",
"\tat io.airbyte.integrations.destination.mongodb.MongodbDestination.getConnectionString(MongodbDestination.java:150)",
"\tat io.airbyte.integrations.destination.mongodb.MongodbDestination.getDatabase(MongodbDestination.java:136)",
"\tat io.airbyte.integrations.destination.mongodb.MongodbDestination.check(MongodbDestination.java:71)",
"\tat io.airbyte.integrations.base.ssh.SshTunnel.sshWrap(SshTunnel.java:270)",
"\tat io.airbyte.integrations.base.ssh.SshWrappedDestination.check(SshWrappedDestination.java:67)",
"\tat io.airbyte.integrations.base.IntegrationRunner.runInternal(IntegrationRunner.java:124)",
"\tat io.airbyte.integrations.base.IntegrationRunner.run(IntegrationRunner.java:99)",
"\tat io.airbyte.integrations.destination.mongodb.MongodbDestination.main(MongodbDestination.java:64)",
"","2024-01-10 12:00:09 [46mplatform[0m > INFO i.a.i.b.IntegrationRunner(runInternal):197 Completed integration: io.airbyte.integrations.base.ssh.SshWrappedDestination","2024-01-10 12:00:09 [46mplatform[0m > INFO i.a.i.d.m.MongodbDestination(main):65 completed destination: class io.airbyte.integrations.destination.mongodb.MongodbDestination","2024-01-10 12:00:09 [46mplatform[0m > Check connection job received output: io.airbyte.config.StandardCheckConnectionOutput@767c1a37[status=failed,message=Format specifier '%s',additionalProperties={}]","2024-01-10 12:00:09 [46mplatform[0m > ","2024-01-10 12:00:09 [46mplatform[0m > ----- END check-orchestrator -----","2024-01-10 12:00:09 [46mplatform[0m > "
]
}
}
}```
<br>
---
This topic has been created from a Slack thread to give it more visibility.
It will be on Read-Only mode here. [Click here](https://airbytehq.slack.com/archives/C021JANJ6TY/p1704888311618799) if you want to access the original thread.
[Join the conversation on Slack](https://slack.airbyte.com)
<sub>
["error", "mongodb-connector", "destination", "format-specifier"]
</sub>