Nginx Mode Issues

144 views
Skip to first unread message

BeeRich33

unread,
Sep 14, 2015, 6:12:15 PM9/14/15
to Phusion Passenger Discussions
Hi folks.

Well I'm thoroughly confused.  I can't seem to get this thing working.  Due to a bug that I reported in 5.0.18, I couldn't get a process to get through a split method...anyway I've changed some parent folder naming and this should be working.  But it won't start for some reason.

It seems I'm running some multiple passengers...I think.  I'm not sure.

$ gem update
Updating installed gems
Nothing to update
HQ
HQ:motherlode_ruby rich$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!


Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.


Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
    /Users/rich/.rvm/gems/ruby-2.2.3/bin/passenger-config
HQ:motherlode_ruby rich$ which passenger
/Users/rich/.rvm/gems/ruby-2.2.3/bin/passenger


Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.


Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
    /Users/rich/.rvm/gems/ruby-2.2.3/bin/passenger-config
HQ:motherlode_ruby rich$ which passenger
/Users/rich/.rvm/gems/ruby-2.2.3/bin/passenger


Any insight appreciated.  I want to run multiple applications on my workstation here, using nginx and Sinatra. 

Cheers

Hongli Lai

unread,
Sep 14, 2015, 7:20:57 PM9/14/15
to phusion-passenger
What problem are you exactly experiencing? It appears your problem is
"Passenger does not start" but I do not see anything in the output of
your post that demonstrates the problem.
> --
> You received this message because you are subscribed to the Google Groups
> "Phusion Passenger Discussions" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to phusion-passen...@googlegroups.com.
> To post to this group, send email to phusion-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/phusion-passenger.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/phusion-passenger/cb33c561-fddc-401d-8bca-e9e424be69b5%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Phusion B.V. | Web Application deployment, scaling, and monitoring solutions

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 63501007 (The Netherlands)

BeeRich33

unread,
Sep 14, 2015, 7:40:37 PM9/14/15
to phusion-...@googlegroups.com, hon...@phusion.nl
Hi there.  

I'm not getting anything starting up on port 8080, when my nginx conf file has a few servers set up properly in there.  I'm doing a tail -f -n 20 error.log and nothing is coming up.  

Basically, it's like nothing is happening.  No nginx processes showing up, no passenger processes showing up, and that same zero process is presented in sudo passenger-memory-stats...well it was before I got this error (just now)...

/Users/rich/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'passenger' (>= 0) among 11 total gem(s) (Gem::LoadError)

So it seems there's a passenger installation issue.  It's either not there, or it's saying there's multiple config files.  


On Monday, September 14, 2015 at 7:20:57 PM UTC-4, Hongli Lai wrote:
What problem are you exactly experiencing? It appears your problem is
"Passenger does not start" but I do not see anything in the output of
your post that demonstrates the problem.

<snip> 

Hongli Lai

unread,
Sep 14, 2015, 8:22:05 PM9/14/15
to BeeRich33, Phusion Passenger Discussions
On Tue, Sep 15, 2015 at 7:40 AM, BeeRich33 <bee...@gmail.com> wrote:
> Hi there.
>
> I'm not getting anything starting up on port 8080, when my nginx conf file
> has a few servers set up properly in there. I'm doing a tail -f -n 20
> error.log and nothing is coming up.
>
> Basically, it's like nothing is happening. No nginx processes showing up,
> no passenger processes showing up, and that same zero process is presented
> in sudo passenger-memory-stats...well it was before I got this error (just
> now)...
>
> /Users/rich/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/dependency.rb:315:in
> `to_specs': Could not find 'passenger' (>= 0) among 11 total gem(s)
> (Gem::LoadError)
>
> So it seems there's a passenger installation issue. It's either not there,
> or it's saying there's multiple config files.

Looks like a gem installation issue. Try 'gem install passenger'. 'gem
update' doesn't do anything you need.

BeeRich33

unread,
Sep 15, 2015, 6:01:43 PM9/15/15
to phusion-...@googlegroups.com, bee...@gmail.com, hon...@phusion.nl

Updated:  ...and now it's working.  

I need a holiday.  

I will keep an eye on it and see how it moves forward.  Thank you.  


On Monday, September 14, 2015 at 8:22:05 PM UTC-4, Hongli Lai wrote:


Looks like a gem installation issue. Try 'gem install passenger'. 'gem
update' doesn't do anything you need.

So am I supposed to use homebrew or not for installation?  Is homebrew recognized?  Is nginx not supposed to be set up using homebrew?  That's what the Passenger installation notes indicate.


gem update should work as passenger is in my Gemfile.  Passenger 5.0.18 is installed at the moment.  

How can I start fresh to get all of this going?  I've run through the homebrew installation on the website and it doesn't work.  I've used gem install passenger and it doesn't work.  It ins't responding to anything.

Thanks for your help.  

Cheers

Hongli Lai

unread,
Sep 15, 2015, 6:18:04 PM9/15/15
to BeeRich33, Phusion Passenger Discussions
On Wed, Sep 16, 2015 at 6:01 AM, BeeRich33 <bee...@gmail.com> wrote:
> So am I supposed to use homebrew or not for installation? Is homebrew
> recognized?

Homebrew is preferred if you are on OS X. However, you have already
installed Passenger via RubyGems. You should only have a single
Passenger installation.

It is more important that you have a *correct* installation, than
which installation method you use. Both Homebrew and RubyGems are
supported. Homebrew is supported, but RubyGems is not wrong. So pick
one of the two, but not both of them. So if you install Passenger via
Homebrew, uninstall the RubyGems version first.

> Is nginx not supposed to be set up using homebrew?
> That's what
> the Passenger installation notes indicate.
> https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/ownserver/nginx/oss/osx/install_passenger.html

Nginx can be setup using Homebrew just fine.
https://www.phusionpassenger.com/library/install/nginx/install/oss/osx/
Where on that page did you read that you are not supposed to setup
Nginx via Homebrew?

> gem update should work as passenger is in my Gemfile. Passenger 5.0.18 is
> installed at the moment.

You are not supposed add passenger to the Gemfile. You are not
supposed to run 'gem update'. The above installation guide doesn't
mention either of those.


> How can I start fresh to get all of this going? I've run through the
> homebrew installation on the website and it doesn't work.
> I've used gem
> install passenger and it doesn't work. It ins't responding to anything.

Remove every trace of Passenger on your system, then follow the guide
from scratch. So 'gem uninstall passenger'. 'brew uninstall passenger
nginx'. Remove passenger from Gemfile. Then start from the beginning.

What isn't working with the Homebrew part? Can you be specific? I need
to know the exact steps you took, your exact configuration, your exact
error messages.

Also: just follow *one* guide and stick with that. Many problems are
caused by following multiple mutually incompatible guides and then
ending with a spaghetti system. If something doesn't work, you should
investigate that first instead of immediately trying something else.

BeeRich33

unread,
Sep 16, 2015, 2:23:53 AM9/16/15
to Phusion Passenger Discussions, bee...@gmail.com, hon...@phusion.nl


On Tuesday, September 15, 2015 at 6:18:04 PM UTC-4, Hongli Lai wrote:
On Wed, Sep 16, 2015 at 6:01 AM, BeeRich33 <bee...@gmail.com> wrote:
> So am I supposed to use homebrew or not for installation?  Is homebrew
> recognized?

Homebrew is preferred if you are on OS X. However, you have already
installed Passenger via RubyGems. You should only have a single
Passenger installation.

I'm trying to have a single passenger installation.  I don't care how I do it.  I'm just following the notes on your pages.  
 
It is more important that you have a *correct* installation, than
which installation method you use. Both Homebrew and RubyGems are
supported. Homebrew is supported, but RubyGems is not wrong. So pick
one of the two, but not both of them. So if you install Passenger via
Homebrew, uninstall the RubyGems version first.

Done.  It is working.  I get the following error though:

sudo passenger-config validate-install

rich$ sudo passenger-config validate-install
/Users/rich/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'passenger' (>= 0) among 11 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/var/root/.gem/ruby/2.2.0:/Users/rich/.rvm/rubies/ruby-2.2.3/lib/ruby/gems/2.2.0', execute `gem env` for more information
from /Users/rich/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/dependency.rb:324:in `to_spec'
from /Users/rich/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:64:in `gem'
from /Users/rich/.rvm/gems/ruby-2.2.3/bin/passenger-config:22:in `<main>'
from /Users/rich/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
from /Users/rich/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'

Why would a method be looking for the passenger gem if it's installed by Homebrew?
 

>  Is nginx not supposed to be set up using homebrew?
>  That's what
> the Passenger installation notes indicate.
> https://www.phusionpassenger.com/library/walkthroughs/deploy/ruby/ownserver/nginx/oss/osx/install_passenger.html

Nginx can be setup using Homebrew just fine.
https://www.phusionpassenger.com/library/install/nginx/install/oss/osx/
Where on that page did you read that you are not supposed to setup
Nginx via Homebrew?
 
That's what you told me to do in another thread, to use the gem instead.  
 
> gem update should work as passenger is in my Gemfile.  Passenger 5.0.18 is
> installed at the moment.

You are not supposed add passenger to the Gemfile. You are not
supposed to run 'gem update'. The above installation guide doesn't
mention either of those.

I have taken that out.  
 
> How can I start fresh to get all of this going?  I've run through the
> homebrew installation on the website and it doesn't work.
>  I've used gem
> install passenger and it doesn't work.  It ins't responding to anything.

Remove every trace of Passenger on your system, then follow the guide
from scratch. So 'gem uninstall passenger'. 'brew uninstall passenger
nginx'. Remove passenger from Gemfile. Then start from the beginning.

What isn't working with the Homebrew part? Can you be specific? I need
to know the exact steps you took, your exact configuration, your exact
error messages.

See above.  
 
Also: just follow *one* guide and stick with that. Many problems are
caused by following multiple mutually incompatible guides and then
ending with a spaghetti system. If something doesn't work, you should
investigate that first instead of immediately trying something else.

Yes that's why I want to start from the beginning.  

I will give it a shot now.  

BeeRich33

unread,
Sep 16, 2015, 3:15:46 AM9/16/15
to Phusion Passenger Discussions, bee...@gmail.com, hon...@phusion.nl
OK, erased pretty much everything.  

Upon restarting the new installation (homebrew), this is what I get:
    
    $ sudo launchctl load /usr/local/opt/nginx/*.plist
    /usr/local/Cellar/nginx/1.8.0/homebrew.mxcl.nginx.plist: Path had bad ownership/permissions

Hongli Lai

unread,
Sep 16, 2015, 8:28:41 AM9/16/15
to BeeRich33, Phusion Passenger Discussions
On Wed, Sep 16, 2015 at 2:23 PM, BeeRich33 <bee...@gmail.com> wrote:
> Done. It is working. I get the following error though:
>
> sudo passenger-config validate-install
>
> rich$ sudo passenger-config validate-install
> /Users/rich/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/dependency.rb:315:in
> `to_specs': Could not find 'passenger' (>= 0) among 11 total gem(s)
> (Gem::LoadError)
> Checked in
> 'GEM_PATH=/var/root/.gem/ruby/2.2.0:/Users/rich/.rvm/rubies/ruby-2.2.3/lib/ruby/gems/2.2.0',
> execute `gem env` for more information
> from
> /Users/rich/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/dependency.rb:324:in
> `to_spec'
> from
> /Users/rich/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:64:in
> `gem'
> from /Users/rich/.rvm/gems/ruby-2.2.3/bin/passenger-config:22:in `<main>'
> from /Users/rich/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
> from /Users/rich/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in
> `<main>'


This indicates that you still have leftover files from your (broken)
Passenger-via-RubyGems installation. You need to remove those leftover
files too. In particular,
/Users/rich/.rvm/gems/ruby-2.2.3/bin/passenger-*.

> Why would a method be looking for the passenger gem if it's installed by
> Homebrew?

Because you were using the leftover files from the gem, which weren't
removed properly.

Hongli Lai

unread,
Sep 16, 2015, 8:29:23 AM9/16/15
to BeeRich33, Phusion Passenger Discussions
On Wed, Sep 16, 2015 at 3:15 PM, BeeRich33 <bee...@gmail.com> wrote:
> OK, erased pretty much everything.
>
> Upon restarting the new installation (homebrew), this is what I get:
>
> $ sudo launchctl load /usr/local/opt/nginx/*.plist
> /usr/local/Cellar/nginx/1.8.0/homebrew.mxcl.nginx.plist: Path had bad
> ownership/permissions

This indicates a permission problem in your Homebrew installation.
This is an entirely different issue that has nothing to do with
Passenger. Unfortunately, I cannot help you with that. Maybe the
Homebrew authors can help you.

BeeRich33

unread,
Sep 16, 2015, 12:45:08 PM9/16/15
to Phusion Passenger Discussions, bee...@gmail.com, hon...@phusion.nl
So in essence, neither the gem uninstall nor the homebrew uninstall work.  Something tells me I will be back.

Daniel Knoppel

unread,
Sep 16, 2015, 1:11:15 PM9/16/15
to Phusion Passenger Discussions, bee...@gmail.com, hon...@phusion.nl
You'd be welcome back of course, but let's hope it gets fixed, permission errors are usually pretty easy ;).

I found it's pretty easy to confuse installers, especially when you start mixing things that weren't supposed to be mixed, sometimes using different users because some need root and others don't, and then the permissions get messed up etc.

- Daniel

BeeRich33

unread,
Sep 16, 2015, 8:48:40 PM9/16/15
to Phusion Passenger Discussions, bee...@gmail.com, hon...@phusion.nl
Heh.  Today hasn't been my day.  Now I'm having nginx issues...I think.

Just tried this without sudo:

HQ:1.8.0 rich$ launchctl load /usr/local/opt/nginx/*.plist
/usr/local/Cellar/nginx/1.8.0/homebrew.mxcl.nginx.plist: Operation already in progress

But still no nginx processes.  So this goes over to the nginx mailing list, which isn't responding to my signup.  

Cheers

Hongli Lai

unread,
Sep 16, 2015, 8:54:15 PM9/16/15
to BeeRich33, Phusion Passenger Discussions
I think you should not ask at the Nginx mailing list, but at the
Homebrew mailing list or something. The Launchd plist file is an
add-on provided by the Homebrew recipe, and is an OS X specific
feature. The Nginx mailing list only provides support on pure Nginx
stuff, not any OS-specific additions that packagers may have added.

BeeRich33

unread,
Sep 16, 2015, 9:27:44 PM9/16/15
to Phusion Passenger Discussions, bee...@gmail.com, hon...@phusion.nl
OK, will give it a whirl there.  Homebrew isn't the best to chase up, I have found.  

BeeRich33

unread,
Sep 24, 2015, 2:47:35 PM9/24/15
to Phusion Passenger Discussions, bee...@gmail.com, hon...@phusion.nl
Just so that other people know, Yosemite has a problem with launchctl, as launchd was completely rewritten at some point recently.  This is the new syntax for getting the proper daemons listening:

sudo cp /usr/local/opt/nginx/*.plist /Library/LaunchDaemons
sudo chown root:wheel /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
sudo launchctl bootstrap system /Library/LaunchDaemons/homebrew.mxcl.nginx.plist
sudo launchctl kickstart system/homebrew.mxcl.nginx

And then to see if the master and worker processes are running:

ps aux | grep nginx

Hopefully Homebrew, nginx and passenger people (heh) can integrate this changeover and document the launchd processes.  

Cheers 
Reply all
Reply to author
Forward
0 new messages