uhm, in my tests worked (and that line comes from the old script). After 
you install nginx it is started automatically, so "restart" is a good 
choice.

However, let's not take it for granted and investigate.....

doing cat /etc/init.d/nginx in 12.10 we can find

restart|force-reload)
        echo -n "Restarting $DESC: "
        start-stop-daemon --stop --quiet --pidfile \
            /var/run/$NAME.pid --exec $DAEMON || true
        sleep 1
        test_nginx_config
        # Check if the ULIMIT is set in /etc/default/nginx
        if [ -n "$ULIMIT" ]; then
            # Set the ulimits
            ulimit $ULIMIT
        fi
        start-stop-daemon --start --quiet --pidfile \
            /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS || true
        echo "$NAME."
        ;;


So, it works both if nginx is yet started or not. In fact, it's simply 
doing a stop followed by a start.

*service* wraps up the same "command interface" for both /etc/init.d/ 
scripts (System V) and /etc/init (upstart).

Doing service nameofsomething start (or restart) does the same thing as 
/etc/init.d/nameofsomething start  if /etc/init.d/nameofsomething is there

Changing that line from "start" to "restart" have a side effect: if nginx 
is already up (as in normal install just after apt-get install nginx-full), 
the config will not be reloaded, so there will be no configuration to let 
nginx talk with uwsgi.

So, are you totally sure that everything is going on correctly with the 
install and this line is the culprit ?

On Friday, December 14, 2012 7:45:33 PM UTC+1, Richard wrote:
>
> Hello Simone,
>
> As I told you just try the script with a fresh VM. I notice that, the 
> server were not accessible after the script executed. I had to stop both 
> uwsgi and nginx and restart them, then the welcome show up.
>
> I think that the last line is erroneous...
>
> I replace :
> /etc/init.d/nginx restart
>
> By :
> service nginx start
>
> Could also have work with (NOT TESTED) :
> /etc/init.d/nginx start
>
>
> And retest with a snapshot of the fresh VM and it works then.
>
> Cheer!
>
> Richard
>
> On Wed, Dec 12, 2012 at 6:08 PM, Niphlod <nip...@gmail.com 
> <javascript:>>wrote:
>
>> fixed in PM. uwsgi wasn't installed on Richard's VM because pip path was 
>> reported incorrectly at the first installation (meaning that pip install 
>> --upgrade pip worked ok but the next pip install --upgrade pip was not 
>> finding pip binary).
>>
>> Fixed that, script is now running ok even in 12.10.
>>
>> @Paolo: added the shebang to execute it in bash instead of sh. now check 
>> for root permission works.
>>
>> In the next few days I'll write down a fabfile, it's usually cleaner and 
>> safer (e.g. if a network hiccup happens and a package doesn't get correctly 
>> installed, this script goes on like nothing happened)
>>
>>
>> On Wednesday, December 12, 2012 9:09:51 PM UTC+1, Niphlod wrote:
>>
>>> ok, wait a second, I'll try with my VM. the previous traceback is due to 
>>> the changes done to the certificate generation: I took them for granted but 
>>> there must be an error somewhere.
>>>
>>> edit: seen the "forget about the certificates" message right now. 
>>> Investigating in your "job failed to start". 
>>> PS: can you post the output of /var/log/upstart/uwsgi-**emperor.log ?
>>>
>>>
>>> On Wednesday, December 12, 2012 7:48:54 PM UTC+1, Richard wrote:
>>>>
>>>> uwsgi doesn't seem to start, I have not log for it in /var/log/uwsgi/
>>>>
>>>> Try to start it like that :
>>>>
>>>> /etc/init$ sudo start uwsgi-emperor
>>>> start: Job failed to start
>>>>
>>>> Richard
>>>>
>>>>  -- 
>>  
>>  
>>  
>>
>
>

-- 



Reply via email to