Gitaly not working on installation from source

When running sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production it fails with
Failed to connect to Gitaly... Error: 14:failed to connect to all addresses
bundle exec rake gitlab:check RAILS_ENV=production returns:
Gitaly: ... default ... FAIL: 14:failed to connect to all addresses
Gitaly seems to be running if I start it following the installation guide from source.
ps -aux | grep gitaly
git 28422 1.6 0.3 1229520 19016 ? Ssl 21:39 0:00 /home/git/gitaly/gitaly /home/git/gitaly/config.toml
git 28762 89.5 1.0 148632 61732 ? R 21:39 0:01 ruby /home/git/gitaly/ruby/bin/gitaly-ruby 28422 /home/git/gitaly/internal_sockets/ruby.1
git 28768 90.0 1.0 148516 61956 ? R 21:39 0:01 ruby /home/git/gitaly/ruby/bin/gitaly-ruby 28422 /home/git/gitaly/internal_sockets/ruby.0
root 29251 0.0 0.0 6244 892 pts/0 S+ 21:39 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn gitaly

I’m trying to install version 12.6
I have checked the permissions for the tmp directory, checked all configs to see if they point to /srv/gitlab/gitlab instead of /home/git/gitlab… I don’t know what the issue could be, help would be appreicated.

How did you fix this?