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.57k stars 9.32k forks source link

Unable to connect Azure Paas DB with SSL Enabled #38487

Open ragunathankmindsprint opened 9 months ago

ragunathankmindsprint commented 9 months ago

Preconditions and environment

Config : 'db' => [ 'table_prefix' => '', 'connection' => [ 'default' => [ 'host' => 'xxxxxxxxxxxxxxx', 'dbname' => 'xxxxxx', 'username' => 'xxxxxxx', 'password' => 'xxxxxxxx', 'model' => 'mysql4', 'engine' => 'innodb', 'initStatements' => 'SET NAMES utf8;', 'active' => '1', 'driver_options' => [ 1014 => true ] ] ] ],

Error : SQLSTATE[HY000] [9002] SSL connection is required. Please specify SSL options and retry.

SSL Enabled Screenshot :

SSL-Enable

Steps to reproduce

Example :

  1. Open env.php file
  2. Enable SSL in Azure Pass DB
  3. Added the below code in app/etc/env.php file in db section.
    'db' => [
        'table_prefix' => '',
        'connection' => [
            'default' => [
                'host' => 'xxxxxxxxxxxxxxx',
                'dbname' => 'xxxxxx',
                'username' => 'xxxxxxx',
                'password' => 'xxxxxxxx',
                'model' => 'mysql4',
                'engine' => 'innodb',
                'initStatements' => 'SET NAMES utf8;',
                'active' => '1',
                'driver_options' => [
                    1014 => true
                ]
            ]
        ]
    ],
  4. Run the setup upgrade command : php bin/magento setup:upgrade;

Expected result

Upgrade successful.

Actual result

Error : SQLSTATE[HY000] [9002] SSL connection is required. Please specify SSL options and retry.

Azure DB Enabled :

SSL-Enable

Additional information

No response

Release note

No response

Triage and priority

m2-assistant[bot] commented 9 months ago

Hi @olamragunathank. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

srsathish92 commented 9 months ago

@olamragunathank I think you have to add an SSL certificate in the env.php

'driver_options' => [
        1014 => true,
        1009 => '/path to certificate/CA.crt.pem'
    ]
m2-assistant[bot] commented 9 months ago

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


souzapsl commented 8 months ago

@magento give me 2.4.5-p1 instance

magento-deployment-service[bot] commented 8 months ago

Hi @souzapsl. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 8 months ago

Hi @souzapsl, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

souzapsl commented 8 months ago

@magento give me 2.4.6-p2 instance

magento-deployment-service[bot] commented 8 months ago

Hi @souzapsl. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 8 months ago

Hi @souzapsl, unfortunately there is no ability to deploy Magento instance at the moment. Please try again later.

engcom-Hotel commented 4 months ago

We are moving this issue On hold as we are discussing this issue with the PO.

Thanks