[Mapbender-users] Antw: Mapbender4 - Username/PW in Verbindungsstring zur PostgreSQL-DB

Olaf Roehling Olaf.Roehling at landkreis-wittenberg.de
Thu Mar 13 08:00:58 PDT 2025


Hallo,
existiert die Datenbank denn ? "the database platform while connecting
to a non-existing database is deprecated)

Beste Grüße

Landkreis Wittenberg
Fachdienst 10
GIS - Koordinator
Olaf Roehling
Breitscheidstraße 3
06886 Lutherstadt Wittenberg
 
Telefon :+49 3491 806-1219
 
mailto: olaf.roehling at landkreis-wittenberg.de 



Landkreis Wittenberg
Breitscheidstraße 3
06886 Lutherstadt Wittenberg
Website: www.landkreis-wittenberg.de

https://www.facebook.com/lkwbg
https://www.youtube.com/channel/UC1i-cGdts2YDblf1sJOE1Vg
https://www.instagram.com/lk.wbg
https://www.linkedin.com/company/landkreis-wittenberg
https://whatsapp.com/channel/0029Vac8hsM9Gv7bCkQrh23W

>>> Daniel Grohmann via Mapbender_users
<mapbender_users at lists.osgeo.org> 13.03.2025 15:56 >>>
Hallo zusammen,

die Konfiguration der PostgreSQL-Datenbankverbindung in der Datei
".env.local" erfolgt bei Mapbender V4 über einen Verbindungsstring der
Form
MAPBENDER_DATABASE_URL="postgresql://dbuser:dbpassword@localhost:5432/dbname?serverVersion=14&charset=utf8"
.

Gibt es bei der Vergabe des Datenbankbenutzers <dbuser> und des
Passworts <dbpassword> Zeichen, die nicht verwendet werden dürfen? Der
<dbuser> kann sich mit psql mit der DB <dbname> auf localhost verbinden.


Wenn ich meine Konfiguration mit "bin/console mapbender:config:check"
überprüfe, erhalte ich folgende Fehlermeldungen. 

Check Database connections
==========================

{"message":"User Deprecated: Relying on a fallback connection used to
determine the database platform while connecting to a non-existing
database is deprecated. Either use an existing database name in
connection parameters or omit the database name if the platform and the
server configuration allow that. (Connection.php:464 called by
Connection.php:416, https://github.com/doctrine/dbal/pull/5707, package
doctrine/dbal)","context":{"exception":{"class":"ErrorException","message":"User
Deprecated: Relying on a fallback connection used to determine the
database platform while connecting to a non-existing database is
deprecated. Either use an existing database name in connection
parameters or omit the database name if the platform and the server
configuration allow that. (Connection.php:464 called by
Connection.php:416, https://github.com/doctrine/dbal/pull/5707, package
doctrine/dbal)","code":0,"file":"/var/www/mapbender4/vendor/doctrine/deprecations/src/Deprecation.php:208"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2025-03-13T14:42:51.160199+00:00","extra":{}}
{"message":"User Deprecated: Relying on the DBAL connecting to the
\"postgres\" database by default is deprecated. Unless you want to have
the server determine the default database for the connection, specify
the database name explicitly. (Driver.php:92 called by Driver.php:35,
https://github.com/doctrine/dbal/pull/5705, package
doctrine/dbal)","context":{"exception":{"class":"ErrorException","message":"User
Deprecated: Relying on the DBAL connecting to the \"postgres\" database
by default is deprecated. Unless you want to have the server determine
the default database for the connection, specify the database name
explicitly. (Driver.php:92 called by Driver.php:35,
https://github.com/doctrine/dbal/pull/5705, package
doctrine/dbal)","code":0,"file":"/var/www/mapbender4/vendor/doctrine/deprecations/src/Deprecation.php:208"}},"level":200,"level_name":"INFO","channel":"deprecation","datetime":"2025-03-13T14:42:51.160244+00:00","extra":{}}
{"message":"Error thrown while running command
\"mapbender:config:check\". Message: \"An exception occurred in the
driver: SQLSTATE[08006] [7] could not translate host name \"mapbender\"
to address: Name or service not
known\"","context":{"exception":{"class":"Doctrine\\DBAL\\Exception\\ConnectionException","message":"An
exception occurred in the driver: SQLSTATE[08006] [7] could not
translate host name \"mapbender\" to address: Name or service not
known","code":7,"file":"/var/www/mapbender4/vendor/doctrine/dbal/src/Driver/API/PostgreSQL/ExceptionConverter.php:77","previous":{"class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","message":"SQLSTATE[08006]
[7] could not translate host name \"mapbender\" to address: Name or
service not
known","code":7,"file":"/var/www/mapbender4/vendor/doctrine/dbal/src/Driver/PDO/Exception.php:24","previous":{"class":"PDOException","message":"SQLSTATE[08006]
[7] could not translate host name \"mapbender\" to address: Name or
service not
known","code":7,"file":"/var/www/mapbender4/vendor/doctrine/dbal/src/Driver/PDO/PgSQL/Driver.php:34"}}},"command":"mapbender:config:check","message":"An
exception occurred in the driver: SQLSTATE[08006] [7] could not
translate host name \"mapbender\" to address: Name or service not
known"},"level":500,"level_name":"CRITICAL","channel":"console","datetime":"2025-03-13T14:42:51.160788+00:00","extra":{}}
14:42:51 CRITICAL [console] Error thrown while running command
"mapbender:config:check". Message: "An exception occurred in the driver:
SQLSTATE[08006] [7] could not translate host name "mapbender" to
address: Name or service not known" ["exception" =>
Doctrine\DBAL\Exception\ConnectionException^ { …},"command" =>
"mapbender:config:check","message" => "An exception occurred in the
driver: SQLSTATE[08006] [7] could not translate host name "mapbender" to
address: Name or service not known"]
{"message":"Command \"mapbender:config:check\" exited with code
\"7\"","context":{"command":"mapbender:config:check","code":7},"level":100,"level_name":"DEBUG","channel":"console","datetime":"2025-03-13T14:42:51.167210+00:00","extra":{}}

In ExceptionConverter.php line 77:

An exception occurred in the driver: SQLSTATE[08006] [7] could not
translate host name "mapbender" to address: Name or service not known


In Exception.php line 24:

SQLSTATE[08006] [7] could not translate host name "mapbender" to
address: Name or service not known


In Driver.php line 34:

SQLSTATE[08006] [7] could not translate host name "mapbender" to
address: Name or service not known

mapbender:config:check

Für Hinweise bin ich wie immer sehr dankbar ;-)

Viele Grüße,
Daniel


Mit freundlichem Gruß 
im Auftrag 
Daniel Grohmann 
1. Sachbearbeiter Geodaten 
-- 
Landeshauptstadt Magdeburg 

- Die Oberbürgermeisterin - 
Fachbereich Stadtplanung und Vermessung
Team Geodaten 
An der Steinkuhle 6 | 39128 Magdeburg 
Telefon: 
+49 391 540-5150 
 
E-Mail: 
daniel.grohmann at va.magdeburg.de 
 
Website: 
www.magdeburg.de 
 
 
 
 
WICHTIG: Diese Information ist ausschließlich für den Adressaten
bestimmt und kann vertrauliche oder gesetzlich geschützte Informationen
enthalten. Wenn Sie nicht der bestimmungsgemäße Adressat sind,
unterrichten Sie bitte den Absender und vernichten diese E-Mail. Anderen
als dem bestimmungsgemäßen Adressaten ist es untersagt, diese E-Mail zu
speichern, weiterzuleiten oder ihren Inhalt, auf welche Weise auch
immer, zu verwenden. Es werden aktuelle Virenschutzprogramme verwendet.
Für Schäden, die dem Empfänger gleichwohl durch vom Absender zugesandte
mit Viren befallene E-Mails entstehen, schließt die Landeshauptstadt
Magdeburg jegliche Haftung aus. 
 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapbender_users/attachments/20250313/0a7b2720/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IMAGE_5.png
Type: image/png
Size: 1112 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapbender_users/attachments/20250313/0a7b2720/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IMAGE_6.png
Type: image/png
Size: 580 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapbender_users/attachments/20250313/0a7b2720/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IMAGE_7.png
Type: image/png
Size: 907 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapbender_users/attachments/20250313/0a7b2720/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IMAGE.jpeg
Type: image/jpeg
Size: 7214 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapbender_users/attachments/20250313/0a7b2720/attachment-0001.jpeg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: IMAGE.png
Type: image/png
Size: 31541 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapbender_users/attachments/20250313/0a7b2720/attachment-0007.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Olaf Roehling.vcf
Type: application/octet-stream
Size: 263 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapbender_users/attachments/20250313/0a7b2720/attachment-0001.obj>


More information about the Mapbender_users mailing list