Skip to content

Problem with Sourcegraph quickstart guide on Linux Elementary OS

Created by: slabo

Hi, I'm trying to run sourcegraph on a local docker instance. My first time using docker really. I installed according to https://docs.docker.com/engine/install/ubuntu/
(hello-world) and (ubuntu bash) run with no problems. Not so lucky running sourcegraph. Something about postgres not connecting.

➜  dockerz sudo docker run --publish 7080:7080 --publish 127.0.0.1:3370:3370 --rm --volume ~/.sourcegraph/config:/etc/sourcegraph --volume ~/.sourcegraph/data:/var/opt/sourcegraph sourcegraph/server:3.24.0
✱ Repairing redis-store appendonly.aof failed:

$ /usr/bin/redis-check-aof redis-check-aof --fix /var/opt/sourcegraph/redis/appendonly.aof
Empty file: /var/opt/sourcegraph/redis/appendonly.aof

18:35:02           zoekt-webserver | 2021/01/26 18:35:02 listening on 127.0.0.1:3070
18:35:12         postgres_exporter | time="2021-01-26T18:35:12Z" level=error msg="Error opening connection to database (postgres://postgres:[email protected]:5432): pq: the database system is starting up" source="postgres_exporter.go:1403"
18:35:13                  frontend | ERROR: failed to connect to frontend database: DB not available: database did not start up within 10s (pq: the database system is starting up)
frontend died. Shutting down...
18:35:13                  frontend | Terminating frontend
18:35:13           zoekt-webserver | 2021/01/26 18:35:13 shutting down
18:35:13         postgres_exporter | Terminating postgres_exporter
18:35:13              github-proxy | Terminating github-proxy
18:35:13                prometheus | Terminating prometheus
18:35:13                 gitserver | Terminating gitserver
18:35:13                   symbols | Terminating symbols
18:35:13            syntect_server | Terminating syntect_server
18:35:13         zoekt-indexserver | Terminating zoekt-indexserver
18:35:13           zoekt-webserver | Terminating zoekt-webserver
18:35:13              query-runner | Terminating query-runner
18:35:13              repo-updater | Terminating repo-updater
18:35:13                  searcher | Terminating searcher
18:35:13 precise-code-intel-worker | Terminating precise-code-intel-worker
18:35:13                     nginx | Terminating nginx
18:35:13                    jaeger | Terminating jaeger
18:35:13                     minio | Terminating minio
18:35:14               redis-store | Terminating redis-store
18:35:14               redis-cache | Terminating redis-cache
18:35:20                   grafana | Terminating grafana
18:35:23                  postgres | Terminating postgres
➜  dockerz

Any help appreciated, thanks.