itzg / itzg/mc-router

Cannot access api

Open
#76 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
942
Forks
74
Avg merge
20h 14m
Merged PRs (30d)
15

Description

Here is my docker-compose, running on a docker swarm, domain is just a placeholder.

One of the hosts is 172.16.100.56

```
version: '3.4'

services:
router:
image: itzg/mc-router
ports:
- 25565:25565
- 8080:8080
command: --mapping=domain=test1:25565,domain=test2:25565
environment:
API_BINDING: ":8080"
DEBUG: "TRUE"
test1:
image: itzg/minecraft-server
environment:
EULA: "TRUE"
test2:
image: itzg/minecraft-server
environment:
EULA: "TRUE"
```

A request from the same machine returns:

```
debian@Docker-Swarm-1:~$ wget 172.16.100.56:8080/routes
--2022-04-25 03:08:49-- http://172.16.100.56:8080/routes
Connecting to 172.16.100.56:8080... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-04-25 03:08:49 ERROR 404: Not Found.
```

A request from my laptop isn't any better.

Any ideas?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the 404 with the provided docker-compose configuration and the /routes request against port 8080. Inspect how the router exposes its API and compare the configured API_BINDING with the requested endpoint; done means the intended API endpoint is reachable or the issue clearly explains why /routes is unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, go
Domain
api, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.