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

undefined index db-ssl-verify #26762

Closed
DanielRuf opened this issue Feb 7, 2020 · 18 comments
Closed

undefined index db-ssl-verify #26762

DanielRuf opened this issue Feb 7, 2020 · 18 comments
Assignees
Labels
Component: Backend Component: Setup Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reported on 2.4.0 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@DanielRuf
Copy link
Contributor

DanielRuf commented Feb 7, 2020

Preconditions (*)

  1. current 2.4-develop
  2. ddev setup

Steps to reproduce (*)

Follow the install instructions at https://ddev.readthedocs.io/en/latest/users/cli-usage/#magento-2-quickstart and then try to change the backend frontend name using the ssh container.

bin/magento setup:config:set --backend-frontname=admin
Overwrite the existing configuration for backend-frontname?[Y/n]y
Overwrite the existing configuration for db-ssl-verify?[Y/n]n

In ErrorHandler.php line 61:
                                                                                                                                        
  Notice: Undefined index: db-ssl-verify in /var/www/html/setup/src/Magento/Setup/Model/ConfigOptionsList/DriverOptions.php on line 49  

Expected result (*)

  1. Result with no errors

Actual result (*)

screen

@m2-assistant
Copy link

m2-assistant bot commented Feb 7, 2020

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

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

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.

@DanielRuf do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label Feb 7, 2020
@DanielRuf
Copy link
Contributor Author

I'm working on it.

@DanielRuf DanielRuf self-assigned this Feb 7, 2020
@m2-assistant
Copy link

m2-assistant bot commented Feb 7, 2020

Hi @DanielRuf. 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: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!


@gcampedelli
Copy link

Hi, I had the same problem while configuring Redis using Magento Dev Docs as a guide.
Turns out thar by declaring these values in command line I could go further.

bin/magento setup:config:set --page-cache=redis --page-cache-redis-server=127.0.0.1 --page-cache-redis-db=1
is the proposed command by Magento Dev Docs
I wrote it like this
bin/magento setup:config:set --page-cache=redis --page-cache-redis-server=127.0.0.1 --page-cache-redis-db=1 --db-ssl-verify=/path-to/mysql/my.pem
I don't remember exactly which where the missing index, but it was a total of 4. So you can declare each one in command line. For me it worked. like this
bin/magento setup:config:set --page-cache=redis --page-cache-redis-server=127.0.0.1 --page-cache-redis-db=1 --db-ssl-verify=/path-to/mysql/my.pem --db-(other index)=path-to --db-(another index)=path-to

@DanielRuf
Copy link
Contributor Author

I don't think that my ddev setup uses redis. So your issue might be a different one.

@gcampedelli
Copy link

Have you tried to declare those index in setup? I had to do that as well for each command line I used. The only difference is that I made the setup using wizard. You can also try to declare in env.php like this:

 'db' => [
        'table_prefix' => '',
        'connection' => [
            'default' => [
                'host' => '127.0.0.1',
                'dbname' => 'dbname',
                'username' => 'magento_user',
                'password' => 'your strong password',
                'active' => '1',
                'driver_options' => [
                    1007 => 'path-to private pem',
                    1008 => 'path to cert.pem',
                    1009 => 'path to ca.pem',
                    1014 => false
                ],
                'model' => 'mysql4',
                'engine' => 'innodb',
                'initStatements' => 'SET NAMES utf8;'
            ]
        ]
    ],

Otherwise, you can declare in your config:setup (any of them) . --db . flags for each of those indexes (1007, 1008, 1009 and 1014)

@DanielRuf
Copy link
Contributor Author

Otherwise, you can declare in your config:setup (any of them) . --db . flags for each of those indexes (1007, 1008, 1009 and 1014)

I mean a very specific field which fails in a standard setup (ddev). I did nothing special. And not sure what these numbers are for. I have already opened a PR with a bugfix for such cases.

@gcampedelli
Copy link

I don't this is a bug. 1007, 1008, 1009 and 1014 each one correspond to --db-ssl-verify --db-cert-verify, the problem which your are facing while configuring setup. So, after configuring setup, db-ssl-verify turns out to be 1007 in driver options inside your env.php file.

@DanielRuf
Copy link
Contributor Author

DanielRuf commented Feb 7, 2020

1014 => false

This seems to be already set in the generated file. Normal setup and so on worked but not the specific command which should nothing have to do with the field (just change one setting).

The change in the PR prevents this error.

@DanielRuf
Copy link
Contributor Author

Please follow the described steps. Not sure if you are part of the Magento or Adobe teams or a contributor as I see no additional information.

Bildschirmfoto 2020-02-07 um 23 58 54

@gcampedelli
Copy link

I'm not from Magento team, I'm just sharing with you how I solved a similar error calling config:setup. I did some research on that new feature and I didn't open an issue. I just said for you to try to declare those index while using config:setup. The same values that are declared in your env.php. I just think it is missing in Dev Docs files. So, you PR is relevant if you think so, but then it is up to Magento Administrators accept it or not according to their milestones and plans.

@flancer64
Copy link
Contributor

I install Magento 2.3.4 using composer:

composer --repository-url=https://repo.magento.com/ create-project \
  magento/project-community-edition=^2.3 ./mage

then I run ./bin/magento setup:install to connect to existing DB (I upgrade my Mage instance):

./bin/magento setup:install \
  --admin-email="[email protected]" \
  --admin-firstname="Store" \
  --admin-lastname="Admin" \
  --admin-password="..." \
  --admin-use-security-key="0" \
  --admin-user="admin" \
  --backend-frontname="backdoor" \
  --base-url-secure="https://my.magento.com/" \
  --base-url="http://my.magento.com/" \
  --db-host="localhost" \
  --db-name="magento" \
  --db-password="..." \
  --db-user="magento" \
  --key="..." \
  --session-save="db" \
  --use-rewrites="1" \
  --use-secure-admin="0" \
  --use-secure="0"

after that I have absolutely fresh installation and newly created ./app/etc/env.php with:

    'db' => [
        ...
        'connection' => [
            'default' => [
                ...
                'driver_options' => [
                    1014 => false
                ]
            ]
        ]
    ]

Then I have this warning:

Overwrite the existing configuration for db-ssl-verify?[Y/n]

every time I run

$ ./bin/magento setup:config:set

even w/o options.

@DanielRuf
Copy link
Contributor Author

Both PRs will make it more stable and prevent such cases or errors that are not catched and cause issues in a later step.

@engcom-Alfa engcom-Alfa self-assigned this Mar 2, 2020
@m2-assistant
Copy link

m2-assistant bot commented Mar 2, 2020

Hi @engcom-Alfa. 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: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@engcom-Alfa engcom-Alfa added Component: Setup Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Component: Backend Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Mar 2, 2020
@ghost ghost unassigned engcom-Alfa Mar 2, 2020
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-Alfa
Thank you for verifying the issue. Based on the provided information internal tickets MC-32043 were created

Issue Available: @engcom-Alfa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Mar 2, 2020
@brusMX
Copy link

brusMX commented Mar 29, 2020

Thanks @gcampedelli !
I also got this bug while on my install by not specifying db-ssl-key nor db-ssl-cert. For me the command that fixed my install was to put these flags with an empty string in an update:

magento setup:config:set   \
--db-ssl-key=""  \
--db-ssl-cert=""  \
--db-ssl-ca=/path/tho/ca.pem  \
--db-ssl-verify  \
--session-save=db

@magento-engcom-team
Copy link
Contributor

Hi @DanielRuf. Thank you for your report.
The issue has been fixed in #26763 by @DanielRuf in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.0 release.

@magento-engcom-team
Copy link
Contributor

Hi @DanielRuf. Thank you for your report.
The issue has been fixed in #30077 by @flancer64 in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.2 release.

@magento-engcom-team magento-engcom-team added the Reported on 2.4.0 Indicates original Magento version for the Issue report. label Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Backend Component: Setup Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reported on 2.4.0 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
None yet
Development

No branches or pull requests

7 participants