Quarkus Swagger UI not working on Kubernetes - java

I'am getting Resource not found when I try to reach http://SOME_URL/q/swagger-ui when running app on Kubernetes
I have set the property
quarkus.swagger-ui.always-include=true
http://SOME_URL/q/openapi is giving me API definition
When app is deployed locally , it works fine
Any idea ?

Related

Facing 403 forbidden while accessing spring boot app on wildfly 26.0.1

I have a spring boot application with out any security enabled and react as front-end both coupled into a single war. the application is deploying successfully but cant able to access the application using localhost:8080 as it is giving 403 forbidden error and while accessing rest end point im facing 404 not found error on wildfly 26.0.1 but the same application is working fine with out any error on wildfly 15.0.1.
i cant able to understand why it is working on older version of wildfly but not in newer version of wildfly.
You need to also indicate the context root of your application in the URL.
To know what is the context root of the app you just deployed, go to : http://127.0.0.1:9990/console/index.html#deployments
Then the URL of your project must look like this: localhost:8080/your-context-root/
For better understanding in how to deploy spring boot in wildfly i recommend you this article: https://medium.com/swlh/how-to-deploy-spring-boot-application-in-wildfly-application-server-b3670c031ad4

Spring Boot App & React App Cannot Communicate Inside Openshift

I have deployed a single fat .jar, containing a Spring Boot app and a React app in Openshift.
The Spring Boot app exposes a REST API, and the React app is the frontend that makes calls to that API.
Problem
Both apps are accessible externally just fine (with the url generated by Openshift), but the React app cannot communicate with the Spring Boot app through http://localhost:8080/... calls.
Attempts so Far
I have tried using 127.0.0.0 instead of localhost but with no avail.
I also tried performing curl -v http://localhost:8080/... from inside the pod where the 2 apps are deployed and it works fine.
Is this a configuration issue? Do I need to set up routes? Or use something other than localhost/127.0.0.1?
To answer my own question, I finally managed to solve this by following Boris Chistov's suggestion. I simply removed all the http://localhost:8080 url parts and used relative URLs instead.

How to deploy REST web service to Heroku?

I am trying to deploy a simple java rest service using webapp-runner in heroku, i follow the instructions in documentation and everything perfect, i run my app and is working cause i can see my html welcom page, the problem is that i cant access to my rest resources with the path i provided even in a local deploy http://localhost:8282 this is the path when i open my app, http://localhost:8282/wr/test and this should show a simple get method, but doesn't work neither local with webapp-runner nor remote in heroku, this is the link https://appbergas.herokuapp.com/ , what am i doing wrong? which should be the complete uri i thought https://appbergas.herokuapp.com/wr/test
im using javax ws rs,also when i deploy it in glassfish everything goes great.

How to get started on Google App Engine for current GlassFish solution

I'm currently running my Java application on a GlassFish server on AWS-EB.
Since our front-end is already running on the Google Cloud Platform, I would like to migrate my back-end to GCP as well.
I tried the Jelastic interface but I was not happy with the speed results.
Now I'm looking to deploy my application on the App Engine but when I deploy my current .war file, I get the following error:
Error 404 - Not Found.
No context on this server matched or handled this request.
Contexts known to this server are:
/ ---> o.e.j.w.WebAppContext#7e0b0338{/,file:///var/lib/jetty/webapps/root/,UNAVAILABLE}{/root.war} [failed]
I guess I'm missing something, since GCP is using Jetty as a server.
I'm a bit lost and I hope you guys can point me in the right direction to make this migration successful.
It's suggested here that Jetty requires two configuration files (web.xml and applicationContext.xml).
As well as this, the original poster in the issue above stated that they solved their issue in this GitHub post by rebuilding their project before deploying.

Deploying a Spring app to AWS Beanstalk

I'm new to Spring and built a simple Springboot app that has a couple of endpoints and stores data in a mysql database. It is now time for me to deploy it to AWS. I setup a beanstalk instance, uploaded my war file, and also setup a rds db instance with mysql. When I try to visit one of my endpoints using my environment url/(the endpoint), I'm getting a 404 error. I know the endpoints work because when I ran the project locally, I tested them.
I suspect the issue is the Spring datasource url I have configured in my project. When I was running locally, I had the url set to the following: jdbc:mysql://127.0.0.1/exampleDb
I tried changing the url to the following: jdbc:mysql://(my aws environment url):3306/ebdb but I still get the same error.
What should I change the datasource url to? Any ideas? I'm new to Spring and AWS, so this has really been a roadblock.
Any help is appreciated.

Categories