citusdata / citusdata/membership-manager

error to connect master

Open
#3 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
22
Forks
26
PR merge metrics
No merged PRs in 30d

Description

I used below docker-compose file to start a new citus db , and it can't start up
```
version: '2.1'
services:
master:
container_name: "crawlerapp_citus_master"
image: 'citusdata/citus:7.0.2'
ports: ["5435:5432"]
labels: ['com.citusdata.role=Master']
worker:
image: 'citusdata/citus:7.0.2'
labels: ['com.citusdata.role=Worker']
depends_on:
- manager
manager:
container_name: "crawlerapp_citus_manager"
image: 'citusdata/membership-manager:0.2.0'
volumes: ['/var/run/docker.sock:/var/run/docker.sock']
depends_on:
- master
```
Error:
```
crawlerapp_citus_manager | 2017-10-12T08:59:22.076391668Z Traceback (most recent call last):
crawlerapp_citus_manager | 2017-10-12T08:59:22.076416025Z File "./manager.py", line 97, in
crawlerapp_citus_manager | 2017-10-12T08:59:22.076568390Z main()
crawlerapp_citus_manager | 2017-10-12T08:59:22.076581185Z File "./manager.py", line 93, in main
crawlerapp_citus_manager | 2017-10-12T08:59:22.076629913Z docker_checker()
crawlerapp_citus_manager | 2017-10-12T08:59:22.076637428Z File "./manager.py", line 60, in docker_checker
crawlerapp_citus_manager | 2017-10-12T08:59:22.076795199Z conn = connect_to_master()
crawlerapp_citus_manager | 2017-10-12T08:59:22.076803122Z File "./manager.py", line 47, in connect_to_master
crawlerapp_citus_manager | 2017-10-12T08:59:22.076889557Z (postgres_db, postgres_user, citus_host, postgres_pass))
crawlerapp_citus_manager | 2017-10-12T08:59:22.076898633Z File "/usr/local/lib/python3.6/site-packages/psycopg2/__init__.py", line 130, in connect
crawlerapp_citus_manager | 2017-10-12T08:59:22.077069013Z conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
crawlerapp_citus_manager | 2017-10-12T08:59:22.077076586Z psycopg2.OperationalError: could not translate host name "master" to address: Name does not resolve
```
This error happens in my cloud server, it's OK in my local mac machine,

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with manager.py, especially connect_to_master and the docker_checker call shown in the traceback, then compare the provided docker-compose service and dependency configuration between the local Mac and cloud server. Reproduce the startup failure in the cloud environment; done means the manager can resolve and connect to the master service and the stack starts without the psycopg2 hostname error.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, postgresql, python
Domain
databases, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.