Hi

When running the install with nginx

drush hostmaster-install --http_service_type=nginx

The script tries to run some othr script different to
/etc/init.d/nginx
No idea which one.
To get the installation to succed I had to set
aegir ALL=(ALL) NOPASSWD: ALL

And once installed go to the nginx server settings and set the command to
/etc/init.d/nginx

Then I could set the sudo permit back to
aegir ALL=NOPASSWD: /etc/init.d/nginx

Cheers

Comments

anarcat’s picture

Title: Installing with nginx requires sudo for apache2 » Installing with nginx requires some unknown sudo command
Status: Active » Postponed (maintainer needs more info)

According to the current code, it *will* try /etc/init.d/nginx if it is executable... Can you provide us with the log of the installer with --debug?

Thanks,

omega8cc’s picture

Category: bug » support

@jm.federico

Please provide more information about your OS along with some debug output - try drush hostmaster-install --http_service_type=nginx -d.

jm.federico’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Right, so funny thing

ran it again and now it worked.

ran it with line provided in comment#2
drush hostmaster-install --http_service_type=nginx -d

gave me plenty of debug info to get bored, but ultimately it worked!

Closing this

Thanks anyway!

lolmaus’s picture

I've experienced the same issue.

 

After modifying my visudo, i managed to start the installation. Here's the bug:

nginx on zulu1597.server4you.net could not be restarted. Changes might not be available until this has been done. (error: sudo:                   [warning]
/usr/sbin/apachectl: command not found)

 

I use the following command to install hostmaster:

drush hostmaster-install --http_service_type=nginx --client_email=lolmaus@gmail.com
omega8cc’s picture

@lolmaus

The sudo configuration entry for Nginx is different.

Please read and follow the docs: http://community.aegirproject.org/node/389#Sudo_configuration

If you are experiencing issues, please open a *new* issue with all details/steps you did, OS used etc etc.

lolmaus’s picture

Status: Closed (cannot reproduce) » Active

I'm doing a clean install of Aegir on an Ubuntu Server 10.04 LTS.

I'm following the Manual Install guide because i want it to run on Nginx. I dunno what versions of stuff are installed. I just follow the official manual install guide.

Everything is fine until "drush hostmaster-install" should be run.

I use the following command to install hostmaster:

drush hostmaster-install --http_service_type=nginx --client_email=lolmaus@gmail.com -d

Even though it has the nginx parameter, it tries to run /usr/sbin/apachectl for some reason! :(

nginx on zulu1597.server4you.net could not be restarted. Changes might not be available until this has been done. (error: sudo: [warning]
/usr/sbin/apachectl: command not found)

omega8cc’s picture

Version: 6.x-1.4 » 6.x-1.7

It will default to /usr/sbin/apachectl when it can't find any known location for nginx reload command.

Please post the result of commands:

which nginx
nginx -V
ls -la /etc/init.d/nginx*
ls -la /usr/sbin/nginx
ls -la /usr/local/sbin/nginx

lolmaus’s picture

zulu1597:~# which nginx
/usr/sbin/nginx

nginx version: nginx/0.7.65
TLS SNI support enabled
configure arguments: --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/body --http-proxy-temp-path=/var/lib/nginx/proxy --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-debug --with-http_stub_status_module --with-http_flv_module --with-http_ssl_module --with-http_dav_module --with-http_gzip_static_module --with-http_realip_module --with-mail --with-mail_ssl_module --with-ipv6 --add-module=/build/buildd/nginx-0.7.65/modules/nginx-upstream-fair

zulu1597:~# ls -la /etc/init.d/nginx*
-rwxr-xr-x 1 root root 2006 2010-02-15 07:16 /etc/init.d/nginx

zulu1597:~# ls -la /usr/sbin/nginx
-rwxr-xr-x 1 root root 661896 2012-01-13 20:28 /usr/sbin/nginx

zulu1597:~# ls -la /usr/local/sbin/nginx
ls: cannot access /usr/local/sbin/nginx: No such file or directory
lolmaus’s picture

I have upgraded to Ubuntu 12.04. It did not change anything.

I have noticed that "which nginx" would not return anything when run via aegir user! This might be the issue.

omega8cc’s picture

Provision doesn't use which nginx so it doesn't matter if it is in your aegir user PATH. It tries full system paths for expected Nginx binary or init script (by default).

The how-to: http://community.aegirproject.org/content/installing/manual/nginx-mariad... suggests that you should add working shell:

chsh -s /bin/bash aegir

Maybe this is Ubuntu specific issue, as it works just fine in Debian without setting PATH on the fly.

lolmaus’s picture

Status: Active » Closed (cannot reproduce)

Thank you omega8cc,

i have upgraded my Ubuntu installation from 10.04 to 12.04, reinstalled Nginx and this issue no longer takes place.

lolmaus’s picture

Version: 6.x-1.7 » 6.x-1.9
Status: Closed (cannot reproduce) » Active

I have followed the latest Manual Installation guide carefully to install Aegir with Nginx on a clean server.

I ended up receiving the `[sudo] password for aegir:` prompt.

Here's the full output with the --debug parameter: https://gist.github.com/4563424

The last message is:

Running: /usr/share/drush/drush.php  @server_master provision-verify --backend  2>&1 [15.51 sec, 9.83 MB]                [command]
[sudo] password for aegir:
lolmaus’s picture

Status: Active » Closed (cannot reproduce)

I've set sudo to allow every command for Aegir, and it seems `provision-verify` runs apache2ctl:

DRUSH_BACKEND_OUTPUT_START>>>{"output":"Executing: ln -sf '\/var\/aegir\/config\/server_master\/nginx.conf' '\/var\/aegir\/config\/nginx.conf'\nExecuting: sudo \/usr\/sbin\/apachectl graceful\n sudo: \/usr\/sbin\/apachectl: command not found\n","object":[],"error_status":0,"log":[{...

Seems to be a bug. Now i'm feeling guilty for hijacking the issue thread. Closing this to reopen a separate thread.