production icon indicating copy to clipboard operation
production copied to clipboard

An exception occurred in driver: SQLSTATE[HY000] [2002] - Build server - bin/build-js.sh

Open DenisMir opened this issue 3 years ago • 0 comments

PHP Version

8.0

Shopware Version

6.4

Expected behaviour

The bin/build-js.sh should just run through without needing a database connection. (executed with the bin/ci binary)

Actual behaviour

The bin/build-js.sh is throwing errors due to the missing db connection.

In AbstractMySQLDriver.php line 112:
                                                                                                                                                      
  An exception occurred in driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known  
                                                                                                                                                      

In Exception.php line 18:
                                                                                                                     
  SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known  
                                                                                                                     

In PDOConnection.php line 40:
                                                                                                                     
  SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known 

Disabling the theme:compile by setting the SHOPWARE_SKIP_THEME_COMPILE=1 env var does fix the error but is not the way to go since I'd like to build the theme on the build server and not on my production application server that doesn't contain any npm etc stuff.

How to reproduce

Just do a bin/build-js.sh without database connection.

DenisMir avatar Sep 11 '22 06:09 DenisMir