When running an app in dev mode that uses both Microcks & Mongodb, dev mode fails to start. I'm not sure if it has to do with Liquibase or not, but the exception is coming from liquibase saying it can't connect to Mongo.
16:09:27 INFO [or.mo.dr.client] (Quarkus Main Thread) MongoClient with metadata {"driver": {"name": "mongo-java-driver|sync", "version": "4.11.1"}, "os": {"type": "Darwin", "name": "Mac OS X", "architecture": "aarch64", "version": "14.3.1"}, "platform": "Java/Eclipse Adoptium/17.0.10+7"} created with settings MongoClientSettings{readPreference=primary, writeConcern=WriteConcern{w=null, wTimeout=null ms, journal=null}, retryWrites=true, retryReads=true, readConcern=ReadConcern{level=null}, credential=null, transportSettings=null, streamFactoryFactory=null, commandListeners=[], codecRegistry=ProvidersCodecRegistry{codecProviders=[ValueCodecProvider{}, BsonValueCodecProvider{}, DBRefCodecProvider{}, DBObjectCodecProvider{}, DocumentCodecProvider{}, CollectionCodecProvider{}, IterableCodecProvider{}, MapCodecProvider{}, GeoJsonCodecProvider{}, GridFSFileCodecProvider{}, Jsr310CodecProvider{}, JsonObjectCodecProvider{}, BsonCodecProvider{}, EnumCodecProvider{}, com.mongodb.client.model.mql.ExpressionCodecProvider@5c9f0f1b, com.mongodb.Jep395RecordCodecProvider@fee1cd8, com.mongodb.KotlinCodecProvider@3fbeef8d]}, loggerSettings=LoggerSettings{maxDocumentLength=1000}, clusterSettings={hosts=[mongo-secq6:27017], srvServiceName=mongodb, mode=SINGLE, requiredClusterType=UNKNOWN, requiredReplicaSetName='null', serverSelector='null', clusterListeners='[]', serverSelectionTimeout='30000 ms', localThreshold='15 ms'}, socketSettings=SocketSettings{connectTimeoutMS=10000, readTimeoutMS=0, receiveBufferSize=0, proxySettings=ProxySettings{host=null, port=null, username=null, password=null}}, heartbeatSocketSettings=SocketSettings{connectTimeoutMS=10000, readTimeoutMS=10000, receiveBufferSize=0, proxySettings=ProxySettings{host=null, port=null, username=null, password=null}}, connectionPoolSettings=ConnectionPoolSettings{maxSize=100, minSize=0, maxWaitTimeMS=120000, maxConnectionLifeTimeMS=0, maxConnectionIdleTimeMS=0, maintenanceInitialDelayMS=0, maintenanceFrequencyMS=60000, connectionPoolListeners=[], maxConnecting=2}, serverSettings=ServerSettings{heartbeatFrequencyMS=10000, minHeartbeatFrequencyMS=500, serverListeners='[]', serverMonitorListeners='[]'}, sslSettings=SslSettings{enabled=false, invalidHostNameAllowed=false, context=null}, applicationName='null', compressorList=[], uuidRepresentation=UNSPECIFIED, serverApi=null, autoEncryptionSettings=null, dnsClient=null, inetAddressResolver=null, contextProvider=null}
16:09:27 INFO [or.mo.dr.cluster] (cluster-ClusterId{value='65d9098794916f7ab4eea6bb', description='null'}-mongo-secq6:27017) Exception in monitor thread while connecting to server mongo-secq6:27017: com.mongodb.MongoSocketException: mongo-secq6: nodename nor servname provided, or not known
at com.mongodb.ServerAddress.getSocketAddresses(ServerAddress.java:221)
at com.mongodb.internal.connection.ServerAddressWithResolver.getSocketAddresses(ServerAddressWithResolver.java:68)
at com.mongodb.internal.connection.SocketStream.initializeSocket(SocketStream.java:100)
at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:78)
at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:211)
at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.lookupServerDescription(DefaultServerMonitor.java:196)
at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:156)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.net.UnknownHostException: mongo-secq6: nodename nor servname provided, or not known
at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:934)
at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1543)
at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:852)
at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1533)
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1385)
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1306)
at com.mongodb.ServerAddress.getSocketAddresses(ServerAddress.java:213)
... 7 more
16:09:27 INFO [or.mo.dr.cluster] (Quarkus Main Thread) No server chosen by ReadPreferenceServerSelector{readPreference=primary} from cluster description ClusterDescription{type=UNKNOWN, connectionMode=SINGLE, serverDescriptions=[ServerDescription{address=mongo-secq6:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketException: mongo-secq6: nodename nor servname provided, or not known}, caused by {java.net.UnknownHostException: mongo-secq6: nodename nor servname provided, or not known}}]}. Waiting for 30000 ms before timing out
16:09:28 INFO [or.mo.dr.cluster] (cluster-ClusterId{value='65d9098794916f7ab4eea6bb', description='null'}-mongo-secq6:27017) Exception in monitor thread while connecting to server mongo-secq6:27017: com.mongodb.MongoSocketException: mongo-secq6
at com.mongodb.ServerAddress.getSocketAddresses(ServerAddress.java:221)
at com.mongodb.internal.connection.ServerAddressWithResolver.getSocketAddresses(ServerAddressWithResolver.java:68)
at com.mongodb.internal.connection.SocketStream.initializeSocket(SocketStream.java:100)
at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:78)
at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:211)
at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.lookupServerDescription(DefaultServerMonitor.java:196)
at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:156)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.net.UnknownHostException: mongo-secq6
at java.base/java.net.InetAddress$CachedAddresses.get(InetAddress.java:801)
at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1533)
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1385)
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1306)
at com.mongodb.ServerAddress.getSocketAddresses(ServerAddress.java:213)
... 7 more
16:09:57 INFO [li.command] (Quarkus Main Thread) Logging exception.
ERROR: Exception Details
ERROR: Exception Primary Class: MongoTimeoutException
ERROR: Exception Primary Reason: Timed out after 30000 ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=mongo-secq6:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketException: mongo-secq6}, caused by {java.net.UnknownHostException: mongo-secq6}}]
ERROR: Exception Primary Source: MongoDB 0
16:09:57 INFO [li.command] (Quarkus Main Thread) Command execution complete
16:09:57 ERROR [io.qu.ru.Application] (Quarkus Main Thread) Failed to start application (with profile [dev]): java.lang.RuntimeException: Failed to start quarkus
at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
at io.quarkus.runtime.Application.start(Application.java:101)
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:111)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
at io.quarkus.runtime.Quarkus.run(Quarkus.java:124)
at io.quarkus.runner.GeneratedMain.main(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.quarkus.runner.bootstrap.StartupActionImpl$1.run(StartupActionImpl.java:113)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.IllegalStateException: Error starting Liquibase
at io.quarkus.liquibase.mongodb.runtime.LiquibaseMongodbRecorder.doStartActions(LiquibaseMongodbRecorder.java:73)
at io.quarkus.deployment.steps.LiquibaseMongodbProcessor$startLiquibase1767457900.deploy_0(Unknown Source)
at io.quarkus.deployment.steps.LiquibaseMongodbProcessor$startLiquibase1767457900.deploy(Unknown Source)
... 13 more
Caused by: liquibase.exception.CommandExecutionException: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: Could not query for long
at liquibase.command.CommandScope.execute(CommandScope.java:253)
at liquibase.Liquibase.lambda$validate$25(Liquibase.java:1352)
at liquibase.Scope.lambda$child$0(Scope.java:186)
at liquibase.Scope.child(Scope.java:195)
at liquibase.Scope.child(Scope.java:185)
at liquibase.Scope.child(Scope.java:164)
at liquibase.Liquibase.runInScope(Liquibase.java:1419)
at liquibase.Liquibase.validate(Liquibase.java:1347)
at io.quarkus.liquibase.mongodb.runtime.LiquibaseMongodbRecorder.doStartActions(LiquibaseMongodbRecorder.java:63)
... 15 more
Caused by: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: Could not query for long
at liquibase.nosql.changelog.AbstractNoSqlHistoryService.hasDatabaseChangeLogTable(AbstractNoSqlHistoryService.java:145)
at liquibase.nosql.changelog.AbstractNoSqlHistoryService.init(AbstractNoSqlHistoryService.java:120)
at liquibase.command.core.helpers.DatabaseChangelogCommandStep.checkLiquibaseTables(DatabaseChangelogCommandStep.java:141)
at liquibase.command.core.helpers.DatabaseChangelogCommandStep.run(DatabaseChangelogCommandStep.java:91)
at liquibase.command.CommandScope.execute(CommandScope.java:217)
... 23 more
Caused by: liquibase.exception.DatabaseException: Could not query for long
at liquibase.nosql.executor.NoSqlExecutor.queryForLong(NoSqlExecutor.java:117)
at liquibase.nosql.executor.NoSqlExecutor.queryForLong(NoSqlExecutor.java:108)
at liquibase.ext.mongodb.changelog.MongoHistoryService.existsRepository(MongoHistoryService.java:97)
at liquibase.nosql.changelog.AbstractNoSqlHistoryService.hasDatabaseChangeLogTable(AbstractNoSqlHistoryService.java:143)
... 27 more
Caused by: com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=mongo-secq6:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketException: mongo-secq6}, caused by {java.net.UnknownHostException: mongo-secq6}}]
at com.mongodb.internal.connection.BaseCluster.createTimeoutException(BaseCluster.java:380)
at com.mongodb.internal.connection.BaseCluster.selectServer(BaseCluster.java:125)
at com.mongodb.internal.connection.SingleServerCluster.selectServer(SingleServerCluster.java:46)
at com.mongodb.internal.binding.ClusterBinding.getReadConnectionSource(ClusterBinding.java:116)
at com.mongodb.client.internal.ClientSessionBinding.getConnectionSource(ClientSessionBinding.java:128)
at com.mongodb.client.internal.ClientSessionBinding.getReadConnectionSource(ClientSessionBinding.java:92)
at com.mongodb.internal.operation.SyncOperationHelper.withSuppliedResource(SyncOperationHelper.java:144)
at com.mongodb.internal.operation.SyncOperationHelper.withSourceAndConnection(SyncOperationHelper.java:125)
at com.mongodb.internal.operation.SyncOperationHelper.lambda$executeRetryableRead$4(SyncOperationHelper.java:189)
at com.mongodb.internal.operation.SyncOperationHelper.lambda$decorateReadWithRetries$12(SyncOperationHelper.java:292)
at com.mongodb.internal.async.function.RetryingSyncSupplier.get(RetryingSyncSupplier.java:67)
at com.mongodb.internal.operation.SyncOperationHelper.executeRetryableRead(SyncOperationHelper.java:194)
at com.mongodb.internal.operation.SyncOperationHelper.executeRetryableRead(SyncOperationHelper.java:176)
at com.mongodb.internal.operation.CommandReadOperation.execute(CommandReadOperation.java:48)
at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.execute(MongoClientDelegate.java:153)
at com.mongodb.client.internal.MongoDatabaseImpl.executeCommand(MongoDatabaseImpl.java:196)
at com.mongodb.client.internal.MongoDatabaseImpl.runCommand(MongoDatabaseImpl.java:165)
at com.mongodb.client.internal.MongoDatabaseImpl.runCommand(MongoDatabaseImpl.java:160)
at com.mongodb.client.internal.MongoDatabaseImpl.runCommand(MongoDatabaseImpl.java:150)
at liquibase.ext.mongodb.statement.AbstractRunCommandStatement.run(AbstractRunCommandStatement.java:59)
at liquibase.ext.mongodb.statement.AbstractRunCommandStatement.run(AbstractRunCommandStatement.java:55)
at liquibase.ext.mongodb.statement.ListCollectionNamesStatement.queryForList(ListCollectionNamesStatement.java:79)
at liquibase.ext.mongodb.statement.CountCollectionByNameStatement.queryForLong(CountCollectionByNameStatement.java:44)
at liquibase.ext.mongodb.statement.CountCollectionByNameStatement.queryForLong(CountCollectionByNameStatement.java:33)
at liquibase.nosql.executor.NoSqlExecutor.queryForLong(NoSqlExecutor.java:115)
... 30 more
16:09:58 INFO [io.qu.de.de.IsolatedDevModeMain] (main) Attempting to start live reload endpoint to recover from previous Quarkus startup failure