apache / apache/couchdb-docker
replication not working when port changed
- Dominant language
- Dockerfile
- Stars
- 290
- Forks
- 146
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I just found a problem when changing the port number: It seems to break replikation.
The case:
Running several instances of docker hub's couchdb:latest (with podman)
- one on the server machine S
- one on the developer machine D
task: replicate a database D -> S
But since port 5984 on D is sometimes needed for testing and developing couchdb instances, the port of the instance running on D has been moved by telling podman to use a portmapping 5988:5984
Thus, a browser running on D will find it at http://localhost:5988/_utils
Replication local database (on D) to remote database (on S) doesn't work then.
Reason, as far as I do understand the logs: The _utils' method to add a replication (from: local) uses the given URL to find the local cadatabase, i.e. it tries to contact the local database as http://localhost:5988/ , but inside the container, it resides on 5984.
In order to make this work, a mapping of 5988:5988 would be neeed. Unfortunately, the docker image does not take a variable to change the port number.
regards
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing replication from the local instance through the 5988:5984 port mapping, then inspect the _utils method used to add a replication and how the Docker image exposes its port. Compare the local database URL seen by the browser with the URL reachable inside the container. Done means replication from D to S succeeds with the changed host port.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker
- Domain
- databases, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100