Server install

45 views
Skip to first unread message

Martin Pettersson

unread,
Jun 7, 2009, 11:22:09 AM6/7/09
to gitorious
I reached quite far.


I can create users and project and log in but it works in Konqueror but not in Firefox. I can add ssh keys.


When I log in using Firefox I get returned to the front page. In Konqueror it works.


When I push I get
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Nothing in the auth log...


When I added the ssh key I expected the ready filed to be set but it is 0 so I set it to 1...
The ssh_key_index in the used table is NULL so I set it to the index of the key I added which was 1
Still it doesn't work...


Any clues?


Thanks
MArtin


Marius Mårnes Mathiesen

unread,
Jun 8, 2009, 3:46:45 AM6/8/09
to gito...@googlegroups.com
On 7. juni. 2009, at 17.22, Martin Pettersson wrote:

> I reached quite far.

Congratulations!

> I can create users and project and log in but it works in Konqueror
> but not in Firefox. I can add ssh keys.
>
> When I log in using Firefox I get returned to the front page. In
> Konqueror it works.

I would suspect this to be a session/cookie issue. In config/
gitorious.yml there's a setting gitorious_host which specifies the
site you should use when going to your install in the browser.
Gitorious will send a session cookie to this host/domain, ie. if you
have "gitorious.domain.com", the cookies will be valid in
".gitorious.domain.com" - and your browser may require the URL to be
within this domain.

It could be another problem, but the fact that it works in one browser
and not another points in this direction.

> When I push I get
> Permission denied (publickey).
> fatal: The remote end hung up unexpectedly
> Nothing in the auth log...
>
> When I added the ssh key I expected the ready filed to be set but it
> is 0 so I set it to 1...
> The ssh_key_index in the used table is NULL so I set it to the index
> of the key I added which was 1
> Still it doesn't work...

Did you start the script/poller script? This will consume the messages
sent to your message queue, and it sounds like these aren't being
picked up. And do make sure your server and the script/poller script
runs in the same Rails environment. There should be some other posts
on this issue on the list.


Good luck!
- Marius

Martin Pettersson

unread,
Jun 8, 2009, 12:42:33 PM6/8/09
to gito...@googlegroups.com
Thanks


It was the poller that had problems with permissions in the pid file...

Martin Pettersson

unread,
Jun 10, 2009, 11:52:43 AM6/10/09
to gito...@googlegroups.com
Dear All
it' getting closer... :)
but...
I still cannot log in using firefox...it works with konqueror but when I try to look at my profile I get "This user profile is not public"


The gitorious_host variable in config/gitorious.yml is set to localhost and I point the bowser to localhost...


search doesn't work either. Ultrasphinx is installed.


At some point the message_processing.log was growing like... became some 600Mb
I deleted it and the next thing it was about 100Mb



Here is a sample:
/var/www/gitorious/vendor/plugins/activemessaging/lib/activemessaging/gateway.rb:34:in `block (2 levels) in start'
ActiveMessaging: thread[default]: Exception from connection.receive: can't convert TypeError into String
/home/git/.gem/ruby/1.9.1/gems/stomp-1.1/lib/stomp/connection.rb:170:in `+'
/home/git/.gem/ruby/1.9.1/gems/stomp-1.1/lib/stomp/connection.rb:170:in `rescue in __old_receive'
/home/git/.gem/ruby/1.9.1/gems/stomp-1.1/lib/stomp/connection.rb:164:in `__old_receive'
/home/git/.gem/ruby/1.9.1/gems/stomp-1.1/lib/stomp/connection.rb:176:in `receive'
/var/www/gitorious/vendor/plugins/activemessaging/lib/activemessaging/gateway.rb:34:in `block (2 levels) in start'
ActiveMessaging: thread[default]: Exception from connection.receive: can't convert TypeError into String
/home/git/.gem/ruby/1.9.1/gems/stomp-1.1/lib/stomp/connection.rb:170:in `+'
/home/git/.gem/ruby/1.9.1/gems/stomp-1.1/lib/stomp/connection.rb:170:in `rescue in __old_receive'


Thanks
Martin

Marius Mårnes Mathiesen

unread,
Jun 11, 2009, 2:16:20 AM6/11/09
to gito...@googlegroups.com
Martin,

On 10. juni. 2009, at 17.52, Martin Pettersson wrote:

> Dear All
> it' getting closer... :)
> but...
> I still cannot log in using firefox...it works with konqueror but
> when I try to look at my profile I get "This user profile is not
> public"

Ah, okay, this means the user account hasn't been activated. When
signing up, an email is sent to the user requiring him to activate his
account by visiting a URL.
Unless mailing is enabled (which it isn't in the development
environment), you probably didn't receive this email.

To activate the user account manually, you can use the script/console
command and enter something like

me = User.find_by_login("<your_login>")
me.activate

The user account not being activated probably explains your not being
able to log in too.

> search doesn't work either. Ultrasphinx is installed.

There are a few rake tasks that need to be run in order for the index
to be created and the daemon to be started. The README has a section
on this:

for RAILS_ENV in development test production ; do
RAILS_ENV=$RAILS_ENV rake ultrasphinx:configure
RAILS_ENV=$RAILS_ENV rake ultrasphinx:index
done
RAILS_ENV=production rake ultrasphinx:daemon:start &


> Here is a sample:
> /var/www/gitorious/vendor/plugins/activemessaging/lib/

> activemessaging/gateway.rb:34:in `block (2 levels) in start'
> ActiveMessaging: thread[default]: Exception from connection.receive:
> can't convert TypeError into String
> /home/git/.gem/ruby/1.9.1/gems/stomp-1.1/lib/stomp/connection.rb:
> 170:in `+'
> /home/git/.gem/ruby/1.9.1/gems/stomp-1.1/lib/stomp/connection.rb:
> 170:in `rescue in __old_receive'
> /home/git/.gem/ruby/1.9.1/gems/stomp-1.1/lib/stomp/connection.rb:
> 164:in `__old_receive'
> /home/git/.gem/ruby/1.9.1/gems/stomp-1.1/lib/stomp/connection.rb:
> 176:in `receive'
> /var/www/gitorious/vendor/plugins/activemessaging/lib/
> activemessaging/gateway.rb:34:in `block (2 levels) in start'
> ActiveMessaging: thread[default]: Exception from connection.receive:
> can't convert TypeError into String
> /home/git/.gem/ruby/1.9.1/gems/stomp-1.1/lib/stomp/connection.rb:
> 170:in `+'
> /home/git/.gem/ruby/1.9.1/gems/stomp-1.1/lib/stomp/connection.rb:
> 170:in `rescue in __old_receive'

This looks like an issue in the Stomp gem, which message queueing
system do you use?

Regards,
- Marius

Martin Pettersson

unread,
Jun 11, 2009, 8:29:38 AM6/11/09
to gito...@googlegroups.com
Thanks
I had only set the activate date in mysql but I guess that was not enough to make a real activation.


I can log in now a look at my profile. Still it doesn't work in Firefox.


I have done the the UltraSphinks rakes more times than what is healthy for me... search still didn't work, but.... when I activated my account using the scritpt/console I sav an error about readline.so... so I went to
ruby-1.9.1-p129/ext/readline and run ruby extconf.rb, make make install to get rid of that message.
I don't know if that was the problem for the search too, because after that I ran the rakes again and search works now... :)


The big log files... I run activemq... and it seems to be ok for now... same size as yesterday...


So it seems like everything works except I cannot log in using firefox...


Thanks exa for this...
Martin

Martin Pettersson

unread,
Jun 11, 2009, 11:50:40 AM6/11/09
to gito...@googlegroups.com
I'm trying to use smtp...
I get a message "A password confirmation link has been sent to your email address" but nothing arrives... Can I log the dialog between the smtp and the actionmailer?


Is there any other things I shall do except from this... config/environments/production.rb


# mail server config


config.action_mailer.default_charset = "utf-8"


config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp


config.action_mailer.smtp_settings = {
:address => "smtp.th.com",
:port => 25,
:domain => "siamect.com",
:user_name => "shoud...@ksc.th.com",
:password => "sorry I dont say",
:authentication => :login
}



Thanks Martin

Marius Mårnes Mathiesen

unread,
Jun 12, 2009, 4:55:38 AM6/12/09
to gito...@googlegroups.com
On 11. juni. 2009, at 17.50, Martin Pettersson wrote:

> I'm trying to use smtp...
> I get a message "A password confirmation link has been sent to your
> email address" but nothing arrives... Can I log the dialog between
> the smtp and the actionmailer?

Setting action_mailer.raise_delivery_errors=true should raise an error
if Rails is unable to deliver the message to the SMTP server, so I the
message is probably "successfully" delivered to your SMTP server. If
you have access to the SMTP server, its mail logs could give some
hints as to what's happening. Or you could increase the logging level
in Gitorious (ie. config.log_level = :debug in config/production.rb)
while debugging should provide some more information about the
communication with the SMTP server. Just remember to set it back when
you're done debugging, or the log would grow rapidly…

Regards,
- Marius

Martin Pettersson

unread,
Jun 12, 2009, 7:10:42 AM6/12/09
to gito...@googlegroups.com
Thanks
Maby I'm stupid but...
I have done exactly that but where do the error messages end up...
I see nothing in the production log and nothing in syslog, nothing in Apache err.log...
Thanks
Martin

Martin Pettersson

unread,
Jun 13, 2009, 10:48:00 AM6/13/09
to gito...@googlegroups.com
Nope I wasn't stupid... well... at least that was not the problem this time...


Here is the explanation and the patch is also there...


https://rails.lighthouseapp.com/projects/8994/tickets/2340-action-mailer-cant-deliver-mail-via-smtp-on-ruby-191


so I just patched the file:
vendor/rails/actionmailer/lib/action_mailer/base.rb
go down almost as far as you can row 677

- sender = (mail['return-path'] && mail['return-path'].spec) || mail.from
+ sender = (mail['return-path'] && mail['return-path'].spec) || mail['from']


But of course it didn't work anyway... probably because the mailserver didn't like the sender address so I patched the app/models/mailer.rb in four places... Cheap, quick and dirty... maybe just dirty.... well it works.


- @from = "Gitorious <no-reply@#{GitoriousConfig['gitorious_host']}>"
+ @from = "mar...@siamect.com>"


Thanks exa!


==========================================

Martin Pettersson

unread,
Jun 15, 2009, 8:07:34 AM6/15/09
to gito...@googlegroups.com
Hi
I have installed Gitorious on two computers and I have the same problem on both.
http clones doesn't work:
http://localhost/test3/mine.git/info/refs not found: did you run git update-server-info on the server


cloning over the git protocol didn't work on one computer, I tried everything... When I came home I tried on my Laptop and in the beginning it didn't work at all, the all of a sudden it did work.
I stopped and restarted the script/poller and the script/git-daemon and it stopped working. I continued starting and stopping the daemon and now it works...
It seems if I start the daemon then somtimes it simply refuses to work. Restart and sometimes it works. Once it is working it seems stable though.


Anybody else have these problems?


Thanks
Martin




Marius Mårnes Mathiesen

unread,
Jun 15, 2009, 8:18:30 AM6/15/09
to gito...@googlegroups.com
On 15. juni. 2009, at 14.07, Martin Pettersson wrote:

Hi
I have installed Gitorious on two computers and I have the same problem on both.
http clones doesn't work: 
http://localhost/test3/mine.git/info/refs not found: did you run git update-server-info on the server

Martin,
You just discovered another missing point in our installation notes…

Cloning over HTTP requires a couple of additional steps, as described in http://groups.google.com/group/gitorious/browse_thread/thread/a77ae4c391a5c61c/1e5b56d1fa613ab6
In short, you need to 1) use the git. subdomain (this URL will be handled by a special part of Gitorious) and 2) enable x-sendfile on your frontend web server.

cloning over the git protocol didn't work on one computer, I tried everything... When I came home I tried on my Laptop and in the beginning it didn't work at all, the all of a sudden it did work. 
I stopped and restarted the script/poller and the script/git-daemon and it stopped working. I continued starting and stopping the daemon and now it works... 
It seems if I start the daemon then somtimes it simply refuses to work. Restart and sometimes it works. Once it is working it seems stable though.

I don't really know the Git daemon all that well, hopefully someone else on the list will pick up this issue…

Regards,
- Marius

Martin Pettersson

unread,
Jun 15, 2009, 8:26:58 AM6/15/09
to gito...@googlegroups.com
Thanks
Sorry I should have mentioned that I did read the
http://groups.google.com/group/gitorious/browse_thread/thread/a77ae4c391a5c61c/1e5b56d1fa613ab6
and I did install the x-sendfile module on Apache2
Is there anything I shall do than to load the module to Apache?


Tanks
Martin


On Monday 15 June 2009 07:18:30 pm Marius Mårnes Mathiesen wrote:
> On 15. juni. 2009, at 14.07, Martin Pettersson wrote:
> > Hi
> > I have installed Gitorious on two computers and I have the same
> > problem on both.
> > http clones doesn't work:
> > http://localhost/test3/mine.git/info/refs not found: did you run git
> > update-server-info on the server
>
> Martin,
> You just discovered another missing point in our installation notes…
>
> Cloning over HTTP requires a couple of additional steps, as described
> in
> http://groups.google.com/group/gitorious/browse_thread/thread/a77ae4c391a5c
>61c/1e5b56d1fa613ab6 In short, you need to 1) use the git. subdomain (this

Marius Mårnes Mathiesen

unread,
Jun 15, 2009, 8:39:11 AM6/15/09
to gito...@googlegroups.com
On 15. juni. 2009, at 14.26, Martin Pettersson wrote:

Thanks 
Sorry I should have mentioned that I did read the 
http://groups.google.com/group/gitorious/browse_thread/thread/a77ae4c391a5c61c/1e5b56d1fa613ab6
and I did install the x-sendfile module on Apache2 

Sorry for assuming you didn't :-)

Is there anything I shall do than to load the module to Apache?

You'll need to use git.<example.com> - where example.com is whatever host you're running Gitorious on - in order for these requests to be picked up. If you're running Gitorious on localhost, this would mean adding another host to your hosts file or equivalent:

127.0.0.1 git.localhost

(personally, I use gitorious.local when running locally and git.gitorious.local when cloning over HTTP). Once all this is done, you should use http://git.localhost:3000/project/repo.git for cloning over HTTP. Once you've done this, it should work. Try going to the repository page and find the HTTP cloning link from that page.  If it doesn't work, try entering the link, followed by "/info/refs" in your browser:


(NB: The port number should be Apache/Nginx' port number, you won't be able to get this to work directly to Mongrel/thin/Webrick)

This should give you a plain text file. If it doesn't, use a tool that displays the response headers returned from the server and see if the X-Sendfile-headers are delivered to your browser, which means your web server isn't picking these up.

Let me know if you still have problems!

Regards,
- Marius

Martin Pettersson

unread,
Jun 15, 2009, 9:16:36 AM6/15/09
to gito...@googlegroups.com
thanks



Fantastic!
git.localhost fixed the problem
just four silly chars can do the trick...
Thanks again mega...
Martin


On Monday 15 June 2009 07:39:11 pm Marius Mårnes Mathiesen wrote:
> On 15. juni. 2009, at 14.26, Martin Pettersson wrote:
> > Thanks
> > Sorry I should have mentioned that I did read the
> > http://groups.google.com/group/gitorious/browse_thread/thread/a77ae4c391a
> >5c61c/1e5b56d1fa613ab6 and I did install the x-sendfile module on Apache2
Reply all
Reply to author
Forward
0 new messages