magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.53k stars 9.31k forks source link

Error while installing Magento 2.4 from CLI #29462

Closed lucasvm closed 4 years ago

lucasvm commented 4 years ago

Summary (*)

Installing Magento 2.4 from CLI getting Interceptor error

Examples (*)

php bin/magento setup:install --base-url=http://local.web.com/ --db-host=localhost --db-name=mydb --db-user=root --db-password= --admin-firstname=admin --admin-lastname=admin --admin-email=test@test.com --admin-user=admin --admin-password=admin123 --language=en_US --currency=USD --timezone=America/Chicago

Proposed solution


Getting error: Class Magento\Framework\DB\Adapter\Pdo\Mysql\Interceptor does not exist

m2-assistant[bot] commented 4 years ago

Hi @lucasvm. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

Please, add a comment to assign the issue: @magento I am working on this


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

ihor-sviziev commented 4 years ago

hi @lucasvm, As I understood - did you run the composer install command before it? If yes - please add to the end of your command -vvv flag and give us output

m2-assistant[bot] commented 4 years ago

Hi @ihor-sviziev. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

lucasvm commented 4 years ago

Yes of course i have ran the composer install, there is no more web setup wizard install?, only cli?, im running php 7.3 on Ubuntu, do i need to install some php extension? the docs are not clear.

ihor-sviziev commented 4 years ago

Yes, in magento 2.4 there no more web installer. In case if you’ll have some missing extension - composer install should fail. Could you rerun the install command with -vvv flag at the end?

On Tue, 11 Aug 2020 at 16:57, lucasvm notifications@github.com wrote:

Yes of course i have ran the composer install, there is no more web setup wizard install?, only cli?, im running php 7.3 on Ubuntu, do i need to install some php extension? the docs are not clear.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/29462#issuecomment-671962863, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOJOUIODKYA4GQZXMT33XLSAFE5RANCNFSM4P2QFMLQ .

mrtuvn commented 4 years ago

in case you download package from magento homepage you don't need run composer install. If you add extra package to composer.json just run composer update

From 2.4.0 magento install via cli only cause web wizard has removed Cli command should add elasticsearch to avoid issue during cli run --search-engine=elasticsearch7 --elasticsearch-host=elasticsearch --elasticsearch-port=9200 --elasticsearch-index-prefix=magento2 --elasticsearch-enable-auth=0 --elasticsearch-timeout=15 replace elasticsearch-host with your value correspoding your setting

lucasvm commented 4 years ago

I have installed via Composer, doing the create project.

sdzhepa commented 4 years ago

Hello @lucasvm cc: @ihor-sviziev

Not sure exactly but seems this issue related to your dev environment. Probably some required extension is missed or some artifacts in DB or code.

I verified this issue by the next steps:

  1. Get Magento using composer as described here: https://devdocs.magento.com/guides/v2.4/install-gde/composer.html#get-the-metapackage
    composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition
  2. Create empty DB and user for Magento.
  3. Check that Elasticsearch is run and configured. More details here: https://devdocs.magento.com/guides/v2.4/config-guide/elasticsearch/es-overview.html
  4. Install Magento using CLI. Example of my CLI
    php bin/magento setup:install \
    --db-host=db \
    --db-name=magento_i3 \
    --db-user=magento \
    --db-password=123123q \
    --base-url=http://magento.i3.loc \
    --backend-frontname=admin \
    --admin-user=admin \
    --admin-password=123123q \
    --admin-email=admin@test.com \
    --admin-firstname=Magento \
    --admin-lastname=User \
    --language=en_US \
    --currency=USD \
    --timezone=America/Chicago \
    --skip-db-validation \
    --elasticsearch-host=000.00.00.000 \
    --elasticsearch-port=9200 \
    --elasticsearch-index-prefix=instance_3 \
    && chown -R www-data:www-data .

Result:

Please, review my steps and additional docs probably it has the answer. Also, if I missed some details please let me know. Unfortunately without additional details, this issue could be closed as cannot reproduce

lucasvm commented 4 years ago

Ok thank you!, i think i have installed the software, i can see all the tables in the database, also the env file has been created, but when doing the setup upgrade im getting: Could not validate a connection to Elasticsearch. No alive nodes found in your cluster

I dont have elasticsearch, its mandatory?

mrtuvn commented 4 years ago

@lucasvm yes 2.4 required elastic when install. Before you run cli for install make sure elastic service run

ihor-sviziev commented 4 years ago

Hi @lucasvm, I’m closing this issue as it reproducing only when you don’t have configured elasticsearch, which is requirement for magento correct work.

potticus commented 3 years ago

In my case, it was saying the domain was invalid, but it turned out it was all to do with invisible illegal characters that got pasted when I copied the whole install command code from another website. It seems to tell you that the domain is invalid as that tends to be the first parameter declared in the command.