-
Notifications
You must be signed in to change notification settings - Fork 6
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
fe_sendauth: no password supplied #505
Comments
Maybe connected to <opengisch/QgisModelBaker#996 (comment)>
|
Is your tww project opening correctly? Could you check your pg_tww settings configuration? Is there a password provided in your pg_service file? |
Thanks for your feedback. Stefan and i tried it together yes my project is correctly pg_service is also working well with pw and stuff like that we have a cloud server and somehow it goes over the localhost as you can see in the log i posted yesterday. i hope my answer helps |
Good News |
Sad News |
|
our pgpass file is filled with the ip off our server and the dbases from there |
The error is not thrown during the export itself, but while validating the subclass count before exporting. Thus, the problem lies in TEKSI Wastewater (although it is possible that ili2pg has issues too)
|
Its just one from a list of our server connections and they are clean and make no problem with the old modul
i know a company trying tww and they had the same problem i sent em the older version (the one we use from point 1) of the teksi modul and it works there too so it cant be my configuration... |
@Kay-Korrodi can you apply the changes in #511 and set the logging level to 'debug'? Best case we log the connection it creates for you. |
I integrated it to https://github.com/teksi/wastewater/releases/tag/2024.0.5 so you can test everything with the latest version directly. |
Documentation see #511 (comment) |
Good Morning my Friends from TEKSI We gave 2024.0.5 a try on our brand new server. i just want to inform you, that we still get the localhost error. Do you think we get a fix in the next time 👍 it is now difficult to make exports, because a lot changed till the last working version... |
Did you create a debug log for us? If no - in the TWW settings, go to "Developer options", set the log level to "Debug" and log to a file |
On request of @Kay-Korrodi , here is the logfile with logging-level I did some digging myself and found out that here the Figuring this might be the reason for the absence of a log of my service definition in the logfile, I hardcoded the name of my service definition as the Attribute That seemed to do the trick - so maybe this should not be |
@taetscher Thank you for the log. I look forward to the working tool 😄 |
@sjib to check with Zermatt whether it is solved or not |
Going through the log of @taetscher I see the following:
Next steps:
|
@taetscher @Kay-Korrodi
Does this work correctly? And this should be logged while exporting to INTERLIS:
I don't see any line that references to pg_service.conf in your log. Did you set that path? |
Thanks for your Message. on 19th Dezember i answered that the pg_service.conf is set. i know at least another company not only Zermatt and Ryser that get this error. And i know all have set the pg_service.conf.... especially because i set it up for that company and when they swap to the old version i use they dont have that error anymore. i am 100% sure that it is the tool and not the setup of our computers.... |
@sjib On startup I get
in the log messages tww-tab On export to INTERLIS I get
as well as This psycopg2 error2025-02-13T12:53:21 WARNING Traceback (most recent call last):
File "{redacted :)}/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\teksi_wastewater_plugin.py", line 630, in actionExportClicked
self.interlisImporterExporter.action_export()
File "{redacted :)}/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\gui\interlis_importer_exporter_gui.py", line 149, in action_export
raise exception
File "{redacted :)}/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\gui\interlis_importer_exporter_gui.py", line 119, in action_export
self.interlis_importer_exporter.interlis_export(
File "{redacted :)}/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\interlis_importer_exporter.py", line 168, in interlis_export
self._check_subclass_counts(limit_to_selection)
File "{redacted :)}/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\interlis_importer_exporter.py", line 488, in _check_subclass_counts
self._check_subclass_count(
File "{redacted :)}/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\interlis_importer_exporter.py", line 563, in _check_subclass_count
with DatabaseUtils.PsycopgConnection() as connection:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "{redacted :)}/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\utils\database_utils.py", line 40, in __enter__
self.connection = psycopg.connect(
^^^^^^^^^^^^^^^^
File "{redacted :)}\AppData\Roaming\Python\Python312\site-packages\psycopg2\__init__.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
psycopg2.OperationalError: connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused (0x0000274D/10061)
Is the server running on that host and accepting TCP/IP connections?
connection to server at "localhost" (::1), port 5432 failed: Connection refused (0x0000274D/10061)
Is the server running on that host and accepting TCP/IP connections? In the python log messages tab. However, the server I am trying to connect to is not running on localhost. Connecting to the remote instance via QGIS and PgAdmin works just fine (using the service-definition), which means the server is reachable by our system. It's just the INTERLIS-Export that seems to get the impression that the connection is pointing to a localhost somehow. Only when i hardcode the same log messages as you do and the export works (taken from the logfile so I didn't have to wait for the export to finish).2025-02-13 12:48:14,558:INFO:plugin_utils:INTEGRITY CHECK wastewater_networkelement subclass data...
2025-02-13 12:48:14,559:INFO:plugin_utils:CONNECTING TO DATABASE...
2025-02-13 12:48:14,560:DEBUG:plugin_utils:PGSYSCONFDIR: {redacted :)}\custom_env_variables_BES\postgres\pg_service.conf
2025-02-13 12:48:14,562:DEBUG:plugin_utils:psycopg dsn: host={redacted :)} port=5432 dbname={redacted :)} user={redacted :)} password=[PASSWORD]
2025-02-13 12:48:14,727:INFO:plugin_utils:Number of wastewater_networkelement datasets: 7857
2025-02-13 12:48:14,747:INFO:plugin_utils:Number of reach datasets: 4959
2025-02-13 12:48:14,765:INFO:plugin_utils:Number of wastewater_node datasets: 2898
2025-02-13 12:48:14,766:INFO:plugin_utils:OK: number of subclass elements of class wastewater_networkelement OK in schema tww_od!
2025-02-13 12:48:14,768:INFO:plugin_utils:INTEGRITY CHECK wastewater_structure subclass data...
... env-var is set, pointing to the directory where my |
@taetscher The plugin ought to load the service from the layer definition of vw_tww_wastewater_structure. Can you verify that there is no (ghost) layer with another datasource in the project? |
@cymed I checked, did not find any "ghost" layer. There are, however, some layers within the project that use different service-defs (getting tables from different databases). |
@taetscher does the additional log in #548 return a postgres layer? |
@cymed No, not as far as I understand. The only lines logged upon opening of the tww QGIS-Project 1 are: 2025-02-19 15:37:03,865:INFO:plugin_utils:TEKSI Wastewater plugin version 0.0.0 started
2025-02-19 15:37:03,868:INFO:plugin_utils:Using QGIS override locale: en_US Footnotes
|
I also tested using the current .qgs file - to no avail. This yielded an interesting error-message (one that I think I saw a couple of times before - sometimes it would show up, sometimes, it wouldn't): ValueError: No Point Geometry found for Node ch19qnvg1kA1FnTa (Type: reach_point)
Traceback (most recent call last):
File "{redacted :)}AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\tools\twwnetwork.py", line 112, in _addVertices
vertex = feat.geometry().asPoint()
^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: Null geometry cannot be converted to a point.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "{redacted :)}AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\teksi_wastewater_plugin.py", line 457, in onLayersAvailable
self.network_analyzer.setNodeLayer(layers["vw_network_node"])
File "{redacted :)}AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\tools\twwnetwork.py", line 94, in setNodeLayer
self.createGraph()
File "{redacted :)}AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\tools\twwnetwork.py", line 219, in createGraph
self._addVertices()
File "{redacted :)}AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\tools\twwnetwork.py", line 114, in _addVertices
raise ValueError(f"No Point Geometry found for Node {obj_id} (Type: {obj_type})")
ValueError: No Point Geometry found for Node ch19qnvg1kA1FnTa (Type: reach_point) What I find rather odd is that: SELECT * FROM tww_od.reach_point
WHERE situation3d_geometry IS NULL
ORDER BY obj_id ASC Yields nothing, there are no reach points that are missing a geometry... I somehow doubt this has anything to do with this issue, though. |
setNodeLayer is fired in the same function that fires loading the connection data from vw_tww_wastewater_structure, so there might be a connection. vw_network_node is a materialized view, so there could be a NULL geometry that's fixed in the meantime |
I see.
Bingo! 2025-02-21T07:54:05 teksi_wastewater:TEKSI Wastewater plugin version 0.0.0 started
2025-02-21T07:54:05 teksi_wastewater.utils.translation:Using QGIS override locale: en_US
2025-02-21T07:54:37 teksi_wastewater:dataprovider of vw_tww_wastewater_structure:
2025-02-21T07:54:37 teksi_wastewater.utils:Checking setup of oid prefix
2025-02-21T07:54:37 teksi_wastewater.utils:PGSYSCONFDIR: {redacted :)}\custom_env_variables_BES\postgres\pg_service.conf
2025-02-21T07:54:37 teksi_wastewater.utils:psycopg dsn: host={redacted :)} port=5432 dbname={redacted :)} user={redacted :)} password=[PASSWORD]
2025-02-21T07:54:37 teksi_wastewater.utils:Checking setup of default_values
2025-02-21T07:54:37 teksi_wastewater.utils:PGSYSCONFDIR: {redacted :)}\custom_env_variables_BES\postgres\pg_service.conf
2025-02-21T07:54:37 teksi_wastewater.utils:psycopg dsn: host={redacted :)} port=5432 dbname={redacted :)} user={redacted :)} password=[PASSWORD]
2025-02-21T07:54:37 teksi_wastewater.utils:Check symbology triggers enabled
2025-02-21T07:54:37 teksi_wastewater.utils:PGSYSCONFDIR: {redacted :)}\custom_env_variables_BES\postgres\pg_service.conf
2025-02-21T07:54:37 teksi_wastewater.utils:psycopg dsn: host={redacted :)} port=5432 dbname={redacted :)} user={redacted :)} password=[PASSWORD] The INTERLIS-Export now also knows where to look for the data. @Kay-Korrodi FYI |
So what is the conclusion of all these findings?
|
My conclusion is to check the tww layers separately from the network views to ensure we get the correct pg_service even if the materialized views have problems. See. #551 |
Describe the bug
On exporting INTERLIS I get the following authentication error
To Reproduce
Exact steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Also with database on server pg_conf setting should be read correctly
Screenshots / data
Ein Fehler trat bei der Ausführung von Python-Code auf:
psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: fe_sendauth: no password supplied
Traceback (most recent call last):
File "C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\teksi_wastewater_plugin.py", line 619, in actionExportClicked
self.interlisImporterExporter.action_export()
File "C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\gui\interlis_importer_exporter_gui.py", line 149, in action_export
raise exception
File "C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\gui\interlis_importer_exporter_gui.py", line 119, in action_export
self.interlis_importer_exporter.interlis_export(
File "C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\interlis_importer_exporter.py", line 168, in interlis_export
self._check_subclass_counts(limit_to_selection)
File "C:\Users/xxxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\interlis_importer_exporter.py", line 488, in _check_subclass_counts
self._check_subclass_count(
File "C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\interlis_importer_exporter.py", line 563, in check_subclass_count
with DatabaseUtils.PsycopgConnection() as connection:
File "C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\utils\database_utils.py", line 39, in enter
self.connection = psycopg.connect(
^^^^^^^^^^^^^^^^
File "C:\Users\xxx\AppData\Roaming\Python\Python312\site-packages\psycopg2_init.py", line 122, in connect
conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
psycopg2.OperationalError: connection to server at "localhost" (::1), port 5432 failed: fe_sendauth: no password supplied
Python-Version: 3.12.4 (main, Jun 10 2024, 12:48:35) [MSC v.1938 64 bit (AMD64)]
QGIS-Version: 3.34.8-Prizren Prizren, 91642333
Python-Pfad:
• C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\generate_swmm_inp
• C:/PROGRA
1/QGIS331.8/apps/qgis-ltr/./python• C:/Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python
• C:/Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
• C:/PROGRA
1/QGIS331.8/apps/qgis-ltr/./python/plugins• C:\PROGRA
1\QGIS331.8\apps\grass\grass83\etc\python• C:\Users\Default\Documents
• C:\Program Files\QGIS 3.34.8\bin\python312.zip
• C:\PROGRA
1\QGIS331.8\apps\Python312\DLLs• C:\PROGRA
1\QGIS331.8\apps\Python312\Lib• C:\Program Files\QGIS 3.34.8\bin
• C:\Users\xxx\AppData\Roaming\Python\Python312\site-packages
• C:\PROGRA
1\QGIS331.8\apps\Python312• C:\PROGRA
1\QGIS331.8\apps\Python312\Lib\site-packages• C:\PROGRA
1\QGIS331.8\apps\Python312\Lib\site-packages\win32• C:\PROGRA
1\QGIS331.8\apps\Python312\Lib\site-packages\win32\lib• C:\PROGRA
1\QGIS331.8\apps\Python312\Lib\site-packages\Pythonwin• C:/Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python
• X:/QGIS/TWW/project-translations
• C:\Users/xxx/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\teksi_wastewater\interlis\gui....
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: