Error nginx-custom is not available when installing nginx on Amazon A1 EC2 Instance

After installing EE I installed other packages such as mysql, php, etc… But Nginx won’t install. I’m running Ubuntu 18.04 on an A1 instance on an AWS EC2 instance. I get the following error:

2018-12-21 13:15:41,449 (DEBUG) ee : Setting apt_packages variable for Nginx
2018-12-21 13:15:45,147 (DEBUG) ee : Calling pre_pref
2018-12-21 13:15:45,148 (INFO) ee : Adding repository for NGINX, please wait...
2018-12-21 13:15:45,149 (DEBUG) ee : Adding ppa of Nginx
2018-12-21 13:15:45,149 (DEBUG) ee : Running command: gpg --keyserver hkp://keys.gnupg.net --recv-keys 3050AC3CD2AE6F03
2018-12-21 13:15:45,528 (DEBUG) ee : Command Output: , 
Command Error: gpg: WARNING: unsafe ownership on homedir '/home/dougs/.gnupg'
gpg: key 3050AC3CD2AE6F03: 1 signature not checked due to a missing key
gpg: key 3050AC3CD2AE6F03: "home:rtCamp OBS Project <home:[email protected]>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1

2018-12-21 13:15:45,528 (DEBUG) ee : Running command: gpg -a --export --armor 3050AC3CD2AE6F03 | apt-key add - 
2018-12-21 13:15:45,973 (DEBUG) ee : Command Output: OK
, 
Command Error: gpg: WARNING: unsafe ownership on homedir '/home/dougs/.gnupg'
Warning: apt-key output should not be parsed (stdout is not a terminal)

2018-12-21 13:15:45,974 (INFO) ee : Updating apt-cache, please wait...
Hit:1 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic InRelease
Hit:2 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-updates InRelease
Hit:3 http://us-east-1.ec2.ports.ubuntu.com/ubuntu-ports bionic-backports InRelease
Hit:4 http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu bionic InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease
Ign:6 http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/xUbuntu_18.04  InRelease
Hit:7 http://download.opensuse.org/repositories/home:/rtCamp:/EasyEngine/xUbuntu_18.04  Release
Hit:9 http://ppa.launchpad.net/jonathonf/gcc/ubuntu bionic InRelease
Hit:10 http://ppa.launchpad.net/nginx/stable/ubuntu bionic InRelease
Hit:11 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
Reading package lists...
2018-12-21 13:15:53,539 (INFO) ee : Installing packages, please wait...
Reading package lists...
Building dependency tree...
Reading state information...
Package nginx-custom is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  nginx-common

E: Package 'nginx-custom' has no installation candidate
E: Unable to locate package nginx-ee
2018-12-21 13:15:54,207 (INFO) ee : Oops Something went wrong!!
2018-12-21 13:15:54,208 (ERROR) ee : Check logs for reason `tail /var/log/ee/ee.log` & Try Again!!!

I tried installing from here too, https://virtubox.github.io/nginx-ee/, but I got some other errors. I can install nginx-full and nginx-custom using apt-get but EE doesn’t see nginx as installed when I do that.

I don’t know if the A1 instance type is the issue or not. I haven’t deployed a T2 to test that. This is a complete new server. Any suggestions or help would be greatly appreciated.

Thanks

I think the A1 is ARM based. I tried it and got an error a week or so a ago but figured it was due to the ARM architecture.

That’s what I was thinking too. It is ARM based. Everything else worked other than the nginx install but I can’t find anyway around it. I could compile nginx myself, but I think EE will still error out because it won’t know about it. ARM instances are more economical than intel so it would be great if EE supported them.

AFAIK Docker does support ARM: https://blog.docker.com/2017/09/docker-official-images-now-multi-platform/

That being said, in theory you can try to install EE4 instead of EE3 and it should work out of the box although I’ve never attempted this.

Given that Docker is the only dependency for EE4 and the images are supposed to be multi-arch as per the above linked post, its worth a shot!

Good suggestion. But unless I did something wrong, it’s still not working. When it’s done I get this output.

±------------------±----------------------------------------------------------------------------------+
| OS | Linux 4.15.0-1028-aws #29+nutmeg8-Ubuntu SMP Tue Nov 20 02:59:41 UTC 2018 aarch64 |
| Shell | /bin/bash |
| PHP binary | /usr/bin/php7.2 |
| PHP version | 7.2.13-1+ubuntu18.04.1+deb.sury.org+1 |
| php.ini used | /etc/php/7.2/cli/php.ini |
| EE root dir | phar://ee.phar |
| EE vendor dir | phar://ee.phar/vendor |
| EE phar path | /home/USER |
| EE packages dir | |
| EE global config | /opt/easyengine/config/config.yml |
| EE project config | |
| EE version | 4.0.8 |
±------------------±----------------------------------------------------------------------------------+

But when I try to create a site I get an error.

Error: There was some error in starting services_global-nginx-proxy_1 container. Please check logs.

Not sure which logs it’s referring to either. I started docker manually and it still fails with that error.

Hmm, well the logs are at /opt/easyengine/logs that might shed some light.

Also, you can prob try ee service enable nginx-proxy manually and see what happens.

Auto complete only works without sudo, but if I run sudo ee service enable nginx-proxy after installing docker manually:

sudo apt install docker.io
sudo systemctl unmask docker
sudo systemctl start docker
sudo systemctl enable docker

it is successful but I can’t get beyond that.

sudo ee service enable nginx-proxy
Success: Service global-nginx-proxy enabled.

I can’t install a site though: sudo ee site create v4test.com --type=wp

Full log:

[31-12-2018 10:16:11] ee.INFO: ::::::::::::::::::::::::ee invoked::::::::::::::::::::::::  
[31-12-2018 10:16:11] ee.DEBUG: -----------------------  
[31-12-2018 10:16:11] ee.DEBUG: COMMAND: docker ps > /dev/null  
[31-12-2018 10:16:11] ee.DEBUG: RETURN CODE: 0  
[31-12-2018 10:16:11] ee.DEBUG: -----------------------  
[31-12-2018 10:16:11] ee.DEBUG: -----------------------  
[31-12-2018 10:16:11] ee.DEBUG: COMMAND: command -v docker-compose > /dev/null  
[31-12-2018 10:16:11] ee.DEBUG: RETURN CODE: 0  
[31-12-2018 10:16:11] ee.DEBUG: -----------------------  
[31-12-2018 10:16:11] ee.DEBUG: Using default global config: /opt/easyengine/config/config.yml  
[31-12-2018 10:16:11] ee.DEBUG: No project config found  
[31-12-2018 10:16:11] ee.DEBUG: argv: /usr/local/bin/ee site create v4test.com --type=wp  
[31-12-2018 10:16:11] ee.DEBUG: Running command: site  
[31-12-2018 10:16:11] ee.DEBUG: COMMAND: which docker  
[31-12-2018 10:16:11] ee.DEBUG: RETURN CODE: 0  
[31-12-2018 10:16:11] ee.DEBUG: -----------------------  
[31-12-2018 10:16:11] ee.DEBUG: COMMAND: docker inspect -f '{{.State.Running}}' services_global-nginx-proxy_1  
[31-12-2018 10:16:12] ee.DEBUG: STDOUT:    
[31-12-2018 10:16:12] ee.DEBUG: STDERR: Error: No such object: services_global-nginx-proxy_1   
[31-12-2018 10:16:12] ee.DEBUG: RETURN CODE: 1  
[31-12-2018 10:16:12] ee.DEBUG: -----------------------  
[31-12-2018 10:16:12] ee.DEBUG: -----------------------  
[31-12-2018 10:16:12] ee.DEBUG: COMMAND: docker network inspect ee-global-backend-network  
[31-12-2018 10:16:12] ee.DEBUG: STDOUT: [     {         "Name": "ee-global-backend-network",         "Id": "2cef6c4b8bc7d71e6f3c5498990e14b18ba4fc9c826191c3e30ff6fbe7acc84b",         "Created": "2018-12-26T15:10:19.058885608-05:00",         "Scope": "local",         "Driver": "bridge",         "EnableIPv6": false,         "IPAM": {             "Driver": "default",             "Options": {},             "Config": [                 {                     "Subnet": "172.18.0.0/16",                     "Gateway": "172.18.0.1"                 }             ]         },         "Internal": false,         "Attachable": false,         "Ingress": false,         "ConfigFrom": {             "Network": ""         },         "ConfigOnly": false,         "Containers": {},         "Options": {},         "Labels": {             "org.label-schema.vendor": "EasyEngine"         }     } ]   
[31-12-2018 10:16:12] ee.DEBUG: RETURN CODE: 0  
[31-12-2018 10:16:12] ee.DEBUG: -----------------------  
[31-12-2018 10:16:12] ee.DEBUG: -----------------------  
[31-12-2018 10:16:12] ee.DEBUG: COMMAND: docker network inspect ee-global-frontend-network  
[31-12-2018 10:16:12] ee.DEBUG: STDOUT: [     {         "Name": "ee-global-frontend-network",         "Id": "1e1cce4986c2767f1b9a59fd766f15ced7d56681b1cc684d6ece162696297823",         "Created": "2018-12-26T15:10:19.361748935-05:00",         "Scope": "local",         "Driver": "bridge",         "EnableIPv6": false,         "IPAM": {             "Driver": "default",             "Options": {},             "Config": [                 {                     "Subnet": "172.19.0.0/16",                     "Gateway": "172.19.0.1"                 }             ]         },         "Internal": false,         "Attachable": false,         "Ingress": false,         "ConfigFrom": {             "Network": ""         },         "ConfigOnly": false,         "Containers": {},         "Options": {},         "Labels": {             "org.label-schema.vendor": "EasyEngine"         }     } ]   
[31-12-2018 10:16:12] ee.DEBUG: RETURN CODE: 0  
[31-12-2018 10:16:12] ee.DEBUG: -----------------------  
[31-12-2018 10:16:12] ee.DEBUG: -----------------------  
[31-12-2018 10:16:12] ee.DEBUG: COMMAND: docker-compose up -d global-nginx-proxy  
[31-12-2018 10:16:12] ee.DEBUG: STDERR: /usr/local/bin/docker-compose: 1: /usr/local/bin/docker-compose: Not: not found   
[31-12-2018 10:16:12] ee.DEBUG: RETURN CODE: 127  
[31-12-2018 10:16:12] ee.DEBUG: -----------------------  
[31-12-2018 10:16:12] ee.ERROR: There was some error in starting services_global-nginx-proxy_1 container. Please check logs.

FWIW, I installed EE on an x86 AWS instance and it worked as expected. Still an issue with auto complete not working with sudo and there was a permissions issue on /opt/easyengine where only root had access, but I was able to create a site.

I think the docker install isn’t working correctly on the ARM instances and it’s not downloading the docker images.

Thank you so much for truly a veritable knowldege.It really worked for me. The key idea behind it is pretty amazing and glad to know about it.