smallrye-health | : microprofile-health : https : //github | Microservice library
kandi X-RAY | smallrye-health Summary
kandi X-RAY | smallrye-health Summary
SmallRye Health is an implementation of Eclipse MicroProfile Health.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Returns the health check response
- Add the status to the responseBuilder
- Handles a health check response
- Serialize the health check response response
- Perform the health check
- Call the health check method
- Performs a health check
- Handles a failure response
- Write health health
- Compares two SmallRyeHealthHealth objects
- Removes a check with the given ID
smallrye-health Key Features
smallrye-health Examples and Code Snippets
Community Discussions
Trending Discussions on smallrye-health
QUESTION
I am trying to use the RestResponse
object from org.jboss.resteasy.reactive
on the return of my application resources since the javax.ws.rs.core.Response
doesn't provide the generic type.
I am getting the error when I call this endpoint:
...ANSWER
Answered 2021-Dec-06 at 16:19I just solved the problem... It was the order of dependecies. I switched quarkus-resteasy-reactive
to the top and it is working now.
QUESTION
I have a quarkus project I try to secure some of my endpoints with a Jwt token.
So far, it don't work. everything is still accessible.
my application.properties:
...ANSWER
Answered 2021-Nov-18 at 12:20The issue was, the double "**" a simple * work just fine
quarkus.http.auth.permission.admin.paths=/api/bo/private/*
QUESTION
I have a Quarkus project that expose some REST Endpoints. When working on dev mode or running from the local build docker container all work fine, those endpoints annotated with @RolesAllowed and @PermitAll work as supposed to be. But when I deploy to a AWS service with the following steps:
- Commit to Gitlab
- Run Gitlab CICD
- Send result with the config to an AWS S3 Bucket
- Trigger AWS codepipeline
- Deploy to Elastic Bean using docker image
After that the container is deployed all endpoints with @PermitAll work fine but those with @RolesAllowed responds with 401 Unauthorized, the token sent to those endpoints is valid, it is correctly formed and has not expired.
...ANSWER
Answered 2021-Oct-27 at 03:20The problem was the AWS time zone configuration, for some strange reason it interfered with how Quarkus validates the IAT and EXP claims of the token. I removed the AWS time zone settings and set the zone using a system property at the JVM level and the problem was completely fixed.
QUESTION
I started a project and have about 7 tests in my project now and it takes already more than a minute to execute the whole test suite using gradle test
.
From the additional output (--info
flag) I can see that the whole quarkus application and also dependencies like the mongodb instance are restarted for every test class and method.
This is the exact opposite of what the quarkus documentation says on the testing guide page:
So far in all our examples we only start Quarkus once for all tests. Before the first test is run Quarkus will boot, then all tests will run, then Quarkus will shutdown at the end. This makes for a very fast testing experience however it is a bit limited as you can’t test different configurations.
All the tests are annotated with @QuarkusTest
and every test just tests a single endpoint.
I use "pure" kotlin (1.5.21), Quarkus version 2.2.2.Final and gradle 6.9. Installed features: cdi, config-yaml, jacoco, kotlin, mongodb-client, mongodb-panache-kotlin, narayana-jta, rest-client, rest-client-jackson, resteasy, resteasy-jackson, smallrye-context-propagation, smallrye-health, smallrye-openapi, swagger-ui
Is that a normal behaviour? If yes, an application with multiple hundred tests could easily take ~20 minutes or more to run the entire test suite.
I didn't try out maven yet, so I can't verify that it's not a gradle related issue.
...ANSWER
Answered 2021-Sep-23 at 07:49While trying to reproduce it with a fresh project, I think I found the issue with my code:
I also used @QuarkusTestResources
with restrictToAnnotatedClass=true
on my tests.
This means the configuration & test profiles must be reloaded and therefore also the quarkus application.
Apparently all the DevServices get restarted, too (in my case it was a mongodb, since I'm using the panache extension), which explains the long runtimes of the tests.
I reorganized my tests a little bit, so they work with the "global" test resources (it was a WireMockServer
in my case).
Now quarkus only gets started once before the tests and the total runtime of the gradle test task is acceptable.
QUESTION
After upgrading from Quarkus 1.11.3.Final to 2.2.3.Final my Unittests are failing with following message:
Caused by: java.lang.IllegalStateException: Invalid use of io.quarkus.test.junit.mockito.InjectMock - the injected bean does not declare a CDI normal scope but: javax.inject.Singleton. Offending field is cloudEventPublisherMock of test class class ch.zhaw.ba.services.order.MyTest
This is the offending class behind the field, clearly annotated with @ApplicationScoped (not Singleton):
...ANSWER
Answered 2021-Sep-22 at 14:18Thanks to javier-toja I totally missed following config in the application.properties:
QUESTION
I'm trying to deploy a Quarkus app to a Kubernetes cluster, but I got the following stacktrace:
...ANSWER
Answered 2021-May-12 at 02:11It's due to the docker link variables that kubernetes mimics for Service
names in scope; it bites people a lot when they have generically named services such as { apiVersion: v1, kind: Service, metadata: { name: http }, ...
as it will cheerfully produce environment variables of the form HTTP_PORT=tcp://10.233.12.82:80
in the Pod, and things such as Spring boot or evidently Quarkus which coerce env-vars into configuration overrides can cause the exact outcome you're experiencing
The solution is (a) don't name Services
with bland names (b) "mask off" the offensive env-vars for the Pod:
QUESTION
I'm trying to run Quarkus from my local machine (windows). It works. However, when I go to the landing page, it does not serve swagger.
The log shows:
...ANSWER
Answered 2021-Jan-20 at 22:25I found the solution. It seems that Quarkus stores its web-resources in the /tmp folder (see: https://github.com/quarkusio/quarkus/issues/12577). I went to the /tmp folder in git-bash and just deleted all the files/folders (that the OS allowed me to delete).
And voila, it started to work after that.
QUESTION
I am trying to get Debezium to send my CDC events to Kinesis and the service seems to start but there are errors, and it doesn't seem to be sending anything to Kinesis. I was following this setup guide on the Debezium site:
https://debezium.io/documentation/reference/1.2/operations/debezium-server.html
Here is my config file:
...ANSWER
Answered 2020-Jul-18 at 12:31You need to specify debezium.source.database.history
property for the mysql connector. Its default value is io.debezium.relational.history.KafkaDatabaseHistory
, so for non-Kafka deployments please set one of the following values:
io.debezium.relational.history.FileDatabaseHistory
(along withdebezium.source.database.history.file.filename
property);io.debezium.relational.history.MemoryDatabaseHistory
for test environments.
QUESTION
Occurs when running on IntelliJ IDE 2019.3.4 with JDK GraalVM 20.0.0 and maven 3.6.3.
...ANSWER
Answered 2020-May-13 at 11:39"Steps to make it work:
- Enable Quarkus bundled plugin
- Uninstall quarkus-tools plugin
- Close IntelliJ and delete IntelliJ project configuration files (.idea/, .iml)
- Import a project to IntelliJ again" - Denis.Kipchakbaev
Refs:
Cannot run @QuarkusTest annotated unit tests with IntelliJ IDEA
https://www.reddit.com/r/quarkus/comments/f2pf8t/quarkus_unit_test_issues/
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install smallrye-health
You can use smallrye-health like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the smallrye-health component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page