Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

misc/178811: nginx invoked by /usr/sbin/service failed to start passenger

2 views
Skip to first unread message

Elliot

unread,
May 21, 2013, 10:10:31 AM5/21/13
to freebsd-gn...@freebsd.org

>Number: 178811
>Category: misc
>Synopsis: nginx invoked by /usr/sbin/service failed to start passenger
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue May 21 14:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Elliot
>Release: Freebsd 9.1
>Organization:
>Environment:
FreeBSD XXX.com 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012 ro...@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64
>Description:
After reboot or running 'service nginx restart', /usr/sbin/service would invoke /usr/local/sbin/nginx which would call passenger_ruby wrapper script which would try to execute this line"#!/usr/bin/env bash". Since /usr/sbin/service 'exec' with PATH without /usr/local/bin, bash couldn't be found and passenger failed to start.

Is it possible to change /usr/sbin/service to include /usr/local/bin when 'exec' e.g.

Change

exec env -i HOME=/ PATH=/sbin:/bin:/usr/sbin:/usr/bin $dir/$script $*

To

exec env -i HOME=/ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin $dir/$script $*
>How-To-Repeat:
install nginx and passenger
run 'service nginx restart'
access webpages served by passenger
>Fix:
Soft link /usr/local/bin/bash to /usr/bin

or

modify /usr/sbin/service

>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
freebs...@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs...@freebsd.org"

ccc fanta

unread,
May 21, 2013, 10:30:22 AM5/21/13
to freebs...@freebsd.org
The following reply was made to PR misc/178811; it has been noted by GNATS.

From: ccc fanta <cccf...@gmail.com>
To: bug-fo...@FreeBSD.org, cccf...@gmail.com
Cc:
Subject: Re: misc/178811: nginx invoked by /usr/sbin/service failed to start passenger
Date: Tue, 21 May 2013 22:26:27 +0800

--047d7b6782fc1a865d04dd3b3c3c
Content-Type: text/plain; charset=ISO-8859-1

After further digging, it seems that I also need to modify /etc/rc in order
to fix my problem completely. It doesn't sound right.

Basically I need a way to set PATH to include /usr/local/bin before
starting nginx with passenger. Is that a easy way to do it? I found a
ugly hack to workaround this problem. It's to include the following line
in /etc/rc.conf.

export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:

btw I don't have this problem in Freebsd 8.3 and it just comes up after
upgrade to 9.1.

--047d7b6782fc1a865d04dd3b3c3c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

After further digging, it seems that I also need to modify /etc/rc in order=
to fix my problem completely.=A0 It doesn&#39;t sound right.<br><br>Basica=
lly I need a way to set PATH to include /usr/local/bin before starting ngin=
x with passenger.=A0 Is that a easy way to do it?=A0 I found a ugly hack to=
workaround this problem.=A0 It&#39;s to include the following line in /etc=
/rc.conf.<br>
<br>export PATH=3D/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/s=
bin:<br><br>btw I don&#39;t have this problem in Freebsd 8.3 and it just co=
mes up after upgrade to 9.1.=A0 <br>

--047d7b6782fc1a865d04dd3b3c3c--
0 new messages