Deployed spring boot app on heroku successfully but getting 503 - spring-boot

I have a CI/CD job for deploying spring boot app on heroku from gitlab.
Job ran and i got the message Job succeeded along with app URL but when i try to access endpoint i get 503
I also added java.runtime-version = 1.8 in system.properties file but same issue
anyone knows what's going on?

Related

is there any way to resolve liveness probe failure issue in Kubernetes environment after upgrading to spring boot 3.0.0 from spring boot 2.7,7?

I have upgraded spring boot application from version 2.7.7 to 3.0.0.
After upgrading it is working fine on local machine and able to access all the actuator health endpoints.
But, after deploying the same code to Kubernetes cluster we are getting error as "Readiness probe failed. 404 not found".
It is not able to call health endpoints and giving 404 error.
From the pod logs we can see that application is started properly on port 8080.
Please refer following image for error.
enter image description here
We tried the same on local machine it is working fine.
We redeployed the previous build with old springboot version it is working fine.
We also tried deploying the jar in minikube environment it is working fine.We are expecting to resolve the readiness probe issue.
We are expecting to resolve this issue and start the app with springboot 3.0.0 in kubernetes environment.
Verify you actuators didn't move to a different port. In v3 there is a configuration for management port where by default the actuators are served.
https://docs.spring.io/spring-boot/docs/3.0.0/reference/htmlsingle/#actuator.endpoints.kubernetes-probes
management.server.port
Also make sure they are enabled
management.endpoint.health.probes.enabled

Azure app service returning 404 for Spring boot Java 8 based war

I am trying to deploy a Springboot based war file on Azure app services and I can see server started in logs but its returning 404 when I try to access website.
Here's what my logs looks like:-
Start up command from app service logs:-
'2022-05-09T22:17:09.766Z INFO - Starting container for site
2022-05-09T22:17:09.766Z INFO - docker run -d -p 80:80 --name testing3_0_315c5bf8 -e WEBSITE_SITE_NAME=testing3 -e WEBSITE_AUTH_ENABLED=False -e WEBSITE_ROLE_INSTANCE_ID=0 -e WEBSITE_HOSTNAME=testing3.azurewebsites.net -e WEBSITE_INSTANCE_ID=192ae7e12efabd86b8f1992c5d0955e31956c2538c35216038ae1c4c72bce58c -e HTTP_LOGGING_ENABLED=1 -e JAVA_TOOL_OPTIONS=-javaagent:/agents/java/applicationinsights-agent-codeless.jar mcr.microsoft.com/azure-app-service/java:8-jre8_191030025800'
Successful starting logs:-
'2022-05-09 22:19:49.960 INFO 123 --- [main] com.case.client : Started testing in 111.231 seconds (JVM running for 138.403)'
I tried to look for it on Stackoverflow and people suggested below things and I tried all of them but nothing is working:
Changing Always On flag to Yes.
Add PORT mapping in config but it didnt help.
Restart app couple of times.
Looks like my request is not reaching my app at all.
Does anyone know what am I doing wrong here?
I had the same issue with Spring Boot 3. This stack overflow article is 8 month old, because of that it's maybe different problem.
I contacted the Microsoft Support because locally my app runs without any problem. Only in combination with an Azure Web App Service, the application always returns HTTP 404. I deployed the application with the IntelliJ Azure plugin, with maven plugin and with Azure pipeline. No matter which way, the server always returns HTTP 404.
We can see the incoming http request in the Azure Web Service logs, but it is not delivered to the deployed application. But the Spring Boot application is up and running. I downgraded to Spring Boot 2.7.7 and the app runs without any problem on Azure App Service.
The Microsoft Support confirmed the problem with Spring Boot 3 and Azure App Service in combination with codeless Application Insights. The issue will be fixed with the next platform update mid Feb 2023.
The support has provided a workaround: manually install the Application Insights SDK (but we didn't test this yet)
There is no official article for this issue. I thought this might be a good place to announce this problem to help other developers.

Springboot actuator endpoints are not working after deploying app to pcf

I have a springboot app which has 3 actuators enabled as below out of which 3rd one is custom,
application.properties code snippet
management.endpoints.web.exposure.include=health,refresh,customEndpoint
the endpoints when hit from local are working correctly. For example:-
http://localhost:8081/MyAppName/system/health gives below expected details:-
but when we hit the same endpoint(with pcf app route mapped) which is my_route_url/MyAppName/system/health, after deploying the app to pcf, it gives below 404 error:-
404 Not Found: Requested route ('my_route_url') does not exist.
Tried redeploying the app to pcf but that did not help.
Tried looking for solutions in other questions posted here but they are not matching scenario.
it's working in a different pcf foundation though.

Spring Boot Devtools Remote cause error at Pivotal Cloud Foundry

Sorry, cant post images with low reputation)
Here is my settings:
Spring Boot: 2.3.0.RELEASE
secret
build.gradle
Intellij Idea IDE Run/Debug Configuration
I have this app working at Pivotal Cloud Foundry. I have runing Remote App and after build through IDE or using
./gradlew clean assemble
I get
Exception in thread "File Watcher" java.lang.IllegalStateException: Unexpected 404 NOT_FOUND response uploading class files
error
Ok, so after looking through your demo app I believe the issue is that you're using Spring Webflux and that's not supported at the moment.
The remote devtools functionality is only available with Spring WebMVC & Servlet. See this Github issue for reference: https://github.com/spring-projects/spring-boot/issues/13092#issuecomment-387350811

Fail to deploy my spring boot application to asw beanwalk

I developed a spring boot project on Intellij, which is only backend for now. and wanna deploy it to aws.
I followed below
https://developer.okta.com/blog/2019/08/07/deploy-a-spring-boot-app-with-aws-elastic-beanstalk
Like he said ,I also get 502 error at first, then I did add server_port 5000 according to him
but I still get 502 bad gateway
http://personalprojectmanagement-env.eba-xzze9hnr.us-east-2.elasticbeanstalk.com/ is my website
anyone can help?
Thanks

Resources