subgit timeout waiting for pid file - docker

I have GitLab on docker container and I tried to use SubGit. Synchronization from SVN to Git working good, but I have problem when i try to do git push. I get the following error and the daemon.pid file is deleted from subgit directory.
Delta compression using up to 4 threads.
Total 5 (delta 4), reused 0 (delta 0)
remote:
remote: SubGit ERROR REPORT (SubGit version 3.2.2 ('Bobique') build #3603):
remote:
remote: You've received this message because SubGit (http://subgit.com/) is installed in your repository
remote: and an error that needs to be dealt with has occurred in SubGit translation engine.
remote:
remote: TEMPORARY ERROR:
remote: Failed to launch background translation process: timeout waiting for pid file '/var/opt/gitlab/git-data/repositories/lpp/OA.git/./subgit/daemon.pid'.
remote:
remote: CURRENT STATE:
remote: Both Git and Subversion repository are open for pushes or commits.
remote: Your commit was not committed, but you may retry it.
remote:
remote: TO RECOVER:
remote: A) Address the problem if possible and then retry commit
remote: OR
remote: B) Run on the server
remote: $ subgit uninstall /var/opt/gitlab/git-data/repositories/lpp/OA.git/.
remote:
remote: IMPORTANT: As soon as SubGit is uninstalled, both Git and Subversion repositories
remote: will become open, but no synchronization will take place.
remote:
remote: TO REPORT:
remote: Report an issue at ...
remote: You may find logs on the server at '/var/opt/gitlab/git-data/repositories/lpp/OA.git/./subgit/logs'
remote:
remote: THANK YOU!
error: failed to push some refs to ...
Not all refs have been pushed.

When i run subgit configure/install inside container (docker exec -it container-name bash) then files owner was correct (git) and everything is good now :)

Related

How Can I Push My Ruby/Rails App To Heroku?

I'm very new to software programming, so bear with me. I'm taking an online web development course that uses Ruby on Rails via AWS on Cloud9. I've gotten to a point in the course where it's time to push my program to Heroku, but it's not working. As you'll see in the code I attached below, it states "The Ruby version you are trying to install does not exist: ruby-2.3.0." It's an old version of Ruby, so that's understandable. It's an old course, after all.
Naturally, I tried to install a more updated version of Ruby (Ruby 2.7.6) in my virtual workstation, and I received confirmation from my command line that it had installed successfully. Or so I thought. After attempting to deploy the code again to Heroku, I received the same notification - that Ruby 2.3.0 doesn't exist. But I thought I had updated my Ruby version? Meanwhile, I cannot continue the course until this is resolved. Any help would be greatly appreciated. Thank you!
ec2-user:~/environment/saasapp (master) $ git push heroku master
Enumerating objects: 15518, done.
Counting objects: 100% (15518/15518), done.
Compressing objects: 100% (8189/8189), done.
Writing objects: 100% (15518/15518), 38.29 MiB | 42.71 MiB/s, done.
Total 15518 (delta 5945), reused 15518 (delta 5945), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-18 stack
remote: -----> Determining which buildpack to use for this app
remote: -----> Ruby app detected
remote: -----> Installing bundler 1.17.3
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://heroku-buildpack-ruby.s3.us-east-1.amazonaws.com/heroku-18/ruby-2.3.0.tgz -s -o - | tar zxf - ' failed on attempt 1 of 3.
remote: Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://heroku-buildpack-ruby.s3.us-east-1.amazonaws.com/heroku-18/ruby-2.3.0.tgz -s -o - | tar zxf - ' failed on attempt 2 of 3.
remote:
remote: !
remote: ! The Ruby version you are trying to install does not exist: ruby-2.3.0
remote: !
remote: ! Heroku recommends you use the latest supported Ruby version listed here:
remote: ! https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
remote: !
remote: ! For more information on syntax for declaring a Ruby version see:
remote: ! https://devcenter.heroku.com/articles/ruby-versions
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: !
remote: ! ## Warning - The same version of this code has already been built: 0c41dc02b467640a074f0ffcb8c93cf034e44fad
remote: !
remote: ! We have detected that you have triggered a build from source code with version 0c41dc02b467640a074f0ffcb8c93cf034e44fad
remote: ! at least twice. One common cause of this behavior is attempting to deploy code from a different branch.
remote: !
remote: ! If you are developing on a branch and deploying via git you must run:
remote: !
remote: ! git push heroku <branchname>:main
remote: !
remote: ! This article goes into details on the behavior:
remote: ! https://devcenter.heroku.com/articles/duplicate-build-version
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to secret-shelf-76327.
remote:
To https://git.heroku.com/secret-shelf-76327.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/secret-shelf-76327.git'
The rails version you are currently working in and the rails version present in your bin/rails file is different. you just need to regenerate the binstubs file with your local ruby version.
Run this command to regenerate your bundler file.
bundle binstubs bundler --force
for more info refer the doc here.
https://bundler.io/man/bundle-binstubs.1.html
You can define the ruby version in the Gemfile itself.
source 'https://rubygems.org'
ruby "2.6.5"
Add these lines at the top of your Gemfile and do a bundle install again.

Heroku push rejected because gems fail to install

I need some help with this small app I am trying to push to heroku after doing
git add .
git commit -m "message here"
git push heroku master
I get the following error message:
Enumerating objects: 174, done.
Counting objects: 100% (174/174), done.
Delta compression using up to 12 threads
Compressing objects: 100% (156/156), done.
Writing objects: 100% (174/174), 38.41 KiB | 2.40 MiB/s, done.
Total 174 (delta 62), reused 36 (delta 3)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Determining which buildpack to use for this app
remote: -----> Ruby app detected
remote: -----> Installing bundler 2.3.10
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.6.6
remote: -----> Installing dependencies using bundler 2.3.10
remote: Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4
remote: /usr/bin/env: ‘ruby\r’: No such file or directory
remote: Bundler Output: /usr/bin/env: ‘ruby\r’: No such file or directory
remote:
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to damp-spire-06287.
remote:
To https://git.heroku.com/damp-spire-06287.git
! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/damp-spire-06287.git
I am not sure if it is an issue with the bundler version or something else but I need any help if possible. I have tried doing
bundle install and bundle update
and the bundle completes without a hitch. I have been stuck for a while and tried replacing the bundle version to no avail. Thanks in advance!
This error is caused because you have incorrect line endings (CRLF vs. LF) in your repo, which is generally caused when you are working/deploying across Windows and Unix-like environments. Mac/Unix/Linux environments -- which Heroku uses -- use a single linefeed (usually denoted \n) character to terminate a line while Windows uses a carriage return/linefeed pair (\r\n).
If your local repo is on a Windows machine you'll need to convert the files in your repo before pushing to Heroku. You can configure Git to handle the auto-conversion so that you have Windows terminators when you checkout on Windows but maintain the repo with just linefeeds.
To set up the automatic conversion:
% git config --global core.autocrlf input
Git also provides a way to refresh your repo to ensure all the line endings are correct. This can cause merge headaches since this can affect every line in some/all files, so you preferably want to do this on a fully up-to-date repo (i.e., no un-pushed changes).
% git add --renormalize .
% git commit -m "Normalize all the line endings"
https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings

Herokuproblem pushing problem: error: failed to push some refs to 'https://git.heroku.com/wwwwwww.git'

I am trying to push my Rails app to Heroku but it is showing me this error again and again. What is the problem?
Enumerating objects: 140, done.
Counting objects: 100% (140/140), done.
Delta compression using up to 2 threads
Compressing objects: 100% (122/122), done.
Writing objects: 100% (140/140), 145.92 KiB | 1.50 MiB/s, done.
Total 140 (delta 10), reused 0 (delta 0), pack-reused 0
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Determining which buildpack to use for this app
remote: ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used.
remote: Detected buildpacks: Ruby,Node.js
remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order
remote: -----> Ruby app detected
remote: -----> Installing bundler 2.2.21
remote: -----> Removing BUNDLED WITH version in the Gemfile.lock
remote: -----> Compiling Ruby/Rails
remote: Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-20/ruby-2.7.0.tgz -s -o - | tar zxf - ' failed on attempt 1 of 3.
remote: Command: 'set -o pipefail; curl -L --fail --retry 5 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/heroku-20/ruby-2.7.0.tgz -s -o - | tar zxf - ' failed on attempt 2 of 3.
remote:
remote: !
remote: ! The Ruby version you are trying to install does not exist on this stack.
remote: !
remote: ! You are trying to install ruby-2.7.0 on heroku-20.
remote: !
remote: ! Ruby ruby-2.7.0 is present on the following stacks:
remote: !
remote: ! - heroku-18
remote: !
remote: ! Heroku recommends you use the latest supported Ruby version listed here:
remote: ! https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
remote: !
remote: ! For more information on syntax for declaring a Ruby version see:
remote: ! https://devcenter.heroku.com/articles/ruby-versions
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to first-rails-application11.
remote:
To https://git.heroku.com/first-rails-application11.git
! [remote rejected] dev -> main (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/first-rails-application11.git'
I ran heroku login and heroku create, and after completing some steps I ran git push heroku main and got this error. I also tried git push heroku main: main, but that didn't change anything. Then I created a branch and then for example, dev then I ran git push heroku dev:main but its again failing.
This has nothing to do with how you are pushing to main. Creating a branch and explicitly naming the remote branch when you push won't help.
Take a closer look at the error message:
remote: ! The Ruby version you are trying to install does not exist on this stack.
remote: !
remote: ! You are trying to install ruby-2.7.0 on heroku-20.
remote: !
remote: ! Ruby ruby-2.7.0 is present on the following stacks:
remote: !
remote: ! - heroku-18
remote: !
remote: ! Heroku recommends you use the latest supported Ruby version listed here:
remote: ! https://devcenter.heroku.com/articles/ruby-support#supported-runtimes
remote: !
remote: ! For more information on syntax for declaring a Ruby version see:
remote: ! https://devcenter.heroku.com/articles/ruby-versions
remote: !
remote: ! Push rejected, failed to compile Ruby app.
Ruby 2.7.0 is not supported, but if you visit the page mentioned in the error message you should see that version 2.7.3 is supported (at the time of writing).
Update your Gemfile accordingly, commit, and redeploy.

A security vulnerability has been detected in your application

I'm running a Rails on Heroku over a year but today i'm facing a issue which not push fails to Heroku latest commit, when I run git push heroku master then like below
remote: ! A security vulnerability has been detected in your application.
remote: ! To protect your application you must take action. Your application
remote: ! is currently exposing its credentials via an easy to exploit directory
remote: ! traversal.
remote: !
remote: ! To protect your application you must either upgrade to Sprockets version "3.7.2"
remote: ! or disable dynamic compilation at runtime by setting:
remote: !
remote: ! ```
remote: ! config.assets.compile = true # Disables security vulnerability
remote: ! ```
remote: !
remote: ! To read more about this security vulnerability please refer to this blog post:
remote: ! https://blog.heroku.com/rails-asset-pipeline-vulnerability
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to project-us.
I have tried to true in assets.compile but nothing changed.
What can I do now?
bundle update sprockets
git commit -am "update sprockets"
git push heroku master

Heroku push rejected because gem checksum failed

I've been pushing updates to my app successfully all week. This morning I went to push another update (just some CSS changes) and suddenly I'm my pushes are being rejected because the checksums on numerous gems seem to be randomly failing. I say randomly because each time I've tried pushing, the failing checksums are for different gems.
I'm not sure if this is a problem with Bundler, RubyGems, or Heroku, but those all seem like obvious candidates. I can't find any mention of similar issues and Heroku seems to have eliminated the ability to submit a support ticket unless you pay for an enterprise support plan.
Any help is greatly appreciated!
Here is the log from the last attempt:
$ git push heroku master
Counting objects: 12, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (12/12), 1.55 KiB | 1.55 MiB/s, done.
Total 12 (delta 10), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> nginx-buildpack app detected
remote: -----> nginx-buildpack: Installed nginx/1.5.7 to app/bin
remote: -----> nginx-buildpack: Added start-nginx to app/bin
remote: -----> nginx-buildpack: Default mime.types copied to app/config/
remote: -----> nginx-buildpack: Default config copied to app/config.
remote: -----> Image-Optim Buildback app detected
remote: -----> Adding Item-Optim binaries
remote: cp: omitting directory ‘jpegoptim’
remote: ‘advpng’ -> ‘/tmp/build_c96d18fd0f8c4e48e3ec30ced800682d/vendor/image-optim/advpng’
remote: ‘gifsicle’ -> ‘/tmp/build_c96d18fd0f8c4e48e3ec30ced800682d/vendor/image-optim/gifsicle’
remote: ‘jpegtran’ -> ‘/tmp/build_c96d18fd0f8c4e48e3ec30ced800682d/vendor/image-optim/jpegtran’
remote: ‘optipng’ -> ‘/tmp/build_c96d18fd0f8c4e48e3ec30ced800682d/vendor/image-optim/optipng’
remote: ‘pngcrush’ -> ‘/tmp/build_c96d18fd0f8c4e48e3ec30ced800682d/vendor/image-optim/pngcrush’
remote: ‘jpegoptim/jpegoptim-cedar14’ -> ‘/tmp/build_c96d18fd0f8c4e48e3ec30ced800682d/vendor/image-optim/jpegoptim’
remote: -----> Adding image-optim binaries symlink to make them available in next buildpacks
remote: -----> Adding image-optim binaries to PATH
remote: ‘image-optim.sh’ -> ‘/tmp/build_c96d18fd0f8c4e48e3ec30ced800682d/.profile.d/image-optim.sh’
remote: -----> Gemfile detected, adding image-optim config file
remote: ‘image_optim.yml’ -> ‘/tmp/build_c96d18fd0f8c4e48e3ec30ced800682d/.image_optim.yml’
remote: -----> Image-Optim binaries version
remote: advancecomp v1.18 by Andrea Mazzoleni
remote: LCDF Gifsicle 1.78
remote: jpegoptim v1.4.2 x86_64-unknown-linux-gnu
remote: libjpeg-turbo version 1.2.90 (build 20130305)
remote: OptiPNG version 0.7.4
remote: | pngcrush 1.7.15
remote: -----> ImageMagick app detected
remote: -----> Install ImageMagick
remote: -----> Extracting ImageMagick /app/tmp/cache/imagemagick-6.9.9-23.7z.tar.gz => /tmp/build_c96d18fd0f8c4e48e3ec30ced800682d/vendor
remote: -----> Writing policy file
remote: -----> Updating environment variables
remote: -----> ffmpeg app detected
remote: -----> Install ffmpeg
remote: DOWNLOAD_URL = https://www.johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz
remote: exporting PATH
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.5.0
remote: -----> Installing dependencies using bundler 1.15.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: Fetching gem metadata from https://rubygems.org/.
remote: Retrying fetcher due to error (2/4): Bundler::HTTPError The checksum of /info/erubi does not match the checksum provided by the server! Something is wrong (local checksum is "\"a080a1775e4c3f8b72707ef6a2e071b4\"", was expecting "\"5512cda1-50280\"")..
remote: Retrying fetcher due to error (3/4): Bundler::HTTPError The checksum of /info/crass does not match the checksum provided by the server! Something is wrong (local checksum is "\"a080a1775e4c3f8b72707ef6a2e071b4\"", was expecting "\"5512cda1-50280\"")..
remote: Retrying fetcher due to error (4/4): Bundler::HTTPError The checksum of /info/sass-listen does not match the checksum provided by the server! Something is wrong (local checksum is "\"a080a1775e4c3f8b72707ef6a2e071b4\"", was expecting "\"5512cda1-50280\"")..
remote: The checksum of /info/et-orbi does not match the checksum provided by the
remote: server! Something is wrong (local checksum is
remote: "\"a080a1775e4c3f8b72707ef6a2e071b4\"", was expecting "\"5512cda1-50280\"").
remote: Bundler Output: Warning: the running version of Bundler (1.15.2) is older than the version that created the lockfile (1.16.1). We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
remote: Fetching gem metadata from https://rubygems.org/.
remote: Retrying fetcher due to error (2/4): Bundler::HTTPError The checksum of /info/erubi does not match the checksum provided by the server! Something is wrong (local checksum is "\"a080a1775e4c3f8b72707ef6a2e071b4\"", was expecting "\"5512cda1-50280\"")..
remote: Retrying fetcher due to error (3/4): Bundler::HTTPError The checksum of /info/crass does not match the checksum provided by the server! Something is wrong (local checksum is "\"a080a1775e4c3f8b72707ef6a2e071b4\"", was expecting "\"5512cda1-50280\"")..
remote: Retrying fetcher due to error (4/4): Bundler::HTTPError The checksum of /info/sass-listen does not match the checksum provided by the server! Something is wrong (local checksum is "\"a080a1775e4c3f8b72707ef6a2e071b4\"", was expecting "\"5512cda1-50280\"")..
remote: The checksum of /info/et-orbi does not match the checksum provided by the
remote: server! Something is wrong (local checksum is
remote: "\"a080a1775e4c3f8b72707ef6a2e071b4\"", was expecting "\"5512cda1-50280\"").
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to fply.
remote:
To https://git.heroku.com/fply.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/fply.git'

Resources