bugGNU Octave - Bugs: bug #50268, get_forge_pkg: could not read URL

 
 

bug #50268: get_forge_pkg: could not read URL

Submitter:  Michele <michele31415>
Submitted:  Thu 09 Feb 2017 09:33:40 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Wont Fix Assigned to:  None
Originator Name:  michele31415 Open/Closed:  * Closed
Release:  * 4.2.1 Operating System:  * Microsoft Windows
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 14 Aug 2017 04:27:26 PM UTC, comment #21: 

A note has already been added on the wiki, if someone wants to document this elsewhere or expand on that, and optionally point to this closed issue, that might help. Closing as won't fix.

Mike Miller <mtmiller>
Group Member
Wed 01 Mar 2017 06:59:37 PM UTC, comment #20: 

I don't think we want to go backwards on secure access to downloading Forge packages.

Maybe it should be documented on the wiki that it is a known issue that https access does not work on Windows XP, and therefore pkg install -forge will not work on Windows XP. Workaround is to download package files using a modern browser / TLS stack and install them in Octave from local files.

Mike Miller <mtmiller>
Group Member
Wed 01 Mar 2017 06:31:32 PM UTC, comment #19: 

I am also running 32-bit Windows XP.  This doesn't seem like much of an Octave issue.  It is upstream with very old operating systems and the Microsoft TLS stack.  I would be tempted to close this bug again since I don't think there's much we can do on the Octave front.  Trying to decode the error from the curl library and pinpoint it to an operating system/website mismatch seems difficult, and I would rather have volunteers tackling bigger issues in Octave than this one.

One possibility--and this is a question for those who manage Octave Forge rather than Octave Core--would be to have just regulary http access for Forge packages.  The code is public so we don't strictly need SSL access.  If a person is worried about man-in-the-middle attacks they should be checking the hashes and signatures of the package anyways.

Rik <rik5>
Group administrator
Wed 01 Mar 2017 05:07:00 PM UTC, comment #18: 

ok. sounds like enough evidence to point to it being an XP incompatibility.

Is there a fix that can be included in Octave? A set of workarounds that can be provided in documentation to users on XP? Or do we simply have to provide a 'certain functions are no longer compatible with XP' message?

Nicholas Jankowski <nrjank>
Group Member
Wed 01 Mar 2017 05:03:07 PM UTC, comment #17: 

"Michele,
which version of Windows are you running?"

XP Home SP3 with all MS updates applied.  The machine is an Asus EeePC laptop with a 1.6 GHz. Atom N270

Michele <michele31415>
Wed 01 Mar 2017 04:16:11 PM UTC, comment #16: 
Nicholas Jankowski <nrjank>
Group Member
Wed 01 Mar 2017 03:52:01 PM UTC, comment #15: 

If I was reading it correctly, it looks like WinXP doesn't support some of the newer certificates, and way around it was to install some intermediate certs.

I just installed XP in a VM on my machine and have issues viewing a number of websites using Internet explorer 6.0


John Donoghue <lostbard>
Group Member
Wed 01 Mar 2017 02:26:30 PM UTC, comment #14: 

so far both confirmed cases are 32 bit... Rik, zip or exe installer? Michele, which version of Windows are you running?

John, I didn't really follow the curl discussion. Some seemed to focus on unincluded certificates in the cert store? Does it make sense that this would only affect either 32bit installs or certain Windows versions? I thought the fix pushed with the 4.2.1 MXE builds was supposed to fix the SSL issue. It did here at least.

Nicholas Jankowski <nrjank>
Group Member
Wed 01 Mar 2017 11:20:07 AM UTC, comment #13: 

Doing a quick look around, it looks like it is this issue https://github.com/curl/curl/issues/267

John Donoghue <lostbard>
Group Member
Wed 01 Mar 2017 05:38:15 AM UTC, comment #12: 

"Michele, what version are you using? Which installer did you use, zip or executable? 32 or 64 bit?"

4.2.1, 32 bit executable

Michele <michele31415>
Wed 01 Mar 2017 02:09:17 AM UTC, comment #11: 

Michele, what version are you using? Which installer did you use, zip or executable? 32 or 64 bit?

Nicholas Jankowski <nrjank>
Group Member
Wed 01 Mar 2017 01:27:50 AM UTC, comment #10: 

Re-opening this bug.  I can confirm this at the command line in a Windows XP 32-bit virtual machine.

Trying to read from the original address shows that it has been "temporarily" redirected to an https address (SSL).  However, trying to read that new SSL address results in some very scary error with the version of curl that is shipped with Octave 4.2.1.


C:\Octave\Octave-4.2.1\bin>curl "http://packages.octave.org/list_packages.php"
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>307 Temporary Redirect</title>
</head><body>
<h1>Temporary Redirect</h1>
<p>The document has moved <a href="https://octave.sourceforge.io/list_packages.php">here</a>.</p>
</body></html>

C:\Octave\Octave-4.2.1\bin>curl "https://octave.sourceforge.io/list_packages.php"
curl: (35) schannel: next InitializeSecurityContext failed: SEC_E_ILLEGAL_MESSAGE (0x80090326) - This error usually occurs when a fatal SSL/TLS alert is received (e.g. handshake failed). More detail may be available in the Windows System event log.


Since this is only a problem on Windows, I'm adding John D. to the CC list.  He handles issues with MXE which we use to cross-build Octave for windows.  Looking in the log for the keyword curl I see


changeset:   4316:485c6d42ee42
user:        John D
date:        Wed Jan 04 08:32:24 2017 -0500
summary:     * src/curl.mk: update to 7.52.1

changeset:   4302:3d168da55e47
user:        John D
date:        Fri Dec 30 21:28:46 2016 -0500
summary:     disable instakll of docs

changeset:   4259:c5723e39a80e
user:        John D
date:        Tue Dec 13 10:48:19 2016 -0500
summary:     * src/curl.mk: update to v7.51.0

changeset:   4248:64063cd35eb2
user:        John D
date:        Tue Nov 15 20:18:19 2016 -0500
summary:     curl: enable winssl if compiling for windows

changeset:   4207:8a01ad4817a1
user:        John D
date:        Sun Sep 04 10:05:39 2016 -0400
summary:     curl: disable openssl check

changeset:   4167:892b4258cb8b
user:        John Donoghue
date:        Tue Jul 05 13:36:55 2016 -0400
summary:     curl: update to 7.49.1


Maybe winssl isn't as good as openssl (cset 4248)?


Rik <rik5>
Group administrator
Wed 01 Mar 2017 12:43:44 AM UTC, comment #9: 

"This will discard the actual text, ok will be true or false indicating whether the fetch succeeded, and errmsg should contain a string from the curl library list of error codes."

>> [~, ok, errmsg] = urlread ("http://packages.octave.org/list>


ok = 0
errmsg = SSL connect error

>>


That's odd.  But connecting to that URL directly in Firefox works OK.

Michele <michele31415>
Tue 28 Feb 2017 09:59:04 PM UTC, comment #8: 

Try


[~, ok, errmsg] = urlread ("http://packages.octave.org/list_packages.php")


This will discard the actual text, ok will be true or false indicating whether the fetch succeeded, and errmsg should contain a string from the curl library list of error codes. If the message is not helpful, you may be able to reproduce this with the curl executable if it is included in the distribution.

Mike Miller <mtmiller>
Group Member
Tue 28 Feb 2017 09:56:24 PM UTC, comment #7: 

Hmm.  Well then I suppose this could be a firewall issue.  Could someone tell me what URL it's trying to read?  Or at least what domain?

Michele <michele31415>
Tue 28 Feb 2017 09:51:10 PM UTC, comment #6: 

I just ran the same command and it worked. Well, at least it downloaded and tried to install the parallel package. install failed.

OS: Windows 7, 64bit


>>  ver
----------------------------------------------------------------------
GNU Octave Version: 4.2.1
GNU Octave License: GNU General Public License
Operating System: MINGW32_NT-6.1 Windows 7 Service Pack 1 x86_64
----------------------------------------------------------------------
<snip>



>> pkg install -forge parallel
configure: error: required system functions not found
checking for mkoctfile... C:/Octave/OCTAVE~1.1/bin/mkoctfile-4.2.1.exe
checking for octave-config... C:/Octave/OCTAVE~1.1/bin/octave-config-4.2.1.exe
checking for a sed that does not truncate output... /usr/bin/sed
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ -std=gnu++11 accepts -g... yes
checking for g++ -std=gnu++11 option to enable C++11 features... none needed
checking how to run the C++ preprocessor... g++ -std=gnu++11 -E
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... -std=gnu11
checking how to run the C preprocessor... gcc -std=gnu11 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking gnutls/gnutls.h usability... yes
checking gnutls/gnutls.h presence... yes
checking for gnutls/gnutls.h... yes
checking for gnutls_global_init in -lgnutls... yes
checking for pkg-config... pkg-config
checking for gnutls_global_init_extra in -lgnutls-extra... no
checking sys/socket.h usability... no
checking sys/socket.h presence... no
checking for sys/socket.h... no
checking winsock2.h usability... yes
checking winsock2.h presence... yes
checking for winsock2.h... yes
checking for socket in -lws2_32... yes
checking arpa/inet.h usability... no
checking arpa/inet.h presence... no
checking for arpa/inet.h... no
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking sys/malloc.h usability... no
checking sys/malloc.h presence... no
checking for sys/malloc.h... no
checking netdb.h usability... no
checking netdb.h presence... no
checking for netdb.h... no
checking netinet/in.h usability... no
checking netinet/in.h presence... no
checking for netinet/in.h... no
checking stdio_ext.h usability... no
checking stdio_ext.h presence... no
checking for stdio_ext.h... no
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking termios.h usability... no
checking termios.h presence... no
checking for termios.h... no
checking for unistd.h... (cached) yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for int32_t... yes
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking for uint32_t... yes
checking for error_at_line... no
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... no
checking for vfork... no
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking return type of signal handlers... void
checking for memset... yes
checking for mkdir... yes
checking for modf... yes
checking for select... yes
checking for strchr... yes
checking for strdup... yes
checking for uname... no

pkg: error running the configure script for parallel.
error: called from
    configure_make at line 78 column 9
    install at line 192 column 7
    pkg at line 394 column 9


but the parallel package file did appear in the working directory. and I haven't had any other trouble downloading package files with ver 4.2.1

Nicholas Jankowski <nrjank>
Group Member
Tue 28 Feb 2017 08:25:19 PM UTC, comment #5: 

Thanks, but I still get the same error:

>> version

ans = 4.2.1

>> pkg install -forge parallel


error: get_forge_pkg: could not read URL, please verify internet
 connection
error: called from
    get_forge_pkg at line 66 column 7
    get_forge_download at line 26 column 12
    pkg at line 382 column 29

>> pkg install -forge instrument-control

error: get_forge_pkg: could not read URL, please verify internet
 connection
error: called from
    get_forge_pkg at line 66 column 7
    get_forge_download at line 26 column 12
    pkg at line 382 column 29

>>

Michele <michele31415>
Mon 27 Feb 2017 06:29:05 PM UTC, comment #4: 

just adding that pkg update and pkg -forge functionality is restored on Windows in the just released 4.2.1

Nicholas Jankowski <nrjank>
Group Member
Mon 13 Feb 2017 06:37:39 PM UTC, comment #3: 

and I noticed that, when working with a proxy, environment variable https_proxy must be set following the transition to https, http_proxy only is not sufficient (it is sufficient for wget, not for curl).

A.R. Burgers <arb>
Fri 10 Feb 2017 12:22:25 PM UTC, comment #2: 

Also note that this bug affects 4.2.0 for Windows, because it was not built with Windows native ssl support, and Octave Forge was transitioned to https somewhat recently. A newer build of Octave (either 4.2.0 rebuilt by someone with new build rules, or a future 4.2.1 release) will need to be used to download Octave Forge packages over https.

Mike Miller <mtmiller>
Group Member
Fri 10 Feb 2017 04:19:41 AM UTC, comment #1: 

Version 4.0.0 is deprecated and no longer supported.  Try using the latest stable version 4.2.0 available at https://www.gnu.org/software/octave/#install.

Rik <rik5>
Group administrator
Thu 09 Feb 2017 09:33:40 PM UTC, original submission:  

While trying to load a package, I get this error, despite the fact that I am in fact connected to the Internet:

>> pkg install -forge parallel

error: get_forge_pkg: could not read URL, please verify internet
 connection
error: called from
    get_forge_pkg at line 77 column 7
    get_forge_download at line 26 column 12
    pkg at line 393 column 29

>>

Michele <michele31415>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by nrjank (Posted a comment)
  • -email is unavailable- added by arb (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by michele31415 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-08-14 mtmiller StatusConfirmed Wont Fix
        Open/ClosedOpen Closed
    2017-03-01 rik5 StatusWont Fix Confirmed
        Open/ClosedClosed Open
        Release4.0.0 4.2.1
        Carbon-Copy- Added lostbard
    2017-02-10 rik5 StatusNone Wont Fix
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code