Gitlab 5.4 - cannot push (SocketError) - ruby

I got GitLab 5.4 using Bitnami Stack 5.4.0-0
After creating user, login and adding key, when pushing to new repository
git#gitlab.funshion.com:gitdemo1/gittest1.git: /opt/bitnami/ruby/lib/ruby/1.9.1/net/http.rb:763:in `initialize': getaddrinfo: Temporary failure in name resolution (SocketError)
from /opt/bitnami/ruby/lib/ruby/1.9.1/net/http.rb:763:in `open'
from /opt/bitnami/ruby/lib/ruby/1.9.1/net/http.rb:763:in `block in connect'
from /opt/bitnami/ruby/lib/ruby/1.9.1/timeout.rb:55:in `timeout'
from /opt/bitnami/ruby/lib/ruby/1.9.1/timeout.rb:100:in `timeout'
from /opt/bitnami/ruby/lib/ruby/1.9.1/net/http.rb:763:in `connect'
from /opt/bitnami/ruby/lib/ruby/1.9.1/net/http.rb:756:in `do_start'
from /opt/bitnami/ruby/lib/ruby/1.9.1/net/http.rb:745:in `start'
from /opt/bitnami/apps/gitlab/gitlab-shell/lib/gitlab_net.rb:62:in `get'
from /opt/bitnami/apps/gitlab/gitlab-shell/lib/gitlab_net.rb:17:in `allowed?'
from /opt/bitnami/apps/gitlab/gitlab-shell/lib/gitlab_shell.rb:60:in `validate_access'
from /opt/bitnami/apps/gitlab/gitlab-shell/lib/gitlab_shell.rb:23:in `exec'
from /opt/bitnami/apps/gitlab/gitlab-shell/bin/gitlab-shell:16:in `<main>'
UPDATE:
Please help with starting GitLab server. We tried on 3 computers, no success.
UPDATE 2: gitlam.yml says relative_url_root is not supported, while Bitnami GitLab runs at server/gitlab/
# WARNING: This feature is no longer supported
UPDATE 3: A bit similar problem Gitlab 5.4 push connection refused was solved by changing the default URL to the root http://wiki.bitnami.com/Applications/BitNami_GitLab#How_to_change_the_default_URL_to_the_root.3f
However after executing all those steps, my GitLab is still running at /gitlab/ even after reboot.
accessing / , get message "Not Found: /" instead of default screen. So the transition is not full.

Server itself could not resolve the domain name. Solution is to add the domain in the /etc/hosts file.
127.0.0.1 gitlab.company.com

Also check the redis configuration in the gitlab/config/resque.yml. Could be pointing to redis.example.com.

Related

ruby: ECONNREFUSED from http.rb

I am trying to parse an rss feed with Ruby. This is my (working) code, with the actual feed url:
include 'rss'
myfeed = RSS::Parser.parse('http://allmusicnews.altervista.org/blog/feed/', false)
If I run it from my development computer (Mac OS 10.9), all works fine. If I run it from my server (Debian 7), all i get is:
/home/daniele/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:879:in `initialize': Connection refused - connect(2) for "allmusicnews.altervista.org" port 80 (Errno::ECONNREFUSED)
from /home/daniele/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:879:in `open'
from /home/daniele/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:879:in `block in connect'
from /home/daniele/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/timeout.rb:74:in `timeout'
from /home/daniele/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:878:in `connect'
from /home/daniele/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:863:in `do_start'
from /home/daniele/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:852:in `start'
from /home/daniele/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/open-uri.rb:318:in `open_http'
from /home/daniele/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/open-uri.rb:736:in `buffer_open'
from /home/daniele/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/open-uri.rb:211:in `block in open_loop'
from /home/daniele/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/open-uri.rb:209:in `catch'
from /home/daniele/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/open-uri.rb:209:in `open_loop'
from /home/daniele/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/open-uri.rb:150:in `open_uri'
from /home/daniele/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/open-uri.rb:716:in `open'
from /home/daniele/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/open-uri.rb:724:in `read'
from /home/daniele/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rss/parser.rb:103:in `normalize_rss'
from /home/daniele/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rss/parser.rb:89:in `initialize'
from /home/daniele/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rss/parser.rb:76:in `new'
from /home/daniele/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rss/parser.rb:76:in `parse'
This does not happen with other rss feeds. example: feeds.blogo.it/soundsblog/it seems working well on both platforms.
I am using the same Ruby version (2.2.0), installed with RVM on both the computers. Same gems too.
Any clue, at least about what to look for?
ps: it may seem something related to connection timeout, but as I run my script suddenly I see the error message above, there's no idle waiting time...
Please ignore my question. I was shooting to the wrong target.
Actually I'm afraid to have some blacklistish problem with my production machine. I cannot connect to altervista.org server in any way (lynx, telnet), I keep getting "connection refused error", so there's nothing to do with my Ruby code...

Heroku Login fails

I'm getting following error while login to the Heroku using CLI:
Enter your Heroku credentials.
Email: *****#gmail.com
Password (typing will be hidden):
! Heroku client internal error.
! Search for help at: https://help.heroku.com
! Or report a bug at: https://github.com/heroku/heroku/issues/new
Error: connect timeout reached (Excon::Errors::Timeout)
Backtrace: /usr/local/heroku/vendor/gems/excon-0.31.0/lib/excon/socket.rb:184:in `rescue in block in connect'
/usr/local/heroku/vendor/gems/excon-0.31.0/lib/excon/socket.rb:179:in `block in connect'
/usr/local/heroku/vendor/gems/excon-0.31.0/lib/excon/socket.rb:167:in `each'
/usr/local/heroku/vendor/gems/excon-0.31.0/lib/excon/socket.rb:167:in `connect'
/usr/local/heroku/vendor/gems/excon-0.31.0/lib/excon/ssl_socket.rb:97:in `connect'
/usr/local/heroku/vendor/gems/excon-0.31.0/lib/excon/socket.rb:28:in `initialize'
/usr/local/heroku/vendor/gems/excon-0.31.0/lib/excon/ssl_socket.rb:9:in `initialize'
/usr/local/heroku/vendor/gems/excon-0.31.0/lib/excon/connection.rb:410:in `new'
/usr/local/heroku/vendor/gems/excon-0.31.0/lib/excon/connection.rb:410:in `socket'
/usr/local/heroku/vendor/gems/excon-0.31.0/lib/excon/connection.rb:122:in `request_call'
/usr/local/heroku/vendor/gems/excon-0.31.0/lib/excon/middlewares/mock.rb:42:in `request_call'
/usr/local/heroku/vendor/gems/excon-0.31.0/lib/excon/middlewares/instrumentor.rb:22:in `request_call'
/usr/local/heroku/vendor/gems/excon-0.31.0/lib/excon/middlewares/base.rb:15:in `request_call'
/usr/local/heroku/vendor/gems/excon-0.31.0/lib/excon/middlewares/base.rb:15:in `request_call'
/usr/local/heroku/vendor/gems/excon-0.31.0/lib/excon/middlewares/base.rb:15:in `request_call'
/usr/local/heroku/vendor/gems/excon-0.31.0/lib/excon/connection.rb:265:in `request'
/usr/local/heroku/vendor/gems/heroku-api-0.3.17/lib/heroku/api.rb:76:in `request'
/usr/local/heroku/vendor/gems/heroku-api-0.3.17/lib/heroku/api/login.rb:9:in `post_login'
/usr/local/heroku/lib/heroku/auth.rb:80:in `api_key'
/usr/local/heroku/lib/heroku/auth.rb:189:in `ask_for_credentials'
/usr/local/heroku/lib/heroku/auth.rb:221:in `ask_for_and_save_credentials'
/usr/local/heroku/lib/heroku/auth.rb:84:in `get_credentials'
/usr/local/heroku/lib/heroku/auth.rb:41:in `login'
/usr/local/heroku/lib/heroku/command/auth.rb:31:in `login'
/usr/local/heroku/lib/heroku/command.rb:218:in `run'
/usr/local/heroku/lib/heroku/cli.rb:28:in `start'
/usr/local/heroku/bin/heroku:25:in `<main>'
Command: heroku login
HTTP Proxy: http://proxy:8080/
HTTPS Proxy: https://proxy:8080/
Version: heroku-toolbelt/3.6.0 (i686-linux) ruby/1.9.3
From logs:
This error may also indicate that the docker daemon is not running
This seems the same error: https://github.com/heroku/heroku/issues/862
Try to run: heroku run bundle
https://devcenter.heroku.com/articles/getting-started-with-nodejs#set-up
> heroku login
Enter your Heroku credentials.
Email: zeke#example.com
Password:
...
Authenticating is required to allow both the heroku and git commands to operate.
Note that if you’re behind a firewall that requires use of a proxy to connect with external HTTP/HTTPS services, you can set the HTTP_PROXY or HTTPS_PROXY environment variables in your local development environment before running the heroku command.
Using an HTTP proxy
If you’re behind a firewall that requires use of a proxy to connect with external HTTP/HTTPS services, you can set the HTTP_PROXY or HTTPS_PROXY environment variables in your local developer environment, before running the heroku command.
For example, on a Unix system you could do something like this:
$ export HTTP_PROXY=http://proxy.server.com:portnumber
or
$ export HTTPS_PROXY=https://proxy.server.com:portnumber
$ heroku login
On a Windows machine, either set it in the System Properties/Environment Variables, or do it from the terminal:
> set HTTP_PROXY=http://proxy.server.com:portnumber
or
> set HTTPS_PROXY=https://proxy.server.com:portnumber
> heroku login
I had a similar issue. I updated my heroku cli and everything is working fine. To update your heroku cli run: wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh
Note: This command is for ubuntu. If you are on another system then refer to the documentation: https://devcenter.heroku.com/articles/heroku-cli#download-and-install

Why ruby process starts getting: "getaddrinfo: Temporary failure in name resolution" on all remote calls before restart

I have a couple of dedicated servers where I have background workers running for days sometimes before restart. When this happens (that they run for more than 24 hours it seems) then I start to get errors like this:
getaddrinfo: Temporary failure in name resolution
/home/deployer/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/net/smtp.rb:540:in `open'
/home/deployer/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/net/smtp.rb:540:in `tcp_socket'
/home/deployer/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/net/smtp.rb:549:in `block in do_start'
/home/deployer/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/timeout.rb:68:in `timeout'
/home/deployer/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/timeout.rb:99:in `timeout'
/home/deployer/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/net/smtp.rb:549:in `do_start'
/home/deployer/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/net/smtp.rb:519:in `start'
The error will occur for ALL remote calls from that specific process, until it has been restarted (NOT hardware/server restart, just the ruby process). I have double-checked/confirmed that restarting the process works as a fix, since I have tried to SSH into the server, and run a new process along side the failing one, and this one would work flawlessly, while the faulty one still failed.
So my question is, why is this happening, and how can I resolve the issue in an other way than restarting the process every day?
I am on ruby 1.9.3 p194 and the background jobs are processed with the sidekiq gem (however I don't suspect that one to be responsible for the mess).
The servers are situated at http://www.hetzner.de (however I don't think they are to blame, since it's happening in-process)
UPDATE
Along side the above smtp call errors, I'm also getting errors like this, when doing simple http requests. This also resolves after a process restart:
# (Errno::EHOSTUNREACH) "No route to host - connect(2)"
/home/deployer/apps/au/shared/bundle/ruby/1.9.1/gems/net-http-persistent-2.8/lib/net/http/persistent/ssl_reuse.rb:29:in `initialize'
/home/deployer/apps/au/shared/bundle/ruby/1.9.1/gems/net-http-persistent-2.8/lib/net/http/persistent/ssl_reuse.rb:29:in `open'
/home/deployer/apps/au/shared/bundle/ruby/1.9.1/gems/net-http-persistent-2.8/lib/net/http/persistent/ssl_reuse.rb:29:in `block in connect'
/home/deployer/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/timeout.rb:54:in `timeout'
/home/deployer/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/timeout.rb:99:in `timeout'
/home/deployer/apps/au/shared/bundle/ruby/1.9.1/gems/net-http-persistent-2.8/lib/net/http/persistent/ssl_reuse.rb:29:in `connect'
/home/deployer/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/net/http.rb:755:in `do_start'
/home/deployer/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/net/http.rb:750:in `start'
/home/deployer/apps/au/shared/bundle/ruby/1.9.1/gems/net-http-persistent-2.8/lib/net/http/persistent.rb:628:in `start'
/home/deployer/apps/au/shared/bundle/ruby/1.9.1/gems/net-http-persistent-2.8/lib/net/http/persistent.rb:888:in `reset'
/home/deployer/apps/au/shared/bundle/ruby/1.9.1/gems/net-http-persistent-2.8/lib/net/http/persistent.rb:567:in `connection_for'
/home/deployer/apps/au/shared/bundle/ruby/1.9.1/gems/net-http-persistent-2.8/lib/net/http/persistent.rb:926:in `request'
/home/deployer/apps/au/shared/bundle/ruby/1.9.1/gems/mechanize-2.5.1/lib/mechanize/http/agent.rb:258:in `fetch'
/home/deployer/apps/au/shared/bundle/ruby/1.9.1/gems/mechanize-2.5.1/lib/mechanize.rb:407:in `get'

Heroku Dep Issue: SSH, PubKey Failure (Errno::EISDIR)

I'm currently working through Hartl's tutorial, struggling to deploy to heroku. Running OSX 10.8.1.
Experienced ssh issues and read thru three-dozen questions here, but can't figure it out.
I've added two additional ssh id's but it gives me the following error for id's 2 and 3.
$ heroku login
Enter your Heroku credentials.
Email: email#gmail.com
Password (typing will be hidden):
Found the following SSH public keys:
1) github_rsa.pub
2) id_dsa.pub
3) id_rsa.pub
Which would you like to use with your Heroku account? 3
Uploading SSH public key /Users/admin/.ssh/id_rsa.pub... failed
! Heroku client internal error.
! Search for help at: https://help.heroku.com
! Or report a bug at: https://github.com/heroku/heroku/issues/new
Error: Is a directory - /Users/admin/.ssh/id_rsa.pub (Errno::EISDIR)
Backtrace:
/Users/admin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/heroku-2.32.4/lib/heroku/auth.rb:290:in `read'
/Users/admin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/heroku-2.32.4/lib/heroku/auth.rb:290:in `block in associate_key'
/Users/admin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/heroku-2.32.4/lib/heroku/helpers.rb:236:in `action'
/Users/admin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/heroku-2.32.4/lib/heroku/auth.rb:288:in `associate_key'
/Users/admin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/heroku-2.32.4/lib/heroku/auth.rb:269:in `associate_or_generate_ssh_key'
/Users/admin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/heroku-2.32.4/lib/heroku/auth.rb:239:in `check_for_associated_ssh_key'
/Users/admin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/heroku-2.32.4/lib/heroku/auth.rb:233:in `ask_for_and_save_credentials'
/Users/admin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/heroku-2.32.4/lib/heroku/auth.rb:84:in `get_credentials'
/Users/admin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/heroku-2.32.4/lib/heroku/auth.rb:41:in `login'
/Users/admin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/heroku-2.32.4/lib/heroku/command/auth.rb:31:in `login'
/Users/admin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/heroku-2.32.4/lib/heroku/command.rb:206:in `run'
/Users/admin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/heroku-2.32.4/lib/heroku/cli.rb:28:in `start'
/Users/admin/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/heroku-2.32.4/bin/heroku:16:in `<top (required)>'
/Users/admin/.rbenv/versions/1.9.3-p194/bin/heroku:23:in `load'
/Users/admin/.rbenv/versions/1.9.3-p194/bin/heroku:23:in `<main>'
Command: heroku login
Version: heroku-toolbelt/2.32.4 (x86_64-darwin12.1.0) ruby/1.9.3 autoupdate
When I do get the id to load/authorize, I attempt to git push heroku master yet I'm met with:
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Could the issue perhaps be that I need to replace #1 with #3 (delete all but the #3 id?)
Would love your help!
Try regenerating your public key again. But before that, try heroku keys:add again. Otherwise, ssh-keygen -t rsa then heroku keys:add.
But do note that if you change your keys, the the rest of the applications which you have tied your previous keys too will have to be changes also.

watir-webdriver with firefox 6.0 see following error Errno::ECONNREFUSED

Currently run 150 plus scenarios nightly approximately 5000 steps. I see the following error occur around 10 times in the 5000 steps. Not a lot, nor on the same step, however don't know what to do to fix. Currently wrapping in a rescue block and retrying to work around error.
Any suggestions would be great.
Thanks,
Jim
Environment:
Windows 2003 Server 32 bit
FireFox 6.0.2
Ruby 1.8.7
watir-webdriver 0.3.4
selenium-webdriver 2.7.0
watir-page-helper 0.3.0
Errno::ECONNREFUSED: No connection could be made because the target machine actively refused it. - connect(2)
Stack trace:
G:/Ruby187/lib/ruby/1.8/net/http.rb:560:in `initialize'
G:/Ruby187/lib/ruby/1.8/net/http.rb:560:in `open'
G:/Ruby187/lib/ruby/1.8/net/http.rb:560:in `connect'
G:/Ruby187/lib/ruby/1.8/timeout.rb:53:in `timeout'
G:/Ruby187/lib/ruby/1.8/timeout.rb:101:in `timeout'
G:/Ruby187/lib/ruby/1.8/net/http.rb:560:in `connect'
G:/Ruby187/lib/ruby/1.8/net/http.rb:553:in `do_start'
G:/Ruby187/lib/ruby/1.8/net/http.rb:542:in `start'
G:/Ruby187/lib/ruby/1.8/net/http.rb:1035:in `request'
./features/support/../../lib/pages/base_page_class.rb:37:in `initialize'
./features/support/env.rb:147:in `new'
./features/support/env.rb:147:in `on'
./features/support/env.rb:143:in `visit'
./features/step_definitions/login_steps.rb:32:in `/^A user logs into Connect using (new|existing) rid using correct environment dictated by environment variable$/'
features\ReservationDailyView.feature:6:in `And A user logs into Connect using existing rid using correct environment dictated by environment variable'
One thing to note, I am closing the browser after each scenario and opening it up again at start of the next scenario.
If I leave the browser open instead I get this error and my firefox instance is totally running out of memory 600,000+ K VM Size 700,000+ K
Timeout::Error: execution expired
Stack trace:
G:/Ruby187/lib/ruby/1.8/timeout.rb:64:in `rbuf_fill'
G:/Ruby187/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill'
G:/Ruby187/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
G:/Ruby187/lib/ruby/1.8/net/protocol.rb:126:in `readline'
G:/Ruby187/lib/ruby/1.8/net/http.rb:2028:in `read_status_line'
G:/Ruby187/lib/ruby/1.8/net/http.rb:2017:in `read_new'
G:/Ruby187/lib/ruby/1.8/net/http.rb:1051:in `request'
G:/Ruby187/lib/ruby/1.8/net/http.rb:1037:in `request'
G:/Ruby187/lib/ruby/1.8/net/http.rb:543:in `start'
G:/Ruby187/lib/ruby/1.8/net/http.rb:1035:in `request'
./features/support/env.rb:148:in `call'
./features/support/env.rb:148:in `on'
Looks like you are running out of ephemeral ports. You might want to change settings in the registry to use more ports. Refer below
http://msdn.microsoft.com/en-us/library/aa560610(v=bts.20).aspx

Resources