-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port 443 connection refused with gickup, gitea, and traefik #242
Comments
Another update. It appears I get two different results depending on which CURL I use Works
Connection Refused
But I'm not sure where it's pulling the IP from so that I can change it. Or how to open the local IP. Even though I've defined the domain for all the configs. The only other way I've found to kill the error, is if I set gickup to run on a cron every 5 minutes. And then bring Gitea + gickup up. By the time Gitea fully gets booted, Gickup has started the sync, and gitea fully starts mid-sync which silences the error |
Another update, in case you have anything to add, it would be helpful. Would like to know why this initially happened. I went back into my destination:
gitea:
url: https://mydomain.com Changed To: destination:
gitea:
url: http://172.18.0.20:3000/ This seemed to stop the error all together, and it is now syncing without any mention of a connection being refused. Not sure why though. Seeing as I couldn't curl locally earlier. |
The only thing I can think of is a problem within the DNS settings. You said that Gitea is still mirroring. That is normal, Gickup uses Giteas' API to create a mirror and Gitea handles this mirror and resyncs it according to your configured interval. I will try to recreate your setup and see if I can find out what's going on. |
What you could try as well, is to use the name of your gitea container in gickups' config file. Like 'http://gitea:3000' |
Edit: I'll try the gitea container name. Yeah would be interesting to know. I've triple checked my settings.
All current versions. I'll provide the composer files below. I took out the stuff like ElasticSearch since it's useless here: Gickupdocker-compose.ymlservices:
gickup:
container_name: "gickup"
image: buddyspencer/gickup:latest
hostname: gickup.${SERVER_DOMAIN}
volumes:
- ${PWD}/conf.yml:/gickup/conf.yml
- ${PWD}/backup:/gickup/backup
- ${PWD}/logs:/gickup/logs
- ${PWD}/tokens/gitea.txt:/gickup/tokens/gitea.txt
- ${PWD}/tokens/github.txt:/gickup/tokens/github.txt
command: ["/gickup/conf.yml"]
environment:
PUID: ${UID}
PGID: ${GID}
networks:
traefik:
ipv4_address: "${SERVICE_IP}"
labels:
- traefik.enable=true
- traefik.constraint-label=traefik
- traefik.docker.network=${SERVER_NETWORK}
- traefik.http.middlewares.https-redirect.redirectscheme.scheme=https
- traefik.http.middlewares.https-redirect.redirectscheme.permanent=true
- traefik.http.routers.gickup-http.rule=Host(`gickup.localhost`) || Host(`gickup.${SERVER_DOMAIN}`) || Host(`www.gickup.${SERVER_DOMAIN}`) || Host(`${SERVICE_IP}`)
- traefik.http.routers.gickup-http.service=gickup
- traefik.http.routers.gickup-http.entrypoints=http
- traefik.http.routers.gickup-http.priority=1
- traefik.http.routers.gickup-http.middlewares=https-redirect
- traefik.http.routers.gickup-https.rule=Host(`gickup.localhost`) || Host(`gickup.${SERVER_DOMAIN}`) || Host(`www.gickup.${SERVER_DOMAIN}`) || Host(`${SERVICE_IP}`)
- traefik.http.routers.gickup-https.service=gickup
- traefik.http.routers.gickup-https.entrypoints=https
- traefik.http.routers.gickup-https.priority=1
- traefik.http.routers.gickup-https.tls=true
- traefik.http.routers.gickup-https.tls.certresolver=cloudflare
- traefik.http.routers.gickup-https.tls.domains[0].main=${SERVER_DOMAIN}
- traefik.http.routers.gickup-https.tls.domains[0].sans=*.${SERVER_DOMAIN}
# Tried adding this, but it made no difference
# - traefik.http.services.gickup.loadbalancer.server.port=443
# - traefik.http.services.gickup.loadbalancer.server.scheme=https
networks:
traefik:
name: ${SERVER_NETWORK}
external: true Gickup .envSERVER_DOMAIN=domain.com
SERVER_IP=XX.XX.XX.XX
SERVER_NETWORK=traefik
UID=143
GID=997
SERVICE_IP=172.18.0.9 Giteadocker-compose.yml:services:
gitea:
container_name: gitea
image: gitea/gitea
hostname: git.${SERVER_DOMAIN}
restart: always
networks:
traefik:
ipv4_address: "${GITEA_IP}"
environment:
PUID: ${UID}
PGID: ${GID}
USER_UID: ${UID}
USER_GID: ${GID}
GITEA__database__DB_TYPE: '${GITEA_DB_TYPE}'
GITEA__database__HOST: '${GITEA_DB_HOST}'
GITEA__database__NAME: '${GITEA_DB_NAME}'
GITEA__database__USER: '${GITEA_DB_USER}'
GITEA__database__PASSWD: '${GITEA_DB_PASS}'
GITEA_CUSTOM: '${GITEA_DIR_CUSTOM}'
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- ${PWD}/data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:3000"]
interval: 2s
timeout: 10s
retries: 15
labels:
- traefik.enable=true
- traefik.constraint-label=traefik
- traefik.docker.network=${SERVER_NETWORK}
- traefik.http.routers.gitea-http.rule=Host(`git.localhost`) || Host(`git.${SERVER_DOMAIN}`) || Host(`www.git.${SERVER_DOMAIN}`) || Host(`${GITEA_IP}`)
- traefik.http.routers.gitea-http.service=gitea
- traefik.http.routers.gitea-http.entrypoints=http
- traefik.http.routers.gitea-http.middlewares=https-redirect@file
- traefik.http.routers.gitea-https.rule=Host(`git.localhost`) || Host(`git.${SERVER_DOMAIN}`) || Host(`www.git.${SERVER_DOMAIN}`) || Host(`${GITEA_IP}`)
- traefik.http.routers.gitea-https.service=gitea
- traefik.http.routers.gitea-https.entrypoints=https
- traefik.http.routers.gitea-https.tls=true
- traefik.http.routers.gitea-https.tls.certresolver=cloudflare
- traefik.http.routers.gitea-https.tls.domains[0].main=${SERVER_DOMAIN}
- traefik.http.routers.gitea-https.tls.domains[0].sans=*.${SERVER_DOMAIN}
- traefik.http.services.gitea.loadbalancer.server.port=3000
- traefik.http.services.gitea.loadbalancer.server.scheme=http
- traefik.tcp.routers.gitea-ssh.rule=HostSNI(`*`)
- traefik.tcp.routers.gitea-ssh.entrypoints=gitea-ssh
- traefik.tcp.routers.gitea-ssh.tls=true
- traefik.tcp.routers.gitea-ssh.service=gitea-ssh
- traefik.tcp.services.gitea-ssh.loadbalancer.server.port=22
networks:
traefik:
name: ${SERVER_NETWORK}
external: true
Gitea .env:SERVER_DOMAIN=domain.com
SERVER_IP=XX.XX.XX.XX
SERVER_NETWORK=traefik
UID=143
GID=997
GITEA_IP=172.18.0.20
GITEA_DB_TYPE=mysql
GITEA_DB_HOST=mariadb:3306
GITEA_DB_NAME=XXXXX
GITEA_DB_USER=XXXXX
GITEA_DB_PASS=XXXXX
GITEA_DIR_CUSTOM=/data/custom Traefik Static File:The Traefik entryPoints:
gitea-ssh:
address: :22/tcp Traefik Dynamic.yml file:http:
middlewares:
https-redirect:
redirectScheme:
scheme: "https"
permanent: true |
Thanks. http://gitea:3000 works. I should have done it earlier anyway, but I've worked on this issue since I initially put in the issue report, so my brain is fried for the day. Plus I spent two hours reading through the gickup code to see how things like I need to change the cron time. It's set to every 5 minutes, so it never stops. As soon as it finishes backing up, it starts again. |
@Aetherinox, Could you share your latest changes to make http://gitea:3000 possible? I appreciate it. |
Sorry, been a month since I wrote this, brain needs refreshing. In my gickup destination:
gitea:
- token_file: /gickup/tokens/gitea.txt
user: xxxxxxx
url: http://gitea:3000/ <--------
createorg: true
mirrorinterval: 1h0m0s
lfs: false
visibility:
repositories: private
organizations: private
|
Hey, looking to see if I can get some direction here.
Recently I moved my system from bare metal over to docker and traefik.
Within the gickup console, I've noticed the following error:
The odd thing is that if I look at my Gitea repos, it does appear to still be syncing, but this error gets thrown right before every single repo goes to sync.
I've ensured Traefik has port 443 open, I've set up SSH port 22, I even tried using docker
expose: 443
between gickup and gitea, and nothing seems to be working.I've spent hours looking through other people's repos on Github to see if I'm missing anything, and there's nothing I can find. My configs look identical to other peoples.
I went into Gitea's API, and physically tried to access
api/v1/version
, and it returned fineEdit: The really weird thing is, if I bring up gickup, gitea, and let the sync start, it will throw the error. Yet if I take down gitea and bring it back up, the error stops.
It however, doesn't matter if I bring Gitea up last on initial startup. The error still occurs. The error only disappears if I take Gitea offline and bring it back up mid sync. Then it doesn't error anymore after that.
The text was updated successfully, but these errors were encountered: