teamatldocker / jira

Dockerized Atlassian Jira
https://hub.docker.com/r/teamatldocker/jira/
MIT License
445 stars 225 forks source link

using traefik as reverse proxy gives "base URL not valid" in JIRA setup configuration #132

Closed geoma76 closed 5 years ago

geoma76 commented 5 years ago

Prerequisites

Description

Wanted to install JIRA and Confluence as a docker image, and as a reverse proxy I wanted to use traefik.

After a little try and error and a lot of reading on the traefik site I got the containers running. My JIRA and Confluence answers on the subdomains I set up, and I can see the startpages of both. So far so good, problem is, when I enter the JIRA setup page it asks for the base URL of the installation. When I enter my subdomain, the validation says the URL is not valid. If I log in on the computer where the docker containers are running and use the backend addresses traefik created, then it works. So I am guessing it is an iptables/routing/DNS problem, but I am stuck here. Please help.

Steps to Reproduce

  1. Use "docker-compose up -d" and the .yml file attached
  2. Check that traefik dashboard is coming up on "http://kub-01:8080"
  3. Check sites "http://jira.kub-01" and "http://confluence.kub-01" are up
  4. Start configuration of JIRA by using the shown up setup site

Expected behavior: JIRA Configuration should be possible

Actual behavior: Configuration stucks at first site with error "base URL not valid"

Reproduces how often: 100%

Versions

Docker version 18.09.7, build 2d0083d docker-compose version 1.17.1

Logs And Environment Information

runs on Ubuntu 18.04 LTS

docker-compose.zip

blacklabelops commented 5 years ago

Is it possible to attach the yml without the zip surrounding it?

geoma76 commented 5 years ago

I renamed it to .txt, because the system doesn 't know .yml and doesn 't allow that. docker-compose.txt

blacklabelops commented 5 years ago

Your configration is faulty. If you use a proxy or reverse proxy, e.g. traefik, then you have to set the proxy settings in any atlassian product.

E.g. Jira

$ docker run -d --name jira \
    -v jiravolume:/var/atlassian/jira \
    -e "JIRA_PROXY_NAME=myhost.example.com" \
    -e "JIRA_PROXY_PORT=443" \
    -e "JIRA_PROXY_SCHEME=https" \
    teamatldocker/jira
geoma76 commented 5 years ago

Thanks for your help, I really appreciate it!

Unfortunately it still does not work. I changed the following in the jira-section of the docker-compose.yml:

environment:

After that I stopped all with "docker-compose stop" and did a "docker-compose rm -f" just to be sure.

After bringing up everything with "docker-compose up -d" again -> Still the same result.

I think, what you suggested was what I was already doing with the "labels" tag. Tell the proxy what host to use and what port. Standard for traefik is port 80 and http scheme, so I did not explicitly add it. And it seems to be good, if you look at the dashboard screenshot I attached, traefik seems to do it right...only the container itself can 't resolve the name, the host and also my other devices in the network can.

Any other suggestion?

Bildschirmfoto von 2019-07-10 15-01-17

geoma76 commented 5 years ago

fixed it (at least I can work) Clue is: it seems a common problem for the containers to enable DNS search. You can only do so with additional software OR you use the service name (also shown in your nginx-example)

what I did is replace the http://**jira.kub-01 with http://jira** within the setup page of JIRA. After that I was able to continue and so far I could also access both JIRA and confluence and even connect both via oauth. You still can access the site via http://jira.kub-01 after configuration. There is an hint that the base url is different from the one I accessed, but it still works. So far that is enough for my work at home.