riotkit-org / docker-taiga

Production-ready docker container for Taiga https://taiga.io
https://quay.io/repository/riotkit/taiga?tab=tags
GNU General Public License v3.0
55 stars 8 forks source link

Taiga container exited with code 2 #28

Closed suren2306 closed 4 years ago

suren2306 commented 4 years ago

I tried to launch the containers but it exited with code 2. Below are the logs,

[user@test-pc taiga]# make start
Recreating taiga_postgres_1 ... done
Recreating taiga_taiga_1    ... done
Attaching to taiga_postgres_1, taiga_taiga_1
taiga_1     |  >> Setting user id and group id
taiga_1     | usermod: no changes
taiga_1     |  >> Correcting permissions
postgres_1  | 
postgres_1  | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgres_1  | 
postgres_1  | 2020-01-07 12:22:15.667 UTC [1] LOG:  starting PostgreSQL 12.1 (Debian 12.1-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
postgres_1  | 2020-01-07 12:22:15.667 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
postgres_1  | 2020-01-07 12:22:15.667 UTC [1] LOG:  listening on IPv6 address "::", port 5432
postgres_1  | 2020-01-07 12:22:15.669 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgres_1  | 2020-01-07 12:22:15.683 UTC [24] LOG:  database system was shut down at 2020-01-07 12:21:02 UTC
postgres_1  | 2020-01-07 12:22:15.688 UTC [1] LOG:  database system is ready to accept connections
taiga_1     |  >> Preparing configuration files...
taiga_1     |  HINT: Add your files into /etc/nginx/extensions.d to include them in NGINX configuration
taiga_1     |  >> Enabling plugins
taiga_1     |  >> Preparing a database migration
taiga_1     | Running database check
taiga_1     | Connecting to database:
taiga_1     | dbname='taiga' user='postgres' host='postgres' password='password'
taiga_1     | Database does not appear to be setup.
taiga_taiga_1 exited with code 2
blackandred commented 4 years ago

Hi!

Please use the version 1.0.1 of the container, for examplequay.io/riotkit/taiga:5.0.2-b1.0.1 In .env just set VERSION=5.0.2-b1.0.1

I just bumped the version in repository in the .env, but you must also update it yourself in already cloned repository.

On Tue, Jan 7, 2020 at 2:02 PM Surendar notifications@github.com wrote:

I tried to launch the containers but it exited with code 2. Below are the logs,

[user@test-pc taiga]# make start Recreating taiga_postgres_1 ... done Recreating taiga_taiga_1 ... done Attaching to taiga_postgres_1, taiga_taiga_1 taiga_1 | >> Setting user id and group id taiga_1 | usermod: no changes taiga_1 | >> Correcting permissions postgres_1 | postgres_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization postgres_1 | postgres_1 | 2020-01-07 12:22:15.667 UTC [1] LOG: starting PostgreSQL 12.1 (Debian 12.1-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit postgres_1 | 2020-01-07 12:22:15.667 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 postgres_1 | 2020-01-07 12:22:15.667 UTC [1] LOG: listening on IPv6 address "::", port 5432 postgres_1 | 2020-01-07 12:22:15.669 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" postgres_1 | 2020-01-07 12:22:15.683 UTC [24] LOG: database system was shut down at 2020-01-07 12:21:02 UTC postgres_1 | 2020-01-07 12:22:15.688 UTC [1] LOG: database system is ready to accept connections taiga_1 | >> Preparing configuration files... taiga_1 | HINT: Add your files into /etc/nginx/extensions.d to include them in NGINX configuration taiga_1 | >> Enabling plugins taiga_1 | >> Preparing a database migration taiga_1 | Running database check taiga_1 | Connecting to database: taiga_1 | dbname='taiga' user='postgres' host='postgres' password='password' taiga_1 | Database does not appear to be setup. taiga_taiga_1 exited with code 2

— .

suren2306 commented 4 years ago

Yesterday I tried different tags but no luck, I saw some issues related to Postgres DB (Sorry I don't have the exact error). Changed the name of Postgres container (removed the s) and then the container ran perfectly.

taiga:
        image: quay.io/riotkit/taiga:${VERSION}
        ports:
            - 80
            - 443
        depends_on:
            - postgre
        volumes:
            # all data placed in volumes are kept between container updates/deletion/recreation
            - media:/usr/src/taiga-back/media
        env_file:
            - .env
        environment:
            - LIVE=1

    postgre:
        image: postgres
        environment:
            POSTGRES_DB: ${TAIGA_DB_NAME}
            POSTGRES_PASSWORD: ${TAIGA_DB_PASSWORD}
            POSTGRES_USER: ${TAIGA_DB_USER}
        ports:
            - 5432
        volumes:
            - postgres:/var/lib/postgresql/data

Everything works good other than email. I have configured Amazon SES for email delivery. I tried to troubleshoot the mail issue but I don't see any mail log inside the Taiga container. Where to look for logs related to email delivery ?

blackandred commented 4 years ago

I just did a git clone and make clear start and... database was migrated, I see Taiga tutorial on screen in browser. Strange.

If you had to change anything related to compose service names, then it may mean that you had something cached.

To remove the cache do make clear - do not do at production, it removes network, volumes and containers.

blackandred commented 4 years ago

Made also sudo docker-compose pull then make clear start, still cannot reproduce issue on clear environment.

➜  ~ sudo docker info
Client:
 Debug Mode: false

Server:
 Containers: 143
  Running: 5
  Paused: 0
  Stopped: 138
 Images: 564
 Server Version: 19.03.4-ce
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: false
 Logging Driver: journald
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: d50db0a42053864a270f648048f9a8b4f24eced3.m
 runc version: d736ef14f0288d6993a1845745d6756cfc9ddd5a
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.19.81-1-MANJARO
 Operating System: Manjaro Linux
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 31.07GiB
 Name: xxxxx
 ID: yyyyy
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
blackandred commented 4 years ago

Regarding logs - I see Taiga produces no logs. For logs you can create a separate issue as an improvement request. Then we will see what can be done.

blackandred commented 4 years ago

Is this still an issue? Closing due to lack of activity. Will reopen if its still an issue with latest version of the container.