Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 May 2013 14:01:06 GMT
From:      Elliot <cccfanta@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/178811: nginx invoked by /usr/sbin/service failed to start passenger
Message-ID:  <201305211401.r4LE162r033968@oldred.FreeBSD.org>
Resent-Message-ID: <201305211410.r4LEA0gh020522@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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     root@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305211401.r4LE162r033968>