From: | Igor Sosa Mayor <joseleopoldo1792(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Problem with pl/python procedure connecting to the internet |
Date: | 2015-08-23 16:51:33 |
Message-ID: | 87k2smc5ii.fsf@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Charles Clavadetscher" <clavadetscher(at)swisspug(dot)org> writes:
>> Yes, exactly the same code. Exactly the same query: two consoles, one with
>> postgres, other with ipython. Postgres gives the error; ipython works.
>
> Somehow I expected that answer. I am not a python expert, but it happens
> that different pieces of code at the end do not use the same libraries or
> framework code by configuration. But if you are positive on that, no more
> discussion.
Well, I put the same code... what exactly python does is another
question...
> Sorry for asking obvious things, but it happened to me to oversee some of
> them in the past: Are you making the calls from the same computer?
obvious things are often the most important ones. But: yes, this is all
the time my laptop. And I did not change the config of postgres since I
put the configurations I mentioned in my first email.
> So it looks like a timeout problem with a confusing error message.
> A possible way to follow this up would be to call another webservice from a
> python function in PG and see if it behaves the same.
I had the same idea... but a small script querying the IMDB database
works perfectly in the console, but gives an error in PG. THe error is
not so obvious like in the geocoder case, but in any case the movie data
are not loaded.
> Another way to analyze the problem could be to sniff the network traffic and
> see what really happens when you make the function call. This could help at
> least to discard network problems and may lead to some useful
> information.
GOod idea. I see wireshark changed a lot since the last time I used
it... if I'm using it the right way, the thing is pointing in the
direction I thought: there is NO CONNECTION from PG to the internet when
I use the function. I dont see any packages. From the python console
there is a connection to nominatim (openstreetmap).
I think there is exactly the problem: PG does not make any attempt (or
it does but it fails even before any package is being sent) to the
internet.
THnaks for your ideas and help.
--
:: Igor Sosa Mayor :: joseleopoldo1792(at)gmail(dot)com ::
:: GnuPG: 0x1C1E2890 :: http://www.gnupg.org/ ::
:: jabberid: rogorido :: ::
From | Date | Subject | |
---|---|---|---|
Next Message | Igor Sosa Mayor | 2015-08-23 16:53:57 | Re: Problem with pl/python procedure connecting to the internet |
Previous Message | Adrian Klaver | 2015-08-23 15:28:54 | Re: Problem with pl/python procedure connecting to the internet |