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

ERROR 2026 (HY000): SSL connection error: SSL_CTX_set_default_verify_paths failed #41300

Closed
Brenneisen opened this issue Mar 2, 2022 Discussed in #41299 · 8 comments · Fixed by #41315
Closed

ERROR 2026 (HY000): SSL connection error: SSL_CTX_set_default_verify_paths failed #41300

Brenneisen opened this issue Mar 2, 2022 Discussed in #41299 · 8 comments · Fixed by #41315
Labels

Comments

@Brenneisen
Copy link
Contributor

Brenneisen commented Mar 2, 2022

Discussed in #41299

Originally posted by Brenneisen March 2, 2022

  • Laravel Version: 9.3.0
  • PHP Version: 8.1.1
  • Database Driver & Version: MySQL Ver 8.0.27-0ubuntu0.20.04.1 for Linux on x86_64 ((Ubuntu))

Description:

I get an error when running php artisan migrate. With version 9.2.0 the migrations still work. With 9.3.0 our integration tests throw an error when migrating because of an SSL connection error. For me it seems to be due to the new config --ssl-ca="${:LARAVEL_LOAD_SSL_CA}".

The command "mysql  --user="${:LARAVEL_LOAD_USER}" --password="${:LARAVEL_LOAD_PASSWORD}" --host="${:LARAVEL_LOAD_HOST}" --port="${:LARAVEL_LOAD_PORT}" --ssl-ca="${:LARAVEL_LOAD_SSL_CA}" --database="${:LARAVEL_LOAD_DATABASE}" < "${:LARAVEL_LOAD_PATH}"" failed.

Error Output:

mysql: [Warning] Using a password on the command line interface can be insecure.
ERROR 2026 (HY000): SSL connection error: SSL_CTX_set_default_verify_paths failed

Steps To Reproduce:

Run php artisan migrate.

@Brenneisen
Copy link
Contributor Author

I believe it is due to the fact that an empty string is passed: #40931

@DeepDiver1975
Copy link
Contributor

What is the MySQL client version?

@Brenneisen
Copy link
Contributor Author

@DeepDiver1975

Bildschirmfoto 2022-03-03 um 08 45 47

@DeepDiver1975
Copy link
Contributor

I will provide a PR later today.
Using the mariadb client this was not observed. Sorry for the trouble.

@driesvints driesvints added the bug label Mar 3, 2022
@Bouhnosaure
Copy link

Indeed i just updated to 9.3 and got the same error when my tests runs the migrations:

Symfony\Component\Process\Exception\ProcessFailedException : The command "mysql  --user="${:LARAVEL_LOAD_USER}" --password="${:LARAVEL_LOAD_PASSWORD}" --host="${:LARAVEL_LOAD_HOST}" --port="${:LARAVEL_LOAD_PORT}" --ssl-ca="${:LARAVEL_LOAD_SSL_CA}" --database="${:LARAVEL_LOAD_DATABASE}" < "${:LARAVEL_LOAD_PATH}"" failed.

Exit Code: 1(General error)

Working directory: /app

Output:
================

Error Output:
================
ERROR 2026 (HY000): SSL connection error: Error while reading file.

/app/vendor/symfony/process/Process.php:267
/app/vendor/laravel/framework/src/Illuminate/Database/Schema/MySqlSchemaState.php:77
/app/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:145
...

My environment is using mysql Ver 15.1 Distrib 10.5.12-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper as client and no configuration on SSL certificates on databases for testing.

I hope it helps !

@CraigMonva
Copy link

Spotted this yesterday while running github action tests that require mysql connection.

Glad its being looked at already.

@driesvints
Copy link
Member

@DeepDiver1975 when will you have time to send in a PR? Otherwise we'll probably revert this for now to unblock people.

@DeepDiver1975
Copy link
Contributor

Within the next hour

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

Successfully merging a pull request may close this issue.

5 participants