Skip to content
Snippets Groups Projects
Closed docker run command fails on Windows with pg_ctl: could not start server
  • View options
  • docker run command fails on Windows with pg_ctl: could not start server

  • View options
  • Closed Issue created by Warren Gifford

    Created by: felixfbecker

    PS C:\Users\felix> docker run --publish 7080:7080 --rm --volume ~/.sourcegraph/config:/etc/sourcegraph --volume ~/.sourcegraph/data:/var/opt/sourcegraph --volume /var/run/docker.sock:/var/run/docker.sock sourcegraph/server:2.11.2
    ✱ Sourcegraph is initializing the internal database... (may take 15-20 seconds)
    Setting up postgres failed:
    
    $ mkdir -p /var/opt/sourcegraph/postgresql
    
    $ chown postgres /var/opt/sourcegraph/postgresql
    
    $ su-exec postgres initdb -D /var/opt/sourcegraph/postgresql --nosync
    The files belonging to this database system will be owned by user "postgres".
    This user must also own the server process.
    
    The database cluster will be initialized with locale "en_US.utf8".
    The default database encoding has accordingly been set to "UTF8".
    The default text search configuration will be set to "english".
    
    Data page checksums are disabled.
    
    fixing permissions on existing directory /var/opt/sourcegraph/postgresql ... ok
    creating subdirectories ... ok
    selecting default max_connections ... 100
    selecting default shared_buffers ... 128MB
    selecting dynamic shared memory implementation ... posix
    creating configuration files ... ok
    running bootstrap script ... ok
    performing post-bootstrap initialization ... sh: locale: not found
    No usable system locales were found.
    Use the option "--debug" to see details.
    ok
    
    Sync to disk skipped.
    The data directory might become corrupt if the operating system crashes.
    
    WARNING: enabling "trust" authentication for local connections
    You can change this by editing pg_hba.conf or using the option -A, or
    --auth-local and --auth-host, the next time you run initdb.
    
    Success.
    
    
    $ su-exec postgres pg_ctl -D /var/opt/sourcegraph/postgresql -o -c listen_addresses=127.0.0.1 -l /tmp/pgsql.log -w start
    waiting for server to start.... stopped waiting
    pg_ctl: could not start server
    Examine the log output.
    exit status 1

    Activity

    • All activity
    • Comments only
    • History only
    • Newest first
    • Oldest first