sameersbn / docker-gitlab

Dockerized GitLab
http://www.damagehead.com/docker-gitlab/
MIT License
7.9k stars 2.14k forks source link

Start error db:migration #955

Open ghost opened 8 years ago

ghost commented 8 years ago

I have problem with start.

I install gitlab wich containter station on qnap.

log:

/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:955:in migrate' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:823:inup'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:801:in migrate' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/tasks/database_tasks.rb:137:inmigrate'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/railties/databases.rake:44:in block (2 levels) in <top (required)>' Failed to rewrite gitlab-shell hooks in repositories /home/git/gitlab/db/migrate/20140903115954_migrate_to_new_shell.rb:10:inchange'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:608:in exec_migration' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:592:inblock (2 levels) in migrate'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:591:in block in migrate' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:292:inwith_connection'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:590:in migrate' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:768:inmigrate'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:998:in block in execute_migration_in_transaction' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:1044:inblock in ddl_transaction'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in block in transaction' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/transaction.rb:184:inwithin_new_transaction'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/connection_adapters/abstract/database_statements.rb:213:in transaction' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/transactions.rb:220:intransaction'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:1044:in ddl_transaction' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:997:inexecute_migration_in_transaction'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:959:in block in migrate' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:955:ineach'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:955:in migrate' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:823:inup'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/migration.rb:801:in migrate' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/tasks/database_tasks.rb:137:inmigrate'
/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.6/lib/active_record/railties/databases.rake:44:in `block (2 levels) in <top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

solidnerd commented 8 years ago

Hey, which database do you use ?

ghost commented 8 years ago

PostgreSQL

image

ghost commented 8 years ago

You need some more information?

mbger commented 7 years ago

Could you resolve this issue or are there any updates? I seem to have the same issue.

I always get the following error: PG::ConnectionBad: could not translate host name "postgresql" to address: Name or service not known

The gitlab container and the postgres container are both linked to each other, and when I configure my gitlab container intentionally with wrong database credentials, I do get an error that says Password for user gitlab not correct (or sth. along those lines).

I first tried creating the containers through the Container Station GUI provided by QNAP. I then used docker-compose. Both approaches lead to the same error.

Additional Info: Gitlab image: sameersbn/gitlab:9.0.2 PostgreSQL image: sameersbn/postgresql:9.6-2 Redis image: sameersbn/redis:latest

Docker version 1.11.2, build a125cdf docker-compose version 1.9.0, build unknown