Search Postgresql Archives

Re: Problem with pl/python procedure connecting to the internet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Charles Clavadetscher" <clavadetscher@xxxxxxxxxxxx> 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@xxxxxxxxx ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::



-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux