Bug 56397 - PostgreSQL connection fails on Windows
Summary: PostgreSQL connection fails on Windows
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.6.2.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Lionel Elie Mamane
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-25 15:00 UTC by Emanuele Gissi
Modified: 2013-06-24 10:45 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot (45.67 KB, image/jpeg)
2012-10-29 11:39 UTC, Emanuele Gissi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emanuele Gissi 2012-10-25 15:00:03 UTC
Problem description: 

Steps to reproduce:
1. Open Base
2. Connect to an existing database
3. Choose PostgreSQL
4. Insert DB URL:
dbname=library-management hostaddr=192.168.5.7 port=5432
5. Insert username and password
6. Click on "Test connection"

Current behavior:

A dialog appears: "Connection test, connection impossible" (I read it in Italian)

I tested exactly the same connection from Libreoffice 3.5.4.2 in Xubuntu 12.04: everything works well.

I can connect from PgAdmin3 in Windows XP.
I tried to set postgresql-sdbc config file to "PQ_LOGLEVEL=INFO" but I could not find any log file.

Expected behavior:

Libreoffice 3.6.2.2 in Windows should connect as well.

Platform (if different from the browser): 

In Windows XP it does not work. In Xubuntu Linux it works well.
Comment 1 Lionel Elie Mamane 2012-10-25 15:47:43 UTC
(In reply to comment #0)

> A dialog appears: "Connection test, connection impossible" (I read it in
> Italian)

Do you have a "more information" button in this dialog? Click that button and in the new dialog that appears, click each message on the left part, and paste each of those messages (appearing on the right part) here.

> I tested exactly the same connection from Libreoffice 3.5.4.2 in Xubuntu
> 12.04: everything works well.

You didn't test LibreOffice 3.6.x in GNU/Linux?

> I can connect from PgAdmin3 in Windows XP.
> I tried to set postgresql-sdbc config file to "PQ_LOGLEVEL=INFO" but I could
> not find any log file.

sdbc-pqsql.log in the program directory; make sure you have write permissions to it. The directory is something like "c:\program files\LibreOffice 3.6\program"
Comment 2 Emanuele Gissi 2012-10-26 06:52:57 UTC
Hi Lionel, thank you for your fast reply.

1) There is no "more information" button in the connection test dialog.

2) I did not test LO 3.6 in Linux, I am using the version distributed by
Xubuntu.
If this can be useful, i will try to do that on a virtual machine. Do you
confirm it is useful?

3) I searched that file in the whole C: drive. No sdbc-pqsql.log was
created.
How can I try again?

Best regards,
Emanuele Gissi

On Thu, Oct 25, 2012 at 5:47 PM, <bugzilla-daemon@freedesktop.org> wrote:

>  Lionel Elie Mamane <lionel@mamane.lu> changed bug 56397<https://bugs.freedesktop.org/show_bug.cgi?id=56397>
>  What Removed Added  CC   lionel@mamane.lu
>
>  ------------------------------
> You are receiving this mail because:
>
>    - You reported the bug.
>
>
Comment 3 Emanuele Gissi 2012-10-26 10:17:26 UTC
I tested Libreoffice 3.5.6.2 in Windows and it does not work as well.
Emanuele
Comment 4 Lionel Elie Mamane 2012-10-26 15:06:20 UTC
(In reply to comment #2)

> 1) There is no "more information" button in the connection test dialog.

I tried again and the button is called only "More". You don't have a "More" button? It is not in the "connection test dialog", but on the dialog that appears with the error message.

Please copy/paste the *whole* error message, or a screen shot showing the whole error message.

If you can switch your LibreOffice to English for this, that would be great, else I'll try to guesstimate the Italian.

> 2) I did not test LO 3.6 in Linux, I am using the version distributed by
> Xubuntu.
> If this can be useful, i will try to do that on a virtual machine. Do you
> confirm it is useful?

You can use on Xubuntu the LibreOffice 3.6 downloaded from www.libreoffice.org; that would be a valid test. The question I was trying to get at "is this bug only on Windows or on all platforms"?

You can install the LibreOffice provided by Xubuntu and the one downloaded from www.libreoffice.org at the same time, just make sure to run the www.libreoffice.org one as /opt/libreoffice3.6/program/soffice so that you get this one and not the Xubuntu one.

> 3) I searched that file in the whole C: drive. No sdbc-pqsql.log was
> created.
> How can I try again?

Make sure you have write permission to "c:\program files\LibreOffice 3.6\program"

I'm trying to see *what* is different on you side that it does not work. What is the PostgreSQL server version? Are you using anything unusual like Kerberos, LDAP integration, ...?
Comment 5 Lionel Elie Mamane 2012-10-26 15:23:10 UTC
Installed 3.6.2.2 on Windows, works for me, as well as multiple versions on GNU/Linux, as well as 3.6.0.4 on Windows.

Maybe your password contains any non-ASCII characters and those are treated differently on Windows and GNU/Linux? Try changing the password to something purely ASCII, and see if it still does not work.
Comment 6 Emanuele Gissi 2012-10-26 16:34:58 UTC
No no-ascii char. "!" is ascii, isn't it?
But I'll try strictly with [a...z] chars.
I'll report later. (I am a fire officer, we are having a flood now ;-)
Thank you, Emanuele

On 10/26/12, bugzilla-daemon@freedesktop.org
<bugzilla-daemon@freedesktop.org> wrote:
> https://bugs.freedesktop.org/show_bug.cgi?id=56397
>
> --- Comment #5 from Lionel Elie Mamane <lionel@mamane.lu> ---
> Installed 3.6.2.2 on Windows, works for me, as well as multiple versions on
> GNU/Linux, as well as 3.6.0.4 on Windows.
>
> Maybe your password contains any non-ASCII characters and those are treated
> differently on Windows and GNU/Linux? Try changing the password to
> something
> purely ASCII, and see if it still does not work.
>
> --
> You are receiving this mail because:
> You reported the bug.
>
Comment 7 Emanuele Gissi 2012-10-28 19:35:35 UTC
Sorry for not replying earlier. I can test what you asked tomorrow at work.
Many thanks, till tomorrow...
Emanuele
Comment 8 Emanuele Gissi 2012-10-29 11:39:42 UTC
Created attachment 69222 [details]
Screenshot
Comment 9 Emanuele Gissi 2012-10-29 11:41:01 UTC
This morning I tried to install Libreoffice 3.6.2.2 on a different Windows computer on the same network. Everything worked ok. The connection to the Postgresql database was correctly established.

This makes me think that the problem is due to the fact that the problematic Windows is running on a vbox virtual machine.

What still I do not understand is: why does PgAdmin 1.16 on the virtual machine works and Libreoffice 3.6.2.2 does not? Don't they both use the same libpq? Do they use a different version on the lib?

I confirm that the error box that appears after the configuration test dialog does not contain any "more" button. I attach a screenshot.

I confirm that no sdbc-pqsql.log was created. I checked my privileges on the directory by directly creating an empty file.

How can I give you more details?
Thanks a lot for your kind support.
Emanuele
Comment 10 Lionel Elie Mamane 2012-10-29 13:21:54 UTC
(In reply to comment #9)
> I confirm that the error box that appears after the configuration test
> dialog does not contain any "more" button. I attach a screenshot.

Hmm... I looked at the code and the exact error message you get (and the absence of a "More" button) seems to mean that the error does not come from the PostgreSQL-SDBC driver, but from the upper layers. Maybe something like:

1) You have an old version of PostgreSQL-SDBC installed
   (as an extension rather than the "new" optional install
    that is part of LibreOffice proper)
   Remove it, restart LibreOffice and try again

2) You don't have PostgreSQL-SDBC installed at all?
   Rerun the setup program and check it is selected.
   I don't think it is that, because then usually the error message
   says something like "no driver for this SDBC URL"

3)

> This morning I tried to install Libreoffice 3.6.2.2 on a different Windows
> computer on the same network. Everything worked ok.

> This makes me think that the problem is due to the fact that the problematic
> Windows is running on a vbox virtual machine.

That's also how I use it... and works for me. That vbox has network access to 192.168.5.7, right?

Is the "other Windows computer" running another version of Windows?

> What still I do not understand is: why does PgAdmin 1.16 on the virtual
> machine works and Libreoffice 3.6.2.2 does not? Don't they both use the same
> libpq? Do they use a different version on the lib?

I don't know what version of the lib PgAdmin uses; LibreOffice uses 9.1.1.

> I confirm that no sdbc-pqsql.log was created. I checked my privileges on the
> directory by directly creating an empty file.

This is consistent with the error happening before PostgreSQL-SDBC is even invoked... The problem is elsewhere :-(

Maybe our libpq is compiled in some way that makes it incompatible with older versions of Windows? I'm just guessing at this point.
Comment 11 Emanuele Gissi 2012-10-31 10:09:10 UTC
No cue for now. Still investigating.
Comment 12 Lionel Elie Mamane 2013-06-24 10:45:15 UTC
In the absence of information for a long time, closing the bug. Reopen if you can reproduce.