I have developed Azure pipeline, its ok sending the jar file to my App service, but that jar file is not running. Even though I initiate it manually doing SSH and java -jar abcjar it shows application hosted at 8080 but its not showing.
Steps already taken
add plugin in pom.xml"
added web.config by FTP on site www root
"nohup java -jar abc.jar &"
Tried downloading the jar file via FTP and run it, its working fine.
I got a success by referring to the tutorial: Deploy a Spring Boot JAR file app to Azure App Service with Maven and Azure on Linux
Rename jar file to app.jar
Add an application setting:
Related
I have a server.jar file which I want to deploy on Heroku. When I run heroku deploy:jar server.jar --app myapp, heroku deploy only server.jar file, but I also want to deploy server.properties file. How can I do it?
You can package the property files inside the Jar file (if you use Maven is straightforward).
If you need to update these values at runtime (when deploying on Heroku) you need to look at Config Vars
I have a single jar server app (simple web portal) built with Spring Boot. I run it:
java -jar myapp.jar
Locally, the jar file is under my Eclipse project folder. Now it's ready to be deployed on a Linux server as a service. What folder should I create on the server to put the jar file? In that folder (working directory), I will be putting the application.yaml file plus some other config files. The service will run as root.
Create a directory under either /opt or /usr and have your jar run from there.
If your app creates one log file, configure it for /var/log. If it's going to write a few create a directory /var/log/<your app>.
I'm trying to deploy my fullstack webApp to tomcatServer. Backend part is springBoot app and frontend part is react app. I built that using mvn clean package. I configured my pom file, so maven always runs npm i, npm run build and then it copies all files to webapps backend directory and create war file.
When I have installed the tomcat on the windows, everything works correctly. I have deployed the webApp.war to the tomcat and I can access to my webapp using localhost:8080/webApp.
I tried the same on the mashine with macOS, but localhost:8080/webApp does not work. There is shown whitescreen and all needed files return 404 code to the console.
Do you have some ideas, what is needed to be configured?
Thanks!
Have you tried manually stopping the server(tomcat), again setting it to automatic and re-running the application?
I'm trying to deploy sample java app (\java-docs-samples\flexible\helloworld) to my GCP App Engine project. Source is on my laptop, and I have built the project locally.
The error indicates a build is being attempted. I have also moved app.yaml to the project root directory - no help. All I need is for the .war file to be uploaded. Any ideas?
My command line to deploy:
gcloud app deploy src\main\appengine\app.yaml --project=my-real-project-name
From error log:
Pulling image: gcr.io/gcp-runtimes/java/runtime-builder#sha256:b279f7e1075a502c04115c15412df5616b9d0e6e9906ed6fc6e426e0bb9602ec
sha256:b279f7e1075a502c04115c15412df5616b9d0e6e9906ed6fc6e426e0bb9602ec: Pulling from gcp-runtimes/java/runtime-builder
Digest: sha256:b279f7e1075a502c04115c15412df5616b9d0e6e9906ed6fc6e426e0bb9602ec
Status: Downloaded newer image for gcr.io/gcp-runtimes/java/runtime-builder#sha256:b279f7e1075a502c04115c15412df5616b9d0e6e9906ed6fc6e426e0bb9602ec
Exception in thread "main" com.google.cloud.runtimes.builder.exception.ArtifactNotFoundException: No deployable artifacts were found. Unable to proceed.
at com.google.cloud.runtimes.builder.buildsteps.PrebuiltRuntimeImageBuildStep.getArtifact(PrebuiltRuntimeImageBuildStep.java:77)
at com.google.cloud.runtimes.builder.buildsteps.RuntimeImageBuildStep.run(RuntimeImageBuildStep.java:50)
at com.google.cloud.runtimes.builder.BuildPipelineConfigurator.generateDockerResources(BuildPipelineConfigurator.java:104)
at com.google.cloud.runtimes.builder.Application.main(Application.java:147)
You can try with mvn clean package appengine:deploy to clean the files and directories generated by Maven during its build.
The difference between the gcloud app deploy command and the maven deploy is that the maven builds and packages your app before deploying it and the gcloud command just deploys your application without packaging it. Also, the gcloud command requires you to specify the documents that you are going to deploy.
In the official documentation [1] [2] you can find more information about how to deploy your application using each command.
These are the steps to deplow to google cloud appengine flexible environment:
-Change your war file to jar. see docs below
https://cloud.google.com/appengine/docs/flexible/java/dev-java-only#prerequisites
-Put your jar file in the project root directory (projectName/file.jar).
-Run "gcloud app deploy" from your project directory. see documentation below
https://cloud.google.com/appengine/docs/flexible/java/dev-java-only#deploying_your_app
I want to deploy a jar file to a remote server and run it. Is there a plugin for maven can do this process? I know that tomcat for maven plugin can deploy the war file to remote server, but my project is not a servlet project. I think the process is that:
1. transfer the jar file to remote server.
2. ran the jar file.
What is a better solution? Thanks!
A combination of these two questions will probably be what you need:
Maven copy local file to remote server using SSH
Run remote command via ssh using Maven3