Table of Contents
IRC Lounge Ergo Connection
The Lounge cannot connect to Ergo backend.
Symptom
The Lounge shows “Connection closed unexpectedly: AggregateError”. Users cannot connect to IRC via web client. Error: “getaddrinfo EAI_AGAIN folkzone-irc-ergo”.
Cause
The Lounge is trying to connect to Ergo via public domain instead of Docker network, or containers are on different networks.
Fix
Configure The Lounge to connect to Ergo via Docker network and ensure all IRC containers are on the same network.
Create config.js for The Lounge: ```javascript module.exports = {
public: true,
defaults: {
name: "folk.zone IRC",
host: "folkzone-irc-ergo", // Internal Docker network name
port: 6667,
tls: false,
rejectUnauthorized: false,
nick: "",
username: "",
password: "",
realname: "",
join: "#general", // Auto-join channel
encoding: "utf-8",
},
maxHistory: 1000,
prefetch: true,
prefetchStorage: true,
webirc: {
host: "irc.folk.zone",
password: "",
},
}; ```
Ensure all containers are on the same network: ```yaml folkzone-irc-ergo:
networks: [folkzone_net]
folkzone-irc-lounge:
networks: [folkzone_net]
caddy:
networks: [folkzone_net]
```
Steps:
1. Create `~/folkzone-new/irc/config.js` with the above content 2. Mount it in docker-compose.yml:
```yaml folkzone-irc-lounge:
volumes: - folkzone_irc_lounge_data:/var/opt/thelounge - ./irc/config.js:/var/opt/thelounge/config.js:ro
```
3. Ensure all IRC-related services use the same network 4. Restart: `docker compose up -d folkzone-irc-ergo folkzone-irc-lounge caddy` 5. Verify network connectivity: `docker exec folkzone_irc_lounge ping folkzone-irc-ergo`
Prevention
Always use Docker network names for inter-container communication. Keep all related services on the same network.
