Bug#976059: Migrate to udd-mirror.debian.net hostname

2020-11-29 Thread Asheesh Laroia
Happy that we've reached a satisfying conclusion! I've been a little
worried about the migration, so that really helps.

Great to hear your kind words about the UDD mirror! :D



Bug#976059: Migrate to udd-mirror.debian.net hostname

2020-11-29 Thread Andreas Tille
Hi Asheesh,

thanks a lot for your quick and helpful response.  Meanwhile I've read
the Wiki about the public UDD mirror.  This has mentioned that for
"older" psql versions the old method needs to be used.  I wanted to stay
on the save side and reverted to the old method but the new mirror /
user / password settings.  This helped and while not beeing as elegant
ist might work more reliably on different systems.

I'll keep your fixes in mind and your analysis is correcht:

$ echo $PGPORT
5452

which I have set on my local machine which I've used.

Thanks a lot for maintaining the UDD mirror which is really helpful

 Andreas.

On Sun, Nov 29, 2020 at 04:51:16PM -0500, Asheesh Laroia wrote:
> On Sun, Nov 29, 2020 at 3:10 PM Andreas Tille  wrote:
> >
> > Hi Asheesh,
> >
> > I admit I applied your patch while beeing on a very poor connection and
> > I thought this would be the reason for a failure.  But now beeing behind
> > a normal connection I get:
> >
> > LC_ALL=C psql postgresql://udd-mirror:udd-mir...@udd-mirror.debian.net/udd 
> > -t udd -c "select version from packages where package = 'abacas' ; "
> > psql: error: could not connect to server: Connection timed out
> > Is the server running on host "udd-mirror.debian.net" 
> > (147.75.35.146) and accepting
> > TCP/IP connections on port 5452?
> >
> > Is this a temporary issue or is something wrong with the query?
> 
> Sorry for the trouble! I think the problem is that you're connecting
> to this server on a non-standard postgres port number.
> 
> The issue appears to be that UDD itself is on port 5452 [1], but
> postgres's default is 5432 [2]. I'm not sure what causes your script
> to use port 5452 -- perhaps the PGPORT variable is being used?
> 
> The simplest approach might be to add the port number to the URL. The
> cleanest approach (IMHO) is to only use the PGPORT= environment
> variable in the case that you're using real UDD, and/or to use a URL
> to access real UDD.
> 
> FWIW, I can reproduce the timeout with these commands.
> 
> $ LC_ALL=C psql
> postgresql://udd-mirror:udd-mir...@udd-mirror.debian.net:5452/udd -t
> udd -c "select version from packages where package = 'abacas' ; "
> 
> $ PGPORT=5452 LC_ALL=C psql
> postgresql://udd-mirror:udd-mir...@udd-mirror.debian.net/udd -t udd -c
> "select version from packages where package = 'abacas' ; "
> 
> When I try these commands, there's no timeout:
> 
> $ LC_ALL=C psql
> postgresql://udd-mirror:udd-mir...@udd-mirror.debian.net:5432/udd -t
> udd -c "select version from packages where package = 'abacas' ; "
> 
> $ PGPORT=5452 LC_ALL=C psql
> postgresql://udd-mirror:udd-mir...@udd-mirror.debian.net:5432/udd -t
> udd -c "select version from packages where package = 'abacas' ; "
> 
> Given all that, the simplest approach would probably be to add the
> port number (5432) to the script.
> 
> Happy to give further advice or chat more. I'm open to reconfiguring
> udd-mirror to listen on port 5452 if that ends up being the best
> approach.
> 
> Asheesh.
> 
> 1. https://wiki.debian.org/UltimateDebianDatabase/
> 
> 2. 
> https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=postgres
> 

-- 
http://fam-tille.de



Bug#976059: Migrate to udd-mirror.debian.net hostname

2020-11-29 Thread Asheesh Laroia
On Sun, Nov 29, 2020 at 3:10 PM Andreas Tille  wrote:
>
> Hi Asheesh,
>
> I admit I applied your patch while beeing on a very poor connection and
> I thought this would be the reason for a failure.  But now beeing behind
> a normal connection I get:
>
> LC_ALL=C psql postgresql://udd-mirror:udd-mir...@udd-mirror.debian.net/udd -t 
> udd -c "select version from packages where package = 'abacas' ; "
> psql: error: could not connect to server: Connection timed out
> Is the server running on host "udd-mirror.debian.net" (147.75.35.146) 
> and accepting
> TCP/IP connections on port 5452?
>
> Is this a temporary issue or is something wrong with the query?

Sorry for the trouble! I think the problem is that you're connecting
to this server on a non-standard postgres port number.

The issue appears to be that UDD itself is on port 5452 [1], but
postgres's default is 5432 [2]. I'm not sure what causes your script
to use port 5452 -- perhaps the PGPORT variable is being used?

The simplest approach might be to add the port number to the URL. The
cleanest approach (IMHO) is to only use the PGPORT= environment
variable in the case that you're using real UDD, and/or to use a URL
to access real UDD.

FWIW, I can reproduce the timeout with these commands.

$ LC_ALL=C psql
postgresql://udd-mirror:udd-mir...@udd-mirror.debian.net:5452/udd -t
udd -c "select version from packages where package = 'abacas' ; "

$ PGPORT=5452 LC_ALL=C psql
postgresql://udd-mirror:udd-mir...@udd-mirror.debian.net/udd -t udd -c
"select version from packages where package = 'abacas' ; "

When I try these commands, there's no timeout:

$ LC_ALL=C psql
postgresql://udd-mirror:udd-mir...@udd-mirror.debian.net:5432/udd -t
udd -c "select version from packages where package = 'abacas' ; "

$ PGPORT=5452 LC_ALL=C psql
postgresql://udd-mirror:udd-mir...@udd-mirror.debian.net:5432/udd -t
udd -c "select version from packages where package = 'abacas' ; "

Given all that, the simplest approach would probably be to add the
port number (5432) to the script.

Happy to give further advice or chat more. I'm open to reconfiguring
udd-mirror to listen on port 5452 if that ends up being the best
approach.

Asheesh.

1. https://wiki.debian.org/UltimateDebianDatabase/

2. 
https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=postgres



Bug#976059: Migrate to udd-mirror.debian.net hostname

2020-11-29 Thread Andreas Tille
Hi Asheesh,

I admit I applied your patch while beeing on a very poor connection and
I thought this would be the reason for a failure.  But now beeing behind
a normal connection I get:

LC_ALL=C psql postgresql://udd-mirror:udd-mir...@udd-mirror.debian.net/udd -t 
udd -c "select version from packages where package = 'abacas' ; "
psql: error: could not connect to server: Connection timed out
Is the server running on host "udd-mirror.debian.net" (147.75.35.146) 
and accepting
TCP/IP connections on port 5452?

Is this a temporary issue or is something wrong with the query?

Kind regards

 Andreas.


On Sun, Nov 29, 2020 at 01:02:37AM -0500, Asheesh Laroia wrote:
> Package: dh-r
> Version: 20201117
> X-Debbugs-CC: mat...@debian.org
> 
> Hi there!
> 
> I looked through Debian for mentions of the
> public-udd-mirror.xvm.mit.edu hostname, which Mattias and I are
> deprecating in favor of udd-mirror.debian.net. See also
> https://lists.debian.org/debian-qa/2020/11/msg00011.html
> 
> I discovered it in dh-r via this search:
> https://codesearch.debian.net/search?q=public-udd-mirror
> 
> For many years, both hostnames have worked. We now expect the old
> hostname to stop working eventually.
> 
> I'm attaching a patch, which I have tested by manually running psql
> with similar flags as how the script would run it:
> 
> $ psql postgresql://udd-mirror:udd-mir...@udd-mirror.debian.net/udd -t
> udd -c "select version from new_packages where package =
> 'libnest2d-dev' ;"
>  0.4-26-g4d6fb4d-1
> 
> This matches what I see at https://ftp-master.debian.org/new.html .
> 
> In the patch, I chose to use a postgresql:// URL to specify how to
> access the mirror. In my opinion, this improves clarity
> by avoiding the need for the PGPASSWORD environment variable.
> 
> There's some chance the patch is mangled; if so, I apologize. The
> intent should be reasonably clear.
> 
> Best regards,
> 
> Asheesh.


> ___
> R-pkg-team mailing list
> r-pkg-t...@alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/r-pkg-team


-- 
http://fam-tille.de



Bug#976059: Migrate to udd-mirror.debian.net hostname

2020-11-28 Thread Asheesh Laroia
Package: dh-r
Version: 20201117
X-Debbugs-CC: mat...@debian.org

Hi there!

I looked through Debian for mentions of the
public-udd-mirror.xvm.mit.edu hostname, which Mattias and I are
deprecating in favor of udd-mirror.debian.net. See also
https://lists.debian.org/debian-qa/2020/11/msg00011.html

I discovered it in dh-r via this search:
https://codesearch.debian.net/search?q=public-udd-mirror

For many years, both hostnames have worked. We now expect the old
hostname to stop working eventually.

I'm attaching a patch, which I have tested by manually running psql
with similar flags as how the script would run it:

$ psql postgresql://udd-mirror:udd-mir...@udd-mirror.debian.net/udd -t
udd -c "select version from new_packages where package =
'libnest2d-dev' ;"
 0.4-26-g4d6fb4d-1

This matches what I see at https://ftp-master.debian.org/new.html .

In the patch, I chose to use a postgresql:// URL to specify how to
access the mirror. In my opinion, this improves clarity
by avoiding the need for the PGPASSWORD environment variable.

There's some chance the patch is mangled; if so, I apologize. The
intent should be reasonably clear.

Best regards,

Asheesh.


dh-r.patch
Description: Binary data