Tag: java

Kubernetes service in java does not resolve restarted service/replicationcontroller

I have a kubernetes cluster where one service (java application) connects to another service to write data (elasticsearch). When elasticsearch (service & replicationcontroller) is restarted/redeployed, the java-application looses it’s connection, which can only be recovered by restarting the java-application (rc). This is not the desired behaviour and should be solved. Using curl from the kubernetes […]

Gradle blocked on :app:transformClassesWithDexForDebug

Today I was working on my android app. I pushed a new commit and I was waiting for the notification of successful build, but nothing arrived. The build server is blocked on :app:transformClassesWithDexForDebug and the server has 100% load on every cpu core. I tried also using jdk8 and jdk7 but nothing changed. For blocked […]

Attempting to use docker-client from Spotify and am getting various errors

I want to be able to interact with Docker from a Java program which is currently running within Eclipse on Windows. I followed the instructions found here: https://github.com/spotify/docker-client I created a Maven project and tried to run the sample code specified in the Readme. I first got “connection refused” errors but then tried to create […]

How to externalize the docker container file

I am building a custom docker image from the jenkins official image. I want to install the maven to the image and exteralize maven’s config file. But I failed. After the container startup, there is a empty /etc/mavendirectory. I think it may be a permission issue but I can’t solve it after a half day’s […]

Eureka on docker container : unknown host exception

I’m trying to start eureka server via spring boot on docker container and getting the following exception “unknownhostexception”. Now in the eureka config.properties file I’ve used hostname as localhost however the exception is showing that it somehow uses the hostname of the container rather than using the hostname which I’ve defined in eureka properties file. […]

java.net.SocketException when accessing docker host

I’m new to docker and need to connect from inside a running centos docker container to the host running the container using a java socket. When trying to connect a SocketException occurs: [root@743fedf46128 test]# java SocketTest 10.1.196.134 4444 127.0.0.1 0 Trying to connect using ip address Using remote ip 10.1.196.134 Using remote port 4444 Using […]

Connection from Java UI container to couchDB container refuses

I have a question regarding Java and couchDB. My setup: – a Java UI with an interface to the DB – a couchDB inside a container, exposed on localhost:5984. Well. I have realized a connection between both in my local Windows machine, which worked perfectly. Now I packed both in containers, but I have a […]

How to import a CSV inside a Docker container with Java 8?

I want load data from a CSV file into my program on startup. On my local machine it works just fine, but when I try to Dockerize the spring boot application, my CSV file cannot be found. private final static String GIFTS_CSV = “gifts.csv”; public final static String PATH = “src/main/resources/static/”; public static Map<Integer, Gift> […]

Maven's target jar does not exist on Docker Hub

I have built a simple hello world rest service using spring boot. On my local machine (Ubuntu 14.04) when I run mvn package command, a runnable jar is getting created under target folder: equation-1.0-SNAPSHOT.jar. When I run this jar using java -jar equation-1.0-SNAPSHOT.jar I can see the hello world message via browser. Then I build […]

Executing docker command from a remote machine

I have a requirement where I need to execute some docker commands from a remote machine. I am using java ssh library to connect to the machine where I need to execute the docker commands, and then trying to execute the command. The actual docker command is: docker exec -it idaas_webtier_1 /bin/bash _tadm1=”${OTD_HOME}/bin/tadm” _tadm2=”–user=${OTD_ADMIN_USER} –password-file=${OTD_ADMIN_PWD} […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.