Hi,
I have a free tier cluster created in mongo atlas and allowing connections from anywhere 0.0.0.0/0, and I’m using github action runners located in a kubernetes cluster behind a proxy, the proxy is allowing the connection to the cluster, but I’m still getting the time out error.
I’m using liquibase mongodb extention to connect to the cluster, but I get the following error:
Connection string: mongodb://cluster0-shard-00-00.u0e2h.mongodb.net:27017,cluster0-shard-00-01.u0e2h.mongodb.net:27017,cluster0-shard-00-02.u0e2h.mongodb.net:27017/sample_mflix?ssl=true&authSource=admin&readPreference=secondaryPreferred&retryWrites=false&replicaSet=Cluster0-shard-0&appName=Cluster0&proxyHost=myproxy.com&proxyPort=8080
Error:
- Caused by: Timed out while waiting for a server that matches ReadPreferenceServerSelector{readPreference=ReadPreference{name=secondaryPreferred, hedgeOptions=null}}. Client view of cluster state is {type=REPLICA_SET, servers=[{address=cluster0-shard-00-00.u0e2h.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.SocketTimeoutException: Read timed out}}, {address=cluster0-shard-00-01.u0e2h.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.SocketTimeoutException: Read timed out}}, {address=cluster0-shard-00-02.u0e2h.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.SocketTimeoutException: Read timed out}}]
liquibase.exception.CommandExecutionException: liquibase.exception.DatabaseException: Could not query for list
at liquibase.command.CommandScope.execute(CommandScope.java:179)
at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:51)
at liquibase.integration.commandline.CommandRunner.call(CommandRunner.java:21)
at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
at picocli.CommandLine.execute(CommandLine.java:2078)
at liquibase.integration.commandline.LiquibaseCommandLine.lambda$execute$1(LiquibaseCommandLine.java:353)
at liquibase.Scope.child(Scope.java:189)
at liquibase.Scope.child(Scope.java:165)
at liquibase.integration.commandline.LiquibaseCommandLine.execute(LiquibaseCommandLine.java:318)
at liquibase.integration.commandline.LiquibaseCommandLine.main(LiquibaseCommandLine.java:84)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at liquibase.integration.commandline.LiquibaseLauncher.main(LiquibaseLauncher.java:107)
Caused by: liquibase.exception.DatabaseException: Could not query for list
at liquibase.nosql.executor.NoSqlExecutor.queryForList(NoSqlExecutor.java:145)
at liquibase.nosql.executor.NoSqlExecutor.queryForList(NoSqlExecutor.java:135)
at liquibase.ext.mongodb.changelog.MongoHistoryService.queryRanChangeSets(MongoHistoryService.java:138)
at liquibase.nosql.changelog.AbstractNoSqlHistoryService.getRanChangeSets(AbstractNoSqlHistoryService.java:158)
at liquibase.database.AbstractJdbcDatabase.getRanChangeSetList(AbstractJdbcDatabase.java:1152)
at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:308)
at liquibase.changelog.DatabaseChangeLog.validate(DatabaseChangeLog.java:293)
at liquibase.Liquibase.validate(Liquibase.java:2291)
at liquibase.integration.commandline.Main.doMigration(Main.java:1820)
at liquibase.integration.commandline.Main$1.lambda$run$0(Main.java:397)
at liquibase.Scope.lambda$child$0(Scope.java:180)
at liquibase.Scope.child(Scope.java:189)
at liquibase.Scope.child(Scope.java:179)
at liquibase.Scope.child(Scope.java:158)
at liquibase.integration.commandline.Main$1.run(Main.java:396)
at liquibase.integration.commandline.Main$1.run(Main.java:218)
at liquibase.Scope.child(Scope.java:189)
at liquibase.Scope.child(Scope.java:165)
at liquibase.integration.commandline.Main.run(Main.java:218)
at liquibase.command.AbstractCliWrapperCommandStep.run(AbstractCliWrapperCommandStep.java:33)
at liquibase.command.CommandScope.execute(CommandScope.java:173)
... 20 more
When I make a curl to the cluster using the proxy, I get 504 Gateway timeout.
Does anyone had the same problem? and knows how to solve this problem?
Thanks in advance.