Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors in health check when try to check connection to Oracle DB #566

Open
agrok opened this issue Dec 15, 2023 · 2 comments
Open

Errors in health check when try to check connection to Oracle DB #566

agrok opened this issue Dec 15, 2023 · 2 comments

Comments

@agrok
Copy link

agrok commented Dec 15, 2023

Expected Behavior

No errors

Actual Behaviour

11:18:48.665 [scheduled-executor-thread-2] DEBUG i.m.m.h.monitor.HealthMonitorTask - Starting health monitor check
11:18:48.668 [parallel-1] DEBUG io.r2dbc.pool.ConnectionPool - Obtaining new connection from the pool
11:18:52.970 [ForkJoinPool.commonPool-worker-2] ERROR reactor.core.publisher.Operators - Operator called default onErrorDropped
reactor.core.Exceptions$StaticThrowable: Operator has been terminated
11:18:52.971 [ForkJoinPool.commonPool-worker-2] ERROR reactor.core.publisher.Operators - Operator called default onErrorDropped
reactor.core.Exceptions$StaticThrowable: Operator has been terminated
11:18:52.971 [ForkJoinPool.commonPool-worker-2] DEBUG io.r2dbc.pool.PooledConnection - Releasing connection

Steps To Reproduce

start app
wait 1 min when health check triggered

Environment Information

micronaut 4.1.2
Oracle DB
java 17.0.9 2023-10-17 LTS
Java(TM) SE Runtime Environment Oracle GraalVM 17.0.9+11.1 (build 17.0.9+11-LTS-jvmci-23.0-b21)

Example Application

No response

Version

4.1.2

@agrok
Copy link
Author

agrok commented Dec 15, 2023

I did some investigations

it happens in R2dbcHealthIndicator.class getResult() method.
https://github.com/micronaut-projects/micronaut-r2dbc/blob/master/r2dbc-core/src/main/java/io/micronaut/r2dbc/health/R2dbcHealthIndicator.java#L77

how it works:

  1. establish connection
  2. execute query
  3. extracting query result.

those steps works well, but once it try to create mono from Map it logs error.

changing Mono.fromDirect() to Mono.from() solve the problem.

@agrok
Copy link
Author

agrok commented Dec 15, 2023

here are dependencies I use

  <dependency>
      <groupId>io.micronaut.data</groupId>
      <artifactId>micronaut-data-r2dbc</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.oracle.database.r2dbc</groupId>
      <artifactId>oracle-r2dbc</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.r2dbc</groupId>
      <artifactId>r2dbc-pool</artifactId>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>io.micronaut.flyway</groupId>
      <artifactId>micronaut-flyway</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.flywaydb</groupId>
      <artifactId>flyway-database-oracle</artifactId>
      <scope>compile</scope>
    </dependency>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant