after upgrading my gitlab from 10.9.2 to version 10.10 on my Ubuntu 18.04 it was not possible for the apt-get upgrade process to end successfully. It ended with following message:

Ensuring Prometheus is updated:Traceback (most recent call last):
    11: from /opt/gitlab/embedded/bin/omnibus-ctl:23:in `<main>'
    10: from /opt/gitlab/embedded/bin/omnibus-ctl:23:in `load'
     9: from /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/omnibus-ctl-0.6.0/bin/omnibus-ctl:31:in `<top (required)>'
     8: from /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:746:in `run'
     7: from /opt/gitlab/embedded/lib/ruby/gems/2.6.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:197:in `block in add_command'
     6: from /opt/gitlab/embedded/service/omnibus-ctl/prometheus-upgrade.rb:45:in `block in load_file'
     5: from /opt/gitlab/embedded/service/omnibus-ctl/lib/gitlab_ctl/prometheus_upgrade.rb:40:in `backup_data'
     4: from /opt/gitlab/embedded/lib/ruby/2.6.0/fileutils.rb:520:in `mv'
     3: from /opt/gitlab/embedded/lib/ruby/2.6.0/fileutils.rb:1555:in `fu_each_src_dest'
     2: from /opt/gitlab/embedded/lib/ruby/2.6.0/fileutils.rb:1571:in `fu_each_src_dest0'
     1: from /opt/gitlab/embedded/lib/ruby/2.6.0/fileutils.rb:1557:in `block in fu_each_src_dest'
/opt/gitlab/embedded/lib/ruby/2.6.0/fileutils.rb:525:in `block in mv': File exists - /var/opt/gitlab/prometheus/data_tmp/data (Errno::EEXIST)
Ensuring Prometheus is updated: NOT OK
Error ensuring Prometheus is updated. Please check the logs
dpkg: error processing package gitlab-ce (--configure):
 installed gitlab-ce package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)

When I restart my gitlab with gitlab-ctl restart it is working fine, but when I try apt-get upgrade again, it want to finish the installation and stops again with same message.

Any idea?

1 Answer 1


The problem is File exists - /var/opt/gitlab/prometheus/data_tmp/data (Errno::EEXIST). The error message is mentioned in a GitLab issue about another problem. You could move that file /var/opt/gitlab/prometheus/data_tmp/data to another location or remove it altogether (you would lose data that way) and hope that the update will run through.

  • this was not successful, file was automatically created again and same error again - but thanks for the idea! May 6, 2020 at 7:11
  • 1
    I'm sorry to read that. I guess it is best for you to file a issue with GitLab. May 6, 2020 at 7:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.