Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira DC inside docker containers

Михаил Малиновкин October 25, 2018

Hi all.

When i configure JiraDC in docker i got error

2018-10-25 14:18:56,306 localhost-startStop-1 ERROR      [c.a.jira.startup.ComponentContainerLauncher] A fatal error occurred during initialisation. JIRA has been locked.
net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //xxxxxx:40001/com.atlassian.jira.application.DefaultApplicationRoleManager.activeUsersCountForLicenseUnflushableCache. Initial cause was Exception creating connection to: xxxxxx; nested exception is:
    java.net.NoRouteToHostException: Host is unreachable (Host unreachable)

Help me please )

6 answers

0 votes
Martin Zeller July 1, 2019

We faced the same problem using docker-compose with setting the hostname. 

After removing the hostname setting in the compose file, Jira started nicely in Data Center mode. 

Somehow the hostname could not be resolved inside the container. So, when docker assigns it by itself the name resolution works. 

We are also using a docker swarm overlay network between the docker hosts for cluster communication. 

0 votes
Михаил Малиновкин November 13, 2018

Hello, Andrew.

We connected docker with Jira DC - use in your compose "network_mode: host" and all features work well (but without network isolation).

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 1, 2018

I have only ever seen data center deployments on machines with ipv4 addresses.   I am not familiar with using a docker network, as you call it.   I would expect each node to have its own address that can be reached from the other nodes, but also from the same node.

In regards to your first error, it looks like even the first node cannot reach its own logical IP address with the network settings it has right now.  This is the first requirement.   By default the replication is running over port 40001.     I'm certainly not an expert on docker, but I did some searching and came across this post: https://github.com/moby/moby/issues/27817

It appears to detail a scenario that you might be facing where attempts to connect to the address from within the docker container can fail due to what appears to be some iptables rules.  Perhaps you can follow these same steps to get past this problem:

I can solve this by adding an iptables rule to allow connections from docker network to host:
$ sudo iptables -I INPUT 1 <interfacename-mynetwork> -j ACCEPT

0 votes
Михаил Малиновкин October 30, 2018

Another question: must i use docker network or host-based network ( host ip address)?

Can i configure ehcache replication using docker (isolate) network?

0 votes
Михаил Малиновкин October 30, 2018

Hi, thank you for you answer.

I start instance on the first node. Im inntrested in Cluster.properties file parameters (EMCahed) for docker.

xxxxxxxxx- ip address host machine.

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 29, 2018

Is this the first node of a data center install?  Or is this a 2nd/3rd node that is being setup here?

The error message indicates that this Jira install is unable to reach the host.  I am expecting that this is a 2nd node that is unable to reach the first node over the network connection this machine has.   In the part you obscured:

Initial cause was Exception creating connection to: xxxxxx; nested

Is the xxxxxx a hostname, IP address, or a fully qualified domain name?   Basically this Jira node can't talk to whatever that address is.  It sounds like this is more of a problem with the operating system itself being unable to reach that address.  

I would be interested to see if you can ping or traceroute that address from this other machine to see the results.   It should at least help us to better understand the network layout here.

Suggest an answer

Log in or Sign up to answer