Compare commits
2 Commits
57b25a91d8
...
e0c6f31a36
| Author | SHA1 | Date | |
|---|---|---|---|
| e0c6f31a36 | |||
| ccd36b14f3 |
6
.env
6
.env
@@ -1 +1,5 @@
|
|||||||
AGENT_IMAGE_VERSION="2025.07.3-linux-sudo"
|
SERVER_IMAGE_VERSION="2026.1.1-linux"
|
||||||
|
AGENT_IMAGE_VERSION="2026.1.1-linux-sudo"
|
||||||
|
AGENT_NAME_1="master-agent"
|
||||||
|
AGENT_NAME_2="bbc-agent"
|
||||||
|
AGENT_NAME_3="dev-test-agent"
|
||||||
32
TROUBLESHOOTING.md
Normal file
32
TROUBLESHOOTING.md
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# Troubleshooting
|
||||||
|
|
||||||
|
## Port 55432 Already Allocated (E2E Builds)
|
||||||
|
|
||||||
|
**Symptom:**
|
||||||
|
A build step like "Postgres Up" fails with:
|
||||||
|
|
||||||
|
```
|
||||||
|
Bind for 0.0.0.0:55432 failed: port is already allocated
|
||||||
|
```
|
||||||
|
|
||||||
|
**Cause:**
|
||||||
|
A Postgres container from a previous build was not cleaned up properly (e.g. build failed before reaching its teardown step). Since all E2E builds use the same hardcoded host port `55432`, the stale container blocks any new build from starting.
|
||||||
|
|
||||||
|
**Diagnosis:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Find what's holding the port
|
||||||
|
docker ps --filter "publish=55432" --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Fix:**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Remove the stale container (replace the name with the one from the command above)
|
||||||
|
docker rm -f <container-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
Then re-run the failed build.
|
||||||
|
|
||||||
|
**Prevention:**
|
||||||
|
Ensure every build configuration runs `docker compose down -v` in a cleanup/always-run step so containers are torn down even when earlier steps fail.
|
||||||
@@ -15,7 +15,7 @@ services:
|
|||||||
- '/teamcity/logs:/opt/teamcity/logs'
|
- '/teamcity/logs:/opt/teamcity/logs'
|
||||||
networks:
|
networks:
|
||||||
- devops
|
- devops
|
||||||
image: jetbrains/teamcity-server
|
image: jetbrains/teamcity-server:${SERVER_IMAGE_VERSION}
|
||||||
|
|
||||||
teamcity-agent-1:
|
teamcity-agent-1:
|
||||||
restart: always
|
restart: always
|
||||||
@@ -23,10 +23,14 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- 'SERVER_URL=teamcity-server:8111'
|
- 'SERVER_URL=teamcity-server:8111'
|
||||||
- DOCKER_IN_DOCKER=start
|
- DOCKER_IN_DOCKER=start
|
||||||
|
- AGENT_NAME=${AGENT_NAME_1}
|
||||||
user: root
|
user: root
|
||||||
privileged: true
|
privileged: true
|
||||||
networks:
|
networks:
|
||||||
- devops
|
- devops
|
||||||
|
extra_hosts:
|
||||||
|
- "host.docker.internal:host-gateway"
|
||||||
|
- "phoenixDBE2E:host-gateway"
|
||||||
volumes:
|
volumes:
|
||||||
- '/teamcity/agent:/teamcity_agent/conf'
|
- '/teamcity/agent:/teamcity_agent/conf'
|
||||||
- '/var/run/docker.sock:/var/run/docker.sock'
|
- '/var/run/docker.sock:/var/run/docker.sock'
|
||||||
@@ -42,10 +46,14 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- 'SERVER_URL=teamcity-server:8111'
|
- 'SERVER_URL=teamcity-server:8111'
|
||||||
- DOCKER_IN_DOCKER=start
|
- DOCKER_IN_DOCKER=start
|
||||||
|
- AGENT_NAME=${AGENT_NAME_2}
|
||||||
user: root
|
user: root
|
||||||
privileged: true
|
privileged: true
|
||||||
networks:
|
networks:
|
||||||
- devops
|
- devops
|
||||||
|
extra_hosts:
|
||||||
|
- "host.docker.internal:host-gateway"
|
||||||
|
- "phoenixDBE2E:host-gateway"
|
||||||
volumes:
|
volumes:
|
||||||
- '/teamcity/agent2:/teamcity_agent/conf'
|
- '/teamcity/agent2:/teamcity_agent/conf'
|
||||||
- '/var/run/docker.sock:/var/run/docker.sock'
|
- '/var/run/docker.sock:/var/run/docker.sock'
|
||||||
@@ -62,10 +70,14 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- 'SERVER_URL=teamcity-server:8111'
|
- 'SERVER_URL=teamcity-server:8111'
|
||||||
- DOCKER_IN_DOCKER=start
|
- DOCKER_IN_DOCKER=start
|
||||||
|
- AGENT_NAME=${AGENT_NAME_3}
|
||||||
user: root
|
user: root
|
||||||
privileged: true
|
privileged: true
|
||||||
networks:
|
networks:
|
||||||
- devops
|
- devops
|
||||||
|
extra_hosts:
|
||||||
|
- "host.docker.internal:host-gateway"
|
||||||
|
- "phoenixDBE2E:host-gateway"
|
||||||
volumes:
|
volumes:
|
||||||
- '/teamcity/agent3:/teamcity_agent/conf'
|
- '/teamcity/agent3:/teamcity_agent/conf'
|
||||||
- '/var/run/docker.sock:/var/run/docker.sock'
|
- '/var/run/docker.sock:/var/run/docker.sock'
|
||||||
@@ -75,12 +87,12 @@ services:
|
|||||||
- '/opt/buildagent/temp3:/opt/buildagent/temp'
|
- '/opt/buildagent/temp3:/opt/buildagent/temp'
|
||||||
- '/opt/buildagent/tools3:/opt/buildagent/tools'
|
- '/opt/buildagent/tools3:/opt/buildagent/tools'
|
||||||
image: jetbrains/teamcity-agent:${AGENT_IMAGE_VERSION}
|
image: jetbrains/teamcity-agent:${AGENT_IMAGE_VERSION}
|
||||||
watchtower:
|
# watchtower: // watchtower seems not to have the a version docker compose compatible with the new docker api. Need to keep watchin untill it has.
|
||||||
image: containrrr/watchtower
|
# image: containrrr/watchtower
|
||||||
container_name: watchtower
|
# container_name: watchtower
|
||||||
volumes:
|
# volumes:
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
# - /var/run/docker.sock:/var/run/docker.sock
|
||||||
command: teamcity-server
|
# command: teamcity-server
|
||||||
node_exporter:
|
node_exporter:
|
||||||
image: quay.io/prometheus/node-exporter:latest
|
image: quay.io/prometheus/node-exporter:latest
|
||||||
container_name: node_exporter
|
container_name: node_exporter
|
||||||
|
|||||||
Reference in New Issue
Block a user