0

I ssh to the dev box where I am suppose to setup Redmine. Or rather, downgrade Redmine. In January I was asked to upgrade Redmine from 1.2 to 2.2. But the plugins we wanted did not work with 2.2. So now I'm being asked to setup Redmine 1.3.3. We figure we can upgrade from 1.2 to 1.3.3.

In January I had trouble getting Passenger to work with Nginx. This was on a CentOS box. I tried several installs of Nginx. I'm left with different error logs:

This:

whereis nginx.conf

gives me:

nginx: /etc/nginx

but I don't think that is in use.

This:

find / -name error.log

gives me:

/opt/nginx/logs/error.log /var/log/nginx/error.log

When I tried to start Passenger again I was told something was already running on port 80. But if I did "passenger stop" I was told that passenger was not running.

So I did:

passenger start -p 81

If I run netstat I see something is listening on port 81:

netstat Active Internet connections (w/o servers)

Proto Recv-Q Send-Q Local Address Foreign Address State

tcp 0 0 localhost:81 localhost:42967 ESTABLISHED

tcp 0 0 10.0.1.253:ssh 10.0.1.91:51874 ESTABLISHED

tcp 0 0 10.0.1.253:ssh 10.0.1.91:62993 ESTABLISHED

tcp 0 0 10.0.1.253:ssh 10.0.1.91:62905 ESTABLISHED

tcp 0 0 10.0.1.253:ssh 10.0.1.91:50886 ESTABLISHED

tcp 0 0 localhost:81 localhost:42966 TIME_WAIT

tcp 0 0 10.0.1.253:ssh 10.0.1.91:62992 ESTABLISHED

tcp 0 0 localhost:42967 localhost:81 ESTABLISHED

but if I point my browser here:

http: // 10.0.1.253:81 /

(StackOverFlow does not want me to publish the IP address, so I have to malform it. There is no harm here as it is an internal IP that no one outside my company could reach.)

In Google all I get is "Oops! Google Chrome could not connect to 10.0.1.253:81".

I started Phusion Passenger at the command line, and the output is verbose, and I expect to see any error messages in the terminal. But I'm not seeing anything. It's as if my browser request is not being heard, even though netstat seems to indicate the app is listening on port 81.

A lot of other things could be wrong with this app (I still need to reverse migrate the database schema) but I'm not seeing any of the error messages that I expect to see. Actually, I'm not seeing any error messages, which is very odd.


UPDATE:

If I do this:

ps aux | grep nginx

I get:

root 20643 0.0 0.0 103244 832 pts/8 S+ 17:17 0:00 grep nginx

root 23968 0.0 0.0 29920 740 ? Ss Feb13 0:00 nginx: master process /var/lib/passenger-standalone/3.0.19-x86_64-ruby1.9.3-linux-gcc4.4.6-1002/nginx-1.2.6/sbin/nginx -c /tmp/passenger-standalone.23917/config -p /tmp/passenger-standalone.23917/

nobody 23969 0.0 0.0 30588 2276 ? S Feb13 0:34 nginx: worker process

I tried to cat the file /tmp/passenger-standalone.23917/config but it does not seem to exist.

I also killed every session of "screen" and every terminal window where Phusion Passenger might be running, but clearly, looking at ps aux, it looks like something is running.

Could the Nginx be running even if the Passenger is killed?

This:

ps aux | grep phusion

brings back nothing

and this:

ps aux | grep passenger

Only brings back the line with nginx.

If I do this:

service nginx stop

I get:

nginx: unrecognized service

and:

service nginx start

gives me:

nginx: unrecognized service

This is a CentOS machine, so if I had Nginx installed normally, this would work.

cerhovice
  • 676
  • 1
  • 10
  • 24

1 Answers1

1

The answer is here - Issue Uploading Files from Rails app hosted on Elastic Beanstalk

You probably have /etc/cron.daily/tmpwatch removing the /tmp/passenger-standalone* files every day, and causing you all this grief.

Community
  • 1
  • 1
Evgeny
  • 6,533
  • 5
  • 58
  • 64