Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Jul 28, 2011 2:45 am 
Offline
Senior Newbie

Joined: Thu Jul 28, 2011 2:39 am
Posts: 8
Location: United States
I've got Git running on my Debian server and then installed git-daemon so that I can do public clones via the git protocol. The daemon is running, but whenever I do a clone it errors out:

$ git clone git://myserver.net/home/git/ehsa/omega_ehsa

Cloning into omega_ehsa...
electricjet.net[0: 66.228.55.188]: errno=Connection timed out
fatal: unable to connect a socket (Connection timed out)

If I run git daemon on the server I get:

$ git daemon

fatal: unable to allocate any listen sockets on port 9418

But yet everything appear to be listening properly:

$ sudo netstat -an | egrep 'Proto|LISTEN'

[sudo] password for tim:
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:9418 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
tcp6 0 0 :::9418 :::* LISTEN
tcp6 0 0 :::80 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 :::443 :::* LISTEN

I've been Googling for hours on this and am at a loss -- anybody have an idea here?


Top
   
 Post subject:
PostPosted: Thu Jul 28, 2011 3:11 am 
Offline
Senior Member

Joined: Wed May 13, 2009 1:18 am
Posts: 681
Assuming that 66.228.55.188 is the right address for your Linode, do you have a firewall and if so is it configured to permit connections to the git daemon port? Your client is getting a timeout and not an immediate refusal. So it looks like the traffic is being blocked somewhere along the way, and probably is never reaching the git daemon.

The failure you get from trying to run git daemon manually is likely due to the existing daemon already listening on the port. If you add a "-p" onto the netstat you can verify which process is on which port.

-- David


Top
   
 Post subject:
PostPosted: Thu Jul 28, 2011 4:29 am 
Offline
Senior Newbie

Joined: Thu Jul 28, 2011 2:39 am
Posts: 8
Location: United States
Okay, I'm getting closer but still stuck. It turns out that port 9418 was filtered by iptables. I created a new rule and it now is open:


$ nmap 66.228.55.188 -p 9418

Starting Nmap 5.21 ( http://nmap.org ) at 2011-07-28 03:26 CDT
Nmap scan report for li297-188.members.linode.com (66.228.55.188)
Host is up (0.044s latency).
PORT STATE SERVICE
9418/tcp open git

And now when I run a git clone I get a new error:

$ git clone git://myserver.net/home/git/ehsa/omega_ehsa

fatal: The remote end hung up unexpectedly

So, it appears I solved my original problem but am faced with a new one.

Any ideas to check?

Thanks a ton


Top
   
 Post subject:
PostPosted: Thu Jul 28, 2011 6:33 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Quote:
fatal: The remote end hung up unexpectedly
Normally means authentication failed, have you enabled public access to that repo? Does the git daemon user have read access to the files?

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Thu Jul 28, 2011 10:24 am 
Offline
Senior Newbie

Joined: Thu Jul 28, 2011 2:39 am
Posts: 8
Location: United States
Okay, I got it sorted:

The last problem (authentication) was caused by a bad path in my /etc/service/git-daemon/run file (which defaulted to /var/cache/git). Fixed my path and everything is finally running smoothly, thanks for the help.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group