WebFaction
Community site: login faq

Hi I was trying to put latest version of Redmine to work in the old forum, so I'll continue here.

I've just followed johns' suggestion to tail the log and I discovered that the errors are being logged from the crontab command '/home/pagaitan/webapps/redmine/bin/start'

When I run that command manually I get this output:

[pagaitan@web151 ~]$ webapps/redmine/bin/start
[emerg]: bind() to 0.0.0.0:52243 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:52243 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:52243 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:52243 failed (98: Address already in use)
[emerg]: bind() to 0.0.0.0:52243 failed (98: Address already in use)
[emerg]: still could not bind()

and at the same time new lines appear in the log:

2010/10/20 11:02:36 [emerg] 18314#0: bind() to 0.0.0.0:52243 failed (98: Address already in use)
2010/10/20 11:02:36 [emerg] 18314#0: bind() to 0.0.0.0:52243 failed (98: Address already in use)
2010/10/20 11:02:36 [emerg] 18314#0: bind() to 0.0.0.0:52243 failed (98: Address already in use)
2010/10/20 11:02:36 [emerg] 18314#0: bind() to 0.0.0.0:52243 failed (98: Address already in use)
2010/10/20 11:02:36 [emerg] 18314#0: bind() to 0.0.0.0:52243 failed (98: Address already in use)
2010/10/20 11:02:36 [emerg] 18314#0: still could not bind()


After a while, these same 6 lines appear again. This repeats every 20 minutes:

2010/10/20 11:11:01 [emerg] 20336#0: bind() to 0.0.0.0:52243 failed (98: Address already in use)
2010/10/20 11:11:01 [emerg] 20336#0: bind() to 0.0.0.0:52243 failed (98: Address already in use)
2010/10/20 11:11:01 [emerg] 20336#0: bind() to 0.0.0.0:52243 failed (98: Address already in use)
2010/10/20 11:11:01 [emerg] 20336#0: bind() to 0.0.0.0:52243 failed (98: Address already in use)
2010/10/20 11:11:01 [emerg] 20336#0: bind() to 0.0.0.0:52243 failed (98: Address already in use)
2010/10/20 11:11:01 [emerg] 20336#0: still could not bind()
2010/10/20 11:31:01 [emerg] 25018#0: bind() to 0.0.0.0:52243 failed (98: Address already in use)
2010/10/20 11:31:01 [emerg] 25018#0: bind() to 0.0.0.0:52243 failed (98: Address already in use)
2010/10/20 11:31:01 [emerg] 25018#0: bind() to 0.0.0.0:52243 failed (98: Address already in use)
2010/10/20 11:31:01 [emerg] 25018#0: bind() to 0.0.0.0:52243 failed (98: Address already in use)
2010/10/20 11:31:01 [emerg] 25018#0: bind() to 0.0.0.0:52243 failed (98: Address already in use)
2010/10/20 11:31:01 [emerg] 25018#0: still could not bind()


So obviously this start is scheduled with crontab but it's not successful. I've checked if the port is in use:

[pagaitan@web151 ~]$ netstat -antuwp | egrep "(^[^t])|(^tcp.*LISTEN)"  | grep 56846
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)

Where 56846 is the redmine port as shown in the control panel, however after comparing with the error message it seems that there's another different port there... ??? 'bind() to 0.0.0.0:52243' I don't know if this helps, but I've checked and netstat is actually showing this port as used:

[pagaitan@web151 ~]$ netstat -antuwp | egrep "(^[^t])|(^tcp.*LISTEN)"  | grep 52243
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:52243               0.0.0.0:*                   LISTEN      32723/


We have 5 apps running at the same time, could this cause some problem? This is my list of apps: (Name, Port, Autostart, App type, Extra info)

htdocs

No
Static/CGI/PHP

italnova_static

No
Symbolic link to static-only app
/home/pagaitan/webapps/sitio_italnova/sitio_italnova/media/

italnova_static_admin

No
Symbolic link to static-only app
/home/pagaitan/webapps/sitio_italnova/lib/python2.6/django/contrib/admin/media/

redmine
56846
No
Rails 2.3.5 (nginx 0.7.64/Passenger 2.2.8/Ruby Enterprise Edition 1.8.7)

sitio_italnova
50846
No
Django 1.2.3 (mod_wsgi 3.2/Python 2.6)

The Django framework and Static apps are being managed by a friend. The ps command shows 4 processes (it seems 1 master and 3 worker) with the same command:

/webapps/APPNAME/apache2/bin/httpd.worker -f /home/pagaitan/webapps/APPNAME/apache2/conf/httpd.conf -k start


Please let me know your thoughts! And thank you for your valuable help.

asked 20 Oct '10, 13:17

pagaitan
625
accept rate: 0%


This was an odd issue. For some reason your nginx.conf was looking for a completely different version of Passenger (2.2.15 when it should have been looking for 2.2.8).

I edited your nginx to point to the correct gem and it's now working.

Did you edit your nginx.conf at any point?

permanent link

answered 21 Oct '10, 09:23

David L ♦♦
1.4k13
accept rate: 45%

OH! That was very stupid from my side! :D Now I realise, I've overwritten nginx.conf with the wrong version!

The problem was, in my first attempts I found I couldn't install redmine just following the Webfaction Documentation because of the Rails version, so I deleted it and started all over again with Rails 2.3.5 (nginx 0.7.64/Passenger 2.2.8/Ruby Enterprise Edition 1.8.7) ... for some reason I misplaced the config files :S

Many thanks for your quick assistance! You guys rock!

(21 Oct '10, 12:16) pagaitan

The error message mentioning port 52243 is the key here.

For some reason, your Nginx instance is configured to run on port 52243, instead of on its assigned port (56846).

To fix that, edit ~/webapps/redmine/nginx/conf/nginx.conf and change this...

listen             52243;

... to this ...

listen             56846;

Once you do that, you should be able to start Nginx and hopefully serve your Redmine site (assuming you've done everything else correctly).

permanent link

answered 20 Oct '10, 17:51

seanf
12.2k41836
accept rate: 37%

Thank you! You were right, for some reason I left behind the port from a previous installation... :s

Unfortunately, fixing this did not allowed me to access my Redmine site. I continue to get the 502 Bad Gateway screen.

I've checked the logs and I found this on /webapps/redmine/nginx/logs:

*** Could not start the Passenger helper server (/home/pagaitan/webapps/redmine/gems/gems/passenger-2.2.15/ext/nginx/HelperServer): exec() failed: No such file or directory (2)

And this one in /logs/user/error_redmine.log :

2010/10/21 07:56:38 [crit] 2297#0: *7 connect() to unix:/home/pagaitan/webapps/redmine/tmp/passenger.2293/master/helper_server.sock failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.0", upstream: "passenger://unix:/home/pagaitan/webapps/redmine/tmp/passenger.2293/master/helper_server.sock:", host: "projects.pagaitan.webfactional.com"

I've Googled it before posting here, and got this from Phusion Passenger Google Groups:

This means Phusion Passenger isn't compiled properly. You need to re-run passenger-install-nginx-module.

And this one:

This exec() error message is the key. ext/nginx/HelperServer is something that should have been created while running passenger-install-nginx-module. My guess is that you switched to Ruby Enterprise Edition without running /opt/ruby-enterprise-x.x.x/bin/passenger-install-nginx-module. Please run that.

Any ideas?

(21 Oct '10, 08:30) pagaitan
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×46

question asked: 20 Oct '10, 13:17

question was seen: 5,398 times

last updated: 21 Oct '10, 12:16

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM