After gitlab upgrade "FATAL: Failed to open or create log file"

Hi Guys

I have some Problems with my gitlab instance. I run gitlab with docker:

docker run -d --hostname gitlab.mydomain.ch -p 80:80 -p 443:443 -p 2222:22 --name gitlab -v /media/nfs/dockerdata/gitlab/config:/etc/gitlab -v /media/nfs/dockerdata/gitlab/logs:/var/log/gitlab -v /media/nfs/dockerdata/gitlab/data:/var/opt/gitlab -e TZ=Europe/Zurich gitlab/gitlab-ce:latest

After about 5 seconds the container stops with this error message:
Thank you for using GitLab Docker Image!
Current version: gitlab-ce=8.17.2-ce.0
Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
And restart this container to reload settings.
To do it use docker exec:
_ docker exec -it gitlab vim /etc/gitlab/gitlab.rb_
_ docker restart gitlab_
For a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
If this container fails to start due to permission problems try to fix it by executing:
_ docker exec -it gitlab update-permissions_
_ docker restart gitlab_
Preparing services…
Starting services…
Configuring GitLab package…
/opt/gitlab/embedded/bin/runsvdir-start: line 24: ulimit: pending signals: cannot modify limit: Operation not permitted
/opt/gitlab/embedded/bin/runsvdir-start: line 34: ulimit: max user processes: cannot modify limit: Operation not permitted
/opt/gitlab/embedded/bin/runsvdir-start: line 37: /proc/sys/fs/file-max: Read-only file system
Configuring GitLab…
[2017-03-07T14:39:23+01:00] FATAL: Failed to open or create log file at /var/log/gitlab/reconfigure/1488893963.log: Errno::EACCES (Permission denied @ rb_sysopen - /var/log/gitlab/reconfigure/1488893963.log)
[2017-03-07T14:39:23+01:00] FATAL: Aborting due to invalid ‘log_location’ configuration

I found other people having this problem (https://gitlab.com/gitlab-org/gitlab-ce/issues/13775 or http://stackoverflow.com/questions/35562995/running-gitlab-docker).

In my installation the folder /var/log/gitlab/reconfigure is already existung, so I dont have to create it manually. What I also tried:
docker run -d --hostname gitlab.mydomain.ch -p 80:80 -p 443:443 -p 2222:22 --name gitlab -v /media/nfs/dockerdata/gitlab/config:/etc/gitlab -v /media/nfs/dockerdata/gitlab/logs:/var/log/gitlab -v /media/nfs/dockerdata/gitlab/logs/reconfigure:/var/log/gitlab/reconfigure -v /media/nfs/dockerdata/gitlab/data:/var/opt/gitlab -e TZ=Europe/Zurich gitlab/gitlab-ce:latest

running docker exec -it gitlab update-permissions is not possible cause the container is not running :frowning:

Can anyone help me or give me a hint? Thanks a lot!

finally found a way to run gitlab update-permissions.

But there is still a problem:
$ docker logs -f gitlab
+ id -u git
998
+ chown -R git:git /var/opt/gitlab/.ssh
+ chown -R git:git /var/opt/gitlab/.gitconfig
+ chown -R git:git /var/opt/gitlab/git-data
+ chown -R git:git /var/opt/gitlab/gitlab-ci/builds
+ chown -R git:git /var/opt/gitlab/gitlab-rails
+ chown -R git:git /var/opt/gitlab/gitlab-shell
+ chown -R git:gitlab-www /var/opt/gitlab/gitlab-workhorse
+ chown git /var/opt/gitlab/gitlab-workhorse
+ chown git /var/log/gitlab/gitlab-rails
+ chown git /var/log/gitlab/gitlab-shell
+ chown git /var/log/gitlab/sidekiq
+ chown git /var/log/gitlab/unicorn
+ chown gitlab-psql /var/log/gitlab/postgresql
+ chown gitlab-redis /var/log/gitlab/redis
+ chown -R git:git /var/log/gitlab/gitlab-rails/application.log /var/log/gitlab/gitlab-rails/githost.log /var/log/gitlab/gitlab-rails/gitlab-rails-db-migrate-2017-01-27-09-08-09.log /var/log/gitlab/gitlab-rails/production.log /var/log/gitlab/gitlab-rails/repocheck.log /var/log/gitlab/gitlab-rails/sidekiq.log
+ chown -R git:git /var/log/gitlab/gitlab-shell/gitlab-shell.log
+ chown -R git:git /var/log/gitlab/unicorn/unicorn_stderr.log /var/log/gitlab/unicorn/unicorn_stdout.log
+ id -u gitlab-www
999
+ chown -R gitlab-www:gitlab-www /var/opt/gitlab/nginx/client_body_temp /var/opt/gitlab/nginx/fastcgi_temp /var/opt/gitlab/nginx/proxy_temp /var/opt/gitlab/nginx/scgi_temp /var/opt/gitlab/nginx/uwsgi_temp
+ chown -R gitlab-www:gitlab-www /var/opt/gitlab/nginx/proxy_cache
+ id -u gitlab-psql
996
+ chown -R gitlab-psql:gitlab-psql /var/opt/gitlab/postgresql
+ id -u gitlab-redis
997
+ chown -R gitlab-redis:gitlab-redis /var/opt/gitlab/redis
+ id -u registry
993
+ chown -R registry:registry /var/opt/gitlab/gitlab-rails/shared/registry
chown: cannot access ‘/var/opt/gitlab/gitlab-rails/shared/registry’: No such file or directory

Any hint? thanks