sameersbn / docker-gitlab

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

Unable to upgrade or relaunch older docker-compose file #991

Open sotaan opened 7 years ago

sotaan commented 7 years ago

While upgrading my docker-compose with the new one I get this:

Creating network "gitlab_default" with the default driver
Creating gitlab_postgresql_1
Creating gitlab_redis_1
Creating gitlab_gitlab_1
Attaching to gitlab_postgresql_1, gitlab_redis_1, gitlab_gitlab_1
postgresql_1  | Initializing datadir...
postgresql_1  | Initializing certdir...
redis_1       | Starting redis-server...
redis_1       | [1] 30 Nov 17:07:24.063 # Server started, Redis version 2.8.4
redis_1       | [1] 30 Nov 17:07:24.063 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
postgresql_1  | Initializing logdir...
postgresql_1  | Initializing rundir...
postgresql_1  | Setting resolv.conf ACLs...
postgresql_1  | Creating database user: gitlab
postgresql_1  | Creating database: gitlabhq_production...
Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 11, in <module>
    load_entry_point('docker-compose==1.9.0', 'console_scripts', 'docker-compose')()
  File "/usr/lib/python3.5/site-packages/compose/cli/main.py", line 65, in main
    command()
  File "/usr/lib/python3.5/site-packages/compose/cli/main.py", line 117, in perform_command
    handler(command, command_options)
  File "/usr/lib/python3.5/site-packages/compose/cli/main.py", line 862, in up
    log_printer.run()
  File "/usr/lib/python3.5/site-packages/compose/cli/log_printer.py", line 98, in run
    self.output.write(line)
UnicodeEncodeError: 'ascii' codec can't encode character '\u2023' in position 25: ordinal not in range(128)

I get the same final error if I use my old docker-compose file:

docker-compose -f docker-compose-tmp.yml up
Creating gitlab_redis_1
Creating gitlab_postgresql_1
Creating gitlab_gitlab_1
Attaching to gitlab_postgresql_1, gitlab_redis_1, gitlab_gitlab_1
postgresql_1  | Initializing datadir...
postgresql_1  | Initializing certdir...
postgresql_1  | Initializing logdir...
redis_1       | Starting redis-server...
postgresql_1  | Initializing rundir...
redis_1       |                 _._
redis_1       |            _.-``__ ''-._
redis_1       |       _.-``    `.  `_.  ''-._           Redis 2.8.4 (00000000/0) 64 bit
redis_1       |   .-`` .-```.  ```\/    _.,_ ''-._
redis_1       |  (    '      ,       .-`  | `,    )     Running in stand alone mode
redis_1       |  |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
redis_1       |  |    `-._   `._    /     _.-'    |     PID: 1
redis_1       |   `-._    `-._  `-./  _.-'    _.-'
redis_1       |  |`-._`-._    `-.__.-'    _.-'_.-'|
redis_1       |  |    `-._`-._        _.-'_.-'    |           http://redis.io
redis_1       |   `-._    `-._`-.__.-'_.-'    _.-'
redis_1       |  |`-._`-._    `-.__.-'    _.-'_.-'|
redis_1       |  |    `-._`-._        _.-'_.-'    |
redis_1       |   `-._    `-._`-.__.-'_.-'    _.-'
redis_1       |       `-._    `-.__.-'    _.-'
redis_1       |           `-._        _.-'
redis_1       |               `-.__.-'
redis_1       |
postgresql_1  | Setting resolv.conf ACLs...
redis_1       | [1] 30 Nov 17:11:13.719 # Server started, Redis version 2.8.4
redis_1       | [1] 30 Nov 17:11:13.719 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis_1       | [1] 30 Nov 17:11:13.720 * DB loaded from disk: 0.001 seconds
redis_1       | [1] 30 Nov 17:11:13.720 * The server is now ready to accept connections on port 6379
redis_1       | [1] 30 Nov 17:11:13.720 * The server is now ready to accept connections at /var/run/redis/redis.sock
postgresql_1  | Creating database user: gitlab
gitlab_1      | Initializing logdir...
gitlab_1      | Initializing datadir...
gitlab_1      | Installing configuration templates...
gitlab_1      | Configuring gitlab...
postgresql_1  | Creating database: gitlabhq_production...
Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 11, in <module>
    load_entry_point('docker-compose==1.9.0', 'console_scripts', 'docker-compose')()
  File "/usr/lib/python3.5/site-packages/compose/cli/main.py", line 65, in main
    command()
  File "/usr/lib/python3.5/site-packages/compose/cli/main.py", line 117, in perform_command
    handler(command, command_options)
  File "/usr/lib/python3.5/site-packages/compose/cli/main.py", line 862, in up
    log_printer.run()
  File "/usr/lib/python3.5/site-packages/compose/cli/log_printer.py", line 98, in run
    self.output.write(line)
UnicodeEncodeError: 'ascii' codec can't encode character '\u2023' in position 25: ordinal not in range(128)
sotaan commented 7 years ago

I didn't touch anything into the postgresql configuration except copy/paste my old password from my last docker-compose.yml file

iamchanghyunpark commented 7 years ago

Looks like a docker-compose error? What's the version of your docker-compose? Do you have any non-ascii characters in your directories?

iamchanghyunpark commented 7 years ago

Oh... something's weird. The unicode character 2023 is the triangular bullet. image

It should be printed by postgresql_1.... I wonder what's going on.

My docker compose is 1.7.0

sotaan commented 7 years ago
➜  ~ docker-compose -v
docker-compose version 1.9.0, build 2585387
sotaan commented 7 years ago

Using the -d option helped me pass through this error

iamchanghyunpark commented 7 years ago

Does printing the docker-compose logs result in the same exception?

sotaan commented 7 years ago

Still got the same output but at least I got gitlab working.

➜  gitlab $docker-compose logs
Attaching to gitlab_gitlab_1, gitlab_redis_1, gitlab_postgresql_1
gitlab_1      | Initializing logdir...
gitlab_1      | Initializing datadir...
gitlab_1      | Installing configuration templates...
gitlab_1      | Configuring gitlab...
gitlab_1      | Configuring gitlab::database.
gitlab_1      | Configuring gitlab::redis
gitlab_1      | Configuring gitlab::secrets...
gitlab_1      | Configuring gitlab::sidekiq...
gitlab_1      | Configuring gitlab::gitlab-workhorse...
gitlab_1      | Configuring gitlab::unicorn...
gitlab_1      | Configuring gitlab::timezone...
gitlab_1      | Configuring gitlab::rack_attack...
gitlab_1      | Configuring gitlab::ci...
gitlab_1      | Configuring gitlab::artifacts...
gitlab_1      | Configuring gitlab::lfs...
gitlab_1      | Configuring gitlab::project_features...
gitlab_1      | Configuring gitlab::smtp_settings...
gitlab_1      | Configuring gitlab::incoming_email...
gitlab_1      | Configuring gitlab::oauth...
gitlab_1      | Configuring gitlab::ldap...
gitlab_1      | Configuring gitlab::backups...
gitlab_1      | Configuring gitlab::backups::schedule...
gitlab_1      | Configuring gitlab::registry...
gitlab_1      | Configuring gitlab-shell...
gitlab_1      | Configuring nginx...
gitlab_1      | Configuring nginx::gitlab...
gitlab_1      | 2016-12-01 12:05:18,312 CRIT Supervisor running as root (no user in config file)
gitlab_1      | 2016-12-01 12:05:18,313 WARN Included extra file "/etc/supervisor/conf.d/cron.conf" during parsing
gitlab_1      | 2016-12-01 12:05:18,313 WARN Included extra file "/etc/supervisor/conf.d/gitlab-workhorse.conf" during parsing
gitlab_1      | 2016-12-01 12:05:18,313 WARN Included extra file "/etc/supervisor/conf.d/mail_room.conf" during parsing
gitlab_1      | 2016-12-01 12:05:18,313 WARN Included extra file "/etc/supervisor/conf.d/nginx.conf" during parsing
gitlab_1      | 2016-12-01 12:05:18,313 WARN Included extra file "/etc/supervisor/conf.d/sidekiq.conf" during parsing
gitlab_1      | 2016-12-01 12:05:18,313 WARN Included extra file "/etc/supervisor/conf.d/sshd.conf" during parsing
gitlab_1      | 2016-12-01 12:05:18,313 WARN Included extra file "/etc/supervisor/conf.d/unicorn.conf" during parsing
gitlab_1      | 2016-12-01 12:05:18,328 INFO RPC interface 'supervisor' initialized
gitlab_1      | 2016-12-01 12:05:18,328 CRIT Server 'unix_http_server' running without any HTTP authentication checking
gitlab_1      | 2016-12-01 12:05:18,328 INFO supervisord started with pid 1
gitlab_1      | 2016-12-01 12:05:19,331 INFO spawned: 'sidekiq' with pid 486
gitlab_1      | 2016-12-01 12:05:19,333 INFO spawned: 'unicorn' with pid 487
gitlab_1      | 2016-12-01 12:05:19,334 INFO spawned: 'mail_room' with pid 488
gitlab_1      | 2016-12-01 12:05:19,336 INFO spawned: 'gitlab-workhorse' with pid 489
gitlab_1      | 2016-12-01 12:05:19,337 INFO spawned: 'cron' with pid 490
gitlab_1      | 2016-12-01 12:05:19,339 INFO spawned: 'nginx' with pid 491
gitlab_1      | 2016-12-01 12:05:19,340 INFO spawned: 'sshd' with pid 492
gitlab_1      | 2016-12-01 12:05:21,030 INFO success: sidekiq entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
gitlab_1      | 2016-12-01 12:05:21,030 INFO success: unicorn entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
gitlab_1      | 2016-12-01 12:05:21,030 INFO success: mail_room entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
gitlab_1      | 2016-12-01 12:05:21,030 INFO success: gitlab-workhorse entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
gitlab_1      | 2016-12-01 12:05:21,030 INFO success: cron entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
gitlab_1      | 2016-12-01 12:05:21,030 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
gitlab_1      | 2016-12-01 12:05:21,030 INFO success: sshd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
redis_1       | Starting redis-server...
redis_1       | [1] 01 Dec 11:05:12.200 # Server started, Redis version 2.8.4
redis_1       | [1] 01 Dec 11:05:12.200 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
postgresql_1  | Initializing datadir...
postgresql_1  | Initializing certdir...
postgresql_1  | Initializing logdir...
postgresql_1  | Initializing rundir...
postgresql_1  | Setting resolv.conf ACLs...
postgresql_1  | Creating database user: gitlab
postgresql_1  | Creating database: gitlabhq_production...
Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 11, in <module>
    load_entry_point('docker-compose==1.9.0', 'console_scripts', 'docker-compose')()
  File "/usr/lib/python3.5/site-packages/compose/cli/main.py", line 65, in main
    command()
  File "/usr/lib/python3.5/site-packages/compose/cli/main.py", line 117, in perform_command
    handler(command, command_options)
  File "/usr/lib/python3.5/site-packages/compose/cli/main.py", line 528, in logs
    event_stream=self.project.events(service_names=options['SERVICE'])).run()
  File "/usr/lib/python3.5/site-packages/compose/cli/log_printer.py", line 98, in run
    self.output.write(line)
UnicodeEncodeError: 'ascii' codec can't encode character '\u2023' in position 25: ordinal not in range(128)
iamchanghyunpark commented 7 years ago

Yes, I think it's a real good thing you found a way to startup gitlab! Perhaps you might want to post a bug report to docker-compose repository.

sotaan commented 7 years ago

I already found issues related to this which were supposed to be already resolved and patched a long time ago

iamchanghyunpark commented 7 years ago

Yes, I also looked up some similar issues, perhaps it may be due to your python version, or other issues as well.... :(

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had any activity for the last 60 days. It will be closed if no further activity occurs during the next 7 days. Thank you for your contributions.