Update .env for new server and agent image versions; enhance docker-compose.yml with dynamic agent names and extra hosts; add troubleshooting guide for port allocation issues.
This commit is contained in:
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'
|
||||||
|
|||||||
Reference in New Issue
Block a user