PKIX path building failed in docker container - spring-boot

Team - I am trying to connect to elastic 8.2.0 running on my local machine from a spring boot service deployed/running in docker(i.e. Docker Desktop on Windows machine) and getting below issue for SSL
2022-08-23 01:26:33.811 ERROR [,,] 1 --- [main] c.m.u.s.c.service.ElasticSearchService   : Creation of index failed due to: [PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target]
please suggest a solution for this.

Related

How to deploy a spring boot application to tomcat server from jenkins?

Sample Spring boot application is created and build on Jenkins.
For Deployment of war file in tomcat server ,
I am facing a several issues.
Error :
Credentials At Jenkins :
tomcat-users.xml File :
Still I am facing the same issue. I had searched in google and stackoverflow but still i can't found the correct answer.
Can Any one help me in this ?
Your error message is a connection refused: connect exception. You should check the following:
Your Tomcat server is up and running on port 8082 at the same server where your jenkins server is running (localhost). To make sure, run: telnet localhost 8082 from the same server commandLine ( I see you are in windows). If it connects then your Tomcat server is OK.
Check if the manager application of Tomcat is deployed. Try to load the following web page and check if exists: http://localhost(or hostname of server):8082/manager/html
Try to disable the windows firewall and any other firewall you may have (or antivirus firewall) and check if it prevents jenkins to connect to Tomcat (again check with telnet command)

How to containerize the spring boot application without installing docker and deploying in centos

I have a spring boot application in my local machine , i want to containerize it without installing docker in local machine and i want to deploy it in a Cent Os machine which docker has installed in an offline mode .
while i have tried to containerizing it by building an image file , it is actually looking for Docker Daemon in local and the build is getting failed.
Using GoogleContainerTools' Jib you can easily build a Docker compliant container image without Docker installed.
You need to install the Jib plugin in your pom.xml or gradle.build file.
Here is a simple example: https://www.baeldung.com/jib-dockerizing
Without Docker engine you cannot containerize the application, Docker daemon is needed for creating the container for your spring boot application in unix. You can use ECS on AWS that can create the container without docker but lot of configurations and deep knowledge is needed for that.

Deploying Lagom Microservices on Kubernetes

I'm trying to deploy Lagom microservices on Kubernetes by following-up the Chirper Lagom example. So According to the provided guide link, I configured a kubernetes cluster by installing Minikube and everything is good.
But when I tried to build Chirper Docker images by using fabric8’s docker-maven-plugin, I got this error:
[ERROR] Failed to execute goal
io.fabric8:docker-maven-plugin:0.20.1:build (default-cli) on project
friend-impl: Execution default-cli of goal
io.fabric8:docker-maven-plugin:0.20.1:build failed: No
given, no DOCKER_HOST environment variable, no read/writable
'/var/run/docker.sock' or '//./pipe/docker_engine' and no external
provider like Docker machine configured -> [Help 1]
Is there anyone that can help me to understand that error? Thanks.
[Updating based on discussions in comments]
The issue here is that the Docker CLI is not able to reach the Docker Engine. Since you are using Minikube, you can point docker CLI to Docker engine inside Minikube. That will ensure that images are built inside minikube VM and also ran there subsequently. You can run command:
eval $(minikube docker-env)
This command will set the parameters required by Docker CLI to communicate with Docker engine in Minikube and it should be able to run command which is failing for you!

Tomcat Remote Deployment

I want to deploy a WAR from my local windows box to a remote tomcat machine
I am using the following command from Postman
http://10.248.9.104:8080/manager/text/deploy?path=/greeting1&war=file:///C:/Users/jagaran.das/Documents/work/AIP/Automation/workspace/gs-rest-service-master/initial/target/gs-rest-service-0.1.0.war
Also I have tried lot of options.
My main requirement is to control deployment to 100 tomcat server from a central location. I was thinking of using tomcat manager remote deployment way but I am not able to do. Please help
Tomcat Version is Tomcat 7.0.78

AWS EC2 : Connecting to PostgreSQL from tomcat 7

I have installed tomcat7 and postgreSQL9 on AWS- Ec2 Micro ,
I am able to connect to the EC2 postgreSQL instance form a spring application running on my local tomcat 7 server.
When I deploy the same war file on the EC2- tomcat7 server, it is throwing the following error..
Cannot create JDBC driver of class '' for connect URL 'jdbc:postgresql://ec2-user#x-x-x-x-x.us-x-x.compute.amazonaws.com/test'
java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:279)
I have copied postgresql-9.1-901.jdbc3.jar to /usr/share/tomcat7/lib
I have tried using the AWS internal IP ... No luck..
I don't know what I am doing wrong. The same war with same configuration works from local tomcat7. Am I missing any thing with AWS tomcat7 configuration?
Hi it seems you haven't included the postgresql jdbc jar. Try including that it should work.

Resources