microsoft / microsoft/planetary-computer-apis
setup script fails with psycopg connection error
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 129
- Forks
- 33
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 1
Description
Describe the bug
Running ./scripts/setup fails with error connecting in 'pool-1': connection is bad: Temporary failure in name resolution. Per git bisect, this problem exists from #147 onward.
Partial shell output:
... snip ...
[+] Building 19.8s (9/9) FINISHED
=> [internal] load build definition from Dockerfile.dev 0.0s
=> => transferring dockerfile: 194B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/pc-apis-tiler:latest 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 42B 0.0s
=> [1/4] FROM docker.io/library/pc-apis-tiler 0.2s
=> [2/4] COPY requirements-dev.txt requirements-dev.txt 0.1s
=> [3/4] RUN pip install -r requirements-dev.txt 13.9s
=> [4/4] RUN pip install -e ./pccommon -e ./pctiler 4.7s
=> exporting to image 0.8s
=> => exporting layers 0.8s
=> => writing image sha256:a7ed39a9cc859d4bf5209d73bdb50c18f2ec65de2b219018ed58e5e7d0b25d46 0.0s
=> => naming to docker.io/library/pc-apis-tiler-dev 0.0s
migrating...
WARN[0000] The "APP_INSIGHTS_INSTRUMENTATION_KEY" variable is not set. Defaulting to a blank string.
WARN[0000] The "APP_INSIGHTS_INSTRUMENTATION_KEY" variable is not set. Defaulting to a blank string.
[+] Running 4/4
⠿ Network pc-apis-dev-network Created 0.0s
⠿ Container planetary-computer-apis-redis-1 Created 0.3s
⠿ Container pc-stac-db Created 0.3s
⠿ Container pcapis-azurite Created 0.3s
[+] Running 3/3
⠿ Container pcapis-azurite Started 1.2s
⠿ Container pc-stac-db Started 1.3s
⠿ Container planetary-computer-apis-redis-1 Started 1.0s
error connecting in 'pool-1': connection is bad: Temporary failure in name resolution
error connecting in 'pool-1': connection is bad: Temporary failure in name resolution
error connecting in 'pool-1': connection is bad: Temporary failure in name resolution
error connecting in 'pool-1': connection is bad: Temporary failure in name resolution
error connecting in 'pool-1': connection is bad: Temporary failure in name resolution
error connecting in 'pool-1': connection is bad: Temporary failure in name resolution
error connecting in 'pool-1': connection is bad: Temporary failure in name resolution
error connecting in 'pool-1': connection is bad: Temporary failure in name resolution
Traceback (most recent call last):
File "/usr/local/bin/pypgstac", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.9/site-packages/pypgstac/pypgstac.py", line 121, in cli
fire.Fire(PgstacCLI)
File "/usr/local/lib/python3.9/site-packages/fire/core.py", line 141, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
File "/usr/local/lib/python3.9/site-packages/fire/core.py", line 466, in _Fire
component, remaining_args = _CallAndUpdateTrace(
File "/usr/local/lib/python3.9/site-packages/fire/core.py", line 681, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
File "/usr/local/lib/python3.9/site-packages/pypgstac/pypgstac.py", line 50, in pgready
self._db.wait()
File "/usr/local/lib/python3.9/site-packages/pypgstac/db.py", line 125, in wait
raise psycopg.errors.CannotConnectNow
psycopg.errors.CannotConnectNow
Additional context
os = Windows 11 / WSL2
docker version = Docker version 20.10.23, build 7155243
docker-compose version = Docker Compose version v2.15.1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with ./scripts/setup on the documented Windows 11/WSL2 and Docker versions. Start by reading scripts/setup and Dockerfile.dev, then trace the pypgstac connection configuration shown in the output. Done means setup completes without repeated name-resolution errors or CannotConnectNow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, python
- Domain
- databases, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100