Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to access Magento #5

Closed
oddietaco opened this issue Sep 1, 2021 · 26 comments
Closed

Unable to access Magento #5

oddietaco opened this issue Sep 1, 2021 · 26 comments

Comments

@oddietaco
Copy link

The terraform apply went really well, and it looks like every needed resource was provisioned. I'm now trying to access the Magento storefront, and I notice that there are two ALBs - an inner and an outer. When I point my browser at the DNS entry for the outer ALB, I get the nginx configuration page that just says "Welcome to nginx!"

@selcuk-cofe
Copy link

@oddietaco that also same for me just applied now.

@magenx
Copy link
Owner

magenx commented Sep 2, 2021

nginx config will be updated soon
also there is some issue with 3rd party magento module.

@selcuk-cofe
Copy link

Thanks for the update.

@magenx
Copy link
Owner

magenx commented Sep 2, 2021

@selcuk-cofe
Copy link

#mageplaza/magento-2-smtp#309 (comment)

is there any temporary workground to do on terraform side ? or where code located on codecommit maybe manually we can edit composer.lock for the module

@magenx
Copy link
Owner

magenx commented Sep 2, 2021

all the git transit operations on your cloudshell,
files synced to codecommit repo, cloned to ec2 instance.

you can edit files before you run magento instalation if you need.

@selcuk-cofe
Copy link

thanks , which instance I should start installing each of them separately ? or just in build instance ?

@selcuk-cofe
Copy link

again , I couldn’t be successful after remove smtp module from composer.lock file and re-run ssm document script from system manager.

@selcuk-cofe
Copy link

selcuk-cofe commented Sep 5, 2021

any update ? I tried with your latest commit which updated nginx conf still same. After infra created how to install magento with ssm document ? its failed running command when I execute for created instances. I saw just "Nginx welcome" page for outer application load balancer

@magenx
Copy link
Owner

magenx commented Sep 5, 2021

the easiest way for you will be to run ssm installation document on admin instance, (select instance from list)
if document run successfully , then up to date magento files and settings will be pulled to frontend.
then depends on your DNS you need to point domain name to outer load balancer or its ip addresses.
then call your domain name. you will see magento frontend page.

@selcuk-cofe
Copy link

selcuk-cofe commented Sep 6, 2021

Hello thank you point me to instance, I successfully run ssm document on admin instance here is ssm output log https://justpaste.it/8wrhn Still I can not see magento frontend page , just ı saw Nginx welcome page

@selcuk-cofe
Copy link

Update: when I run ssm document I figured out document was searching for composer.json file under /home/brandname/public_html/ but there file isn't exist.So I ssh to admin instance with aws cli ssm mananer plugin. Manually created composer.json file under that directory with file values on codecommit repository and run it again.

Here is full log : https://justpaste.it/3b80j and still no luck load balancer just showing nginx webpage

@magenx
Copy link
Owner

magenx commented Sep 6, 2021

you can debug it - just check if nginx config was applied,
welcome page = default nginx, no config from user_data.

this is not related to magento installation, because instances already configured, so if you call your domain
you must see either:
502 error / https error - wrong domain
redirect loop to /setup/ - when magento not installed

luma frontpage - magento installed

@selcuk-cofe
Copy link

selcuk-cofe commented Sep 6, 2021

you can debug it - just check if nginx config was applied,
welcome page = default nginx, no config from user_data.

this is not related to magento installation, because instances already configured, so if you call your domain
you must see either:
502 error / https error - wrong domain
redirect loop to /setup/ - when magento not installed

luma frontpage - magento installed

yes there are no nginx config file on admin instances under /etc/nginx/sites-enabled with named magento.conf. also do I need to edit nginx files ?

@magenx
Copy link
Owner

magenx commented Sep 6, 2021

there is only app parameters in variables.tf, nothing else to change for default setup.

@selcuk-cofe
Copy link

selcuk-cofe commented Sep 7, 2021

there is only app parameters in variables.tf, nothing else to change for default setup.

yes , but not working I tried many times. I can see user-data values on ec2 but there are no nginx configuration on instance even if I put manually magento.conf and restart nginx still no luck.

@magenx
Copy link
Owner

magenx commented Sep 7, 2021

please debug this issue more, check syslog to find any error message,
we need to understand why configuration failed in your case

@selcuk-cofe
Copy link

I just apply stack with changing ACM validation method from "EMAIL" to "DNS" and here below my app configuration. there are no any other changes on terraform code side.

cidr_block = "172.30.0.0/16" brand = "cofestore" domain = "cofestore.com" admin_email = "admin@cofestore.com" staging_domain = "stg.cofestore.com" source = "https://github.com/magenx/Magento-2.git" language = "en_US" currency = "EUR" timezone = "UTC" php_version = "7.4"

@selcuk-cofe
Copy link

I just apply stack with changing ACM validation method from "EMAIL" to "DNS" and here below my app configuration. there are no any other changes on terraform code side.

cidr_block = "172.30.0.0/16" brand = "cofestore" domain = "cofestore.com" admin_email = "admin@cofestore.com" staging_domain = "stg.cofestore.com" source = "https://github.com/magenx/Magento-2.git" language = "en_US" currency = "EUR" timezone = "UTC" php_version = "7.4"

also I can see my acm certificate on my domain with nginx welcome page. so validation method works.

@selcuk-cofe
Copy link

in admin instances syslog I saw below error.

main.ERROR: There are no commands defined in the "cron" namespace. #0 /home/cofestore/public_html/vendor/symfony/console/Application.php(657): Symfony\Component\Console\Application->findNamespace() #1 /home/cofestore/public_html/vendor/symfony/console/Application.php(237): Symfony\Component\Console\Application->find() #2 /home/cofestore/public_html/vendor/magento/framework/Console/Cli.php(115): Symfony\Component\Console\Application->doRun() #3 /home/cofestore/public_html/vendor/symfony/console/Application.php(149): Magento\Framework\Console\Cli->doRun() #4 /home/cofestore/public_html/bin/magento(23): Symfony\Component\Console\Application->run() #5 {main} [] []

@selcuk-cofe
Copy link

Update: after deploy stack here is syslog error I have found on frontend instance. can not find nginx.conf.

Sep 8 10:04:17 ip-172-30-28-58 cloud-init[735]: sed: can't read /etc/nginx/sites-available/magento.conf: No such file or directory Sep 8 10:04:17 ip-172-30-28-58 cloud-init[735]: sed: can't read /etc/nginx/sites-available/magento.conf: No such file or directory Sep 8 10:04:17 ip-172-30-28-58 cloud-init[735]: sed: can't read /etc/nginx/conf.d/maps.conf: No such file or directory Sep 8 10:04:17 ip-172-30-28-58 cloud-init[735]: sed: can't read /etc/nginx/conf.d/maps.conf: No such file or directory

@magenx
Copy link
Owner

magenx commented Sep 8, 2021

yes, it looks like config not applied, but not sure why exactly,
unless we see specific error message or you share developer access to quickly debug, issue is unknown

@selcuk-cofe
Copy link

update: also created staging maria db version higher than magento supported version.

@magenx
Copy link
Owner

magenx commented Sep 15, 2021

engine version defined in variables.tf

we just tested full deployment up to product import,
and it looks like everything is working (possible minor issues) but its easy to correct

@magenx
Copy link
Owner

magenx commented Sep 21, 2021

as we didnt get any proper and clear error messages to understand this issue
could be account issue/permissions or custom terraform changes applied
have to close it.

@magenx magenx closed this as completed Sep 21, 2021
@youanden
Copy link

@magenx I am running into this issue as well with this repo and this commit fixed the issue. I added a codebuild-breakpoint just before the setup:install and applied this patch directly over the vendor directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants