DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 12th February 2017
nyg nyg is offline
Port Guard
 
Join Date: Jan 2017
Posts: 14
Default Building jdk/1.8 stuck during ftp fetch

Hello,

I'm trying to compile the jdk-1.8 with the with_ipv6 flavor but it's stuck here:

Code:
===> py-crypto-2.6.1p2 depends on: python->=2.7,<2.8 -> python-2.7.12
===> py-crypto-2.6.1p2 depends on: gmp-* - not found
===>  Verifying install for gmp-* in devel/gmp
===>  Checking files for gmp-5.0.2p3
>> Fetch ftp://ftp.gmplib.org/pub/gmp-5.0.2/gmp-5.0.2.tar.bz2
OpenBSD is running inside VirtualBox so I'm thinking there's kind of network issue. Strange thing is that:

Code:
curl ftp://ftp.cc.uoc.gr/mirrors/OpenBSD/ftplist
works, but

Code:
curl ftp://ftp.gmplib.org/pub/gmp-5.0.2/gmp-5.0.2.tar.bz2 -o output
doesn't. It does on the host OS however.

How can I debug this?

EDIT:

Code:
# curl -v ftp://ftp.gmplib.org/pub/gmp-5.0.2/gmp-5.0.2.tar.bz2 -o output 
*   Trying 130.242.124.102...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to ftp.gmplib.org (130.242.124.102) port 21 (#0)
< 220-GMP ftp server
< 220 Only anonymous FTP is allowed here
> USER anonymous
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0< 230-
< 230-GMP -- GNU Multiple Precision Arithmetic Library
< 230-
< 230->>>  This is an intensionally throttled ftp server.                 <<<
< 230->>>  For faster and less tamper-prone file download, please go to:  <<<
< 230->>>                                                                 <<<
< 230->>>                  https://gmplib.org/download/                   <<<
< 230-
< 230-On this server:
< 230-  pub                  -- GMP releases, signature files
< 230-  pub/gmp-[VERSION]    -- GMP release [VERSION]
< 230-  pub/gmp              -- All GMP releases
< 230-  pub/snapshot         -- GMP daily snapshots
< 230-
< 230-For more info about GMP, see https://gmplib.org/
< 230-
< 230 Anonymous user logged in
> PWD
< 257 "/" is your current location
* Entry path is '/'
> CWD pub
* ftp_perform ends with SECONDARY: 0
< 250 OK. Current directory is /pub
> CWD gmp-5.0.2
< 250 OK. Current directory is /pub/gmp-5.0.2
> EPSV
* Connect data stream passively
  0     0    0     0    0     0      0      0 --:--:--  0:00:02 --:--:--     0< 229 Extended Passive mode OK (|||57345|)
*   Trying 130.242.124.102...
* Connecting to 130.242.124.102 (130.242.124.102) port 57345
* Connected to ftp.gmplib.org (130.242.124.102) port 21 (#0)
> TYPE I
  0     0    0     0    0     0      0      0 --:--:--  0:00:36 --:--:--     0

Thanks!

Last edited by nyg; 12th February 2017 at 09:29 PM.
Reply With Quote
  #2   (View Single Post)  
Old 12th February 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Quote:
Originally Posted by nyg View Post
How can I debug this?
While "hung" fetching the distribution file, from another terminal, you can inspect the network and TCP session status with a variety of tools. Three that come to mind immediately are ifconfig(8), netstat(8) and tcpdump(8).

The ports build infrastructure -- as described in the bsd.port.mk(5) man page -- uses $FETCH_CMD to obtain distribution files. This defaults to ftp(1), not the net/curl application you are using for your tests.

Last edited by jggimi; 12th February 2017 at 07:18 PM. Reason: a smidgen of additional clarity
Reply With Quote
  #3   (View Single Post)  
Old 12th February 2017
nyg nyg is offline
Port Guard
 
Join Date: Jan 2017
Posts: 14
Default

tcpdump only gives me current ssh and ntp packets. While netstat shows me this:

Code:
Active Internet connections (including servers)
Proto   Recv-Q Send-Q  Local Address          Foreign Address        (state)
tcp      16384      0  10.0.2.15.19093        130.242.124.102.49296  ESTABLISHED
tcp          0      0  10.0.2.15.38476        130.242.124.102.21     ESTABLISHED
I've tried to get the file with ftp but it also gets stuck. Maybe it's a problem with the ftp server itself because previous uses worked correctly:

Code:
# cat jdk.logs | grep Fetch
...
>> Fetch ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz
...
Reply With Quote
  #4   (View Single Post)  
Old 12th February 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

I'll guess that the problem occurs when you fetch by FTP protocol, rather than by HTTP. FTP is an ancient protocol that predates TCP/IP, and may be an issue for your virtual machine's network passage.

The ftp(1) utility I mentioned above is also used with more modern HTTP and HTTPS protocols, though it retains its original name.

While devel/libffi/Makefile has the FTP protocol hard-coded in its $MASTER_SITES URL variable, that variable will also include alternate sources. You could try to fetch the distfile manually (with ftp() or your preferred net/curl tool) using an alternate URL that does not require FTP.
Code:
$ cd /usr/ports/devel/libffi
$ make show=MASTER_SITES
ftp://sourceware.org/pub/libffi/ https://ftp.openbsd.org/pub/OpenBSD/distfiles// ftp://ftp.usa.openbsd.org/pub/OpenBSD/distfiles// https://ftp.fr.openbsd.org/pub/OpenBSD/distfiles//
$
Reply With Quote
  #5   (View Single Post)  
Old 12th February 2017
nyg nyg is offline
Port Guard
 
Join Date: Jan 2017
Posts: 14
Default

I think you misunderstood the output of my last command: libffi is fetched correctly over ftp while gmp-5.0.2 is not. Here's a more complete version, jdk.logs being the output produced by make install.

Code:
# cat jdk.logs | grep Fetch 
...
>> Fetch http://downloads.sourceforge.net/sourceforge/infozip/unzip60.tar.gz
...
>> Fetch https://github.com/apple/cups/releases/download/release-2.1.4/cups-2.1.4-source.tar.gz
...
>> Fetch ftp://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz # worked
...
>> Fetch ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.38.tar.gz # worked
...
>> Fetch ftp://ftp.gmplib.org/pub/gmp-5.0.2/gmp-5.0.2.tar.bz2 # not working
Reply With Quote
  #6   (View Single Post)  
Old 12th February 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

My advice remains unchanged in light of your correction. If there is a fetch which is hanging, try one of the alternatives available in $MASTER_SITES.

In the event that advice fails, obtain all needed distfiles at your host, and transfer them to the guest via local network or via disk image.
Reply With Quote
  #7   (View Single Post)  
Old 12th February 2017
nyg nyg is offline
Port Guard
 
Join Date: Jan 2017
Posts: 14
Default

Hmm, I tried what you proposed and downloaded the file from an alternative site and then kill the stuck ftp process half hoping that it would continue and use the file I downloaded but... the build process tried all by itself to download the file using the next alternative site!

Code:
===> py-crypto-2.6.1p2 depends on: python->=2.7,<2.8 -> python-2.7.12
===> py-crypto-2.6.1p2 depends on: gmp-* - not found
===>  Verifying install for gmp-* in devel/gmp
===>  Checking files for gmp-5.0.2p3
>> Fetch ftp://ftp.gmplib.org/pub/gmp-5.0.2/gmp-5.0.2.tar.bz2
Killed 
>> Fetch http://ftpmirror.gnu.org/gmp/gmp-5.0.2.tar.bz2
gmp-5.0.2.tar.bz2 100% |********************************|  1977 KB    00:08    
>> (SHA256) gmp-5.0.2.tar.bz2: OK
I simply found the process id using ps -A | grep ftp...


Once more, thanks for your help!
Reply With Quote
  #8   (View Single Post)  
Old 12th February 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

It's not clear what the problem actually is, but I'm glad you've found a circumvention that appears to be working.

Good luck building java. You will need a metric ton of disk space.
Reply With Quote
  #9   (View Single Post)  
Old 12th February 2017
nyg nyg is offline
Port Guard
 
Join Date: Jan 2017
Posts: 14
Default

Quote:
Originally Posted by jggimi View Post
It's not clear what the problem actually is, but I'm glad you've found a circumvention that appears to be working.

Good luck building java. You will need a metric ton of disk space.
Thanks, the build should terminate successfully but on my personal server the resultant JDK still couldn't listen on IPv6 addresses. So I'll surely be back with another question.
Reply With Quote
Old 12th February 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

I likely won't be able to answer it. I am not a Java programmer, and never have been.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Laptop lid close = stuck akts OpenBSD General 3 12th October 2017 02:31 PM
ThinkPad key stuck LeFrettchen General Hardware 0 26th July 2015 12:43 PM
Experts: We're stuck with passwords – and maybe they're best J65nko News 1 17th January 2012 03:08 AM
FreeBSD 7.2@amd64 atheros problem ath0: stuck beacon; resetting (bmiss count 4) asmo FreeBSD General 0 6th June 2009 11:02 AM
apache: data stuck in socket? goertzenator FreeBSD General 8 16th February 2009 04:01 PM


All times are GMT. The time now is 03:21 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick