Bug 1032599 - Incomplete file transfer on port 8443
Incomplete file transfer on port 8443
Status: CLOSED CURRENTRELEASE
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Mrunal Patel
libra bugs
:
: 1054693 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-20 07:58 EST by Chris Ryan
Modified: 2015-05-14 19:32 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-29 19:50:29 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Chris Ryan 2013-11-20 07:58:58 EST
Description of problem:
Unable to access the full HTML output on port 8443 over https. 

Version-Release number of selected component (if applicable):
devenv_4053 (ami-e1c5e288)

How reproducible:
Always

Steps to Reproduce:
1. Create a php application
   rhc create-app p1 php-5.3
2. Add a phpinfo file to the repo, and git push
   cd p1/php
   touch phpinfo.php
   echo "<?php phpinfo(); ?>" > phpinfo.php
   git commit and git push
3. curl the url of the application
   curl -k -X GET https://p1-testdomain1.dev.rhcloud.com:8443/phpinfo.php
   echo $?

Actual results:
The curl command returns only a partial phpinfo file. The 'echo $?' command returns 18, which is an incomplete file. (CURLE_PARTIAL_FILE (18)
A file transfer was shorter or larger than expected. This happens when the server first reports an expected transfer size, and then delivers data that doesn't match the previously given size. Taken from the libcurl page)

Expected results:
The full output of the page is returned. 

Additional info:

This may be related to these two bugs:
https://bugzilla.redhat.com/show_bug.cgi?id=1020949
https://bugzilla.redhat.com/show_bug.cgi?id=998068
Comment 1 Michal Fojtik 2013-11-20 08:08:16 EST
I'm able to reproduce this error as well on latest devenv:

* About to connect() to p1-mfojtik.dev.rhcloud.com port 8443 (#0)
*   Trying 54.235.7.201...
* Connected to p1-mfojtik.dev.rhcloud.com (54.235.7.201) port 8443 (#0)
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using AES256-GCM-SHA384
* Server certificate:
* 	 subject: C=--; ST=SomeState; L=SomeCity; O=SomeOrganization; OU=SomeOrganizationalUnit; CN=ip-10-38-127-28; emailAddress=root@ip-10-38-127-28
* 	 start date: 2013-11-19 18:28:27 GMT
* 	 expire date: 2014-11-19 18:28:27 GMT
* 	 issuer: C=--; ST=SomeState; L=SomeCity; O=SomeOrganization; OU=SomeOrganizationalUnit; CN=ip-10-38-127-28; emailAddress=root@ip-10-38-127-28
* 	 SSL certificate verify result: self signed certificate (18), continuing anyway.
> GET /phpinfo.php HTTP/1.1
> User-Agent: curl/7.33.0
> Host: p1-mfojtik.dev.rhcloud.com:8443
> Accept: */*
> 
< HTTP/1.1 200 OK
< date: Wed, 20 Nov 2013 13:06:42 GMT
* Server Apache/2.2.15 (Red Hat) is not blacklisted
< server: Apache/2.2.15 (Red Hat)
< connection: close
< transfer-encoding: chunked
< content-type: text/html
< Via: 1.1 p1-mfojtik.dev.rhcloud.com (node-web-proxy/0.4)

### actual content ###


* transfer closed with outstanding read data remaining
* Closing connection 0
* SSLv3, TLS alert, Client hello (1):
curl: (18) transfer closed with outstanding read data remaining
Comment 2 Mrunal Patel 2013-11-21 19:54:00 EST
Waiting for nodejs010-nodejs-ws-0.4.25-8.el6oso to be available in devenv/stg.
Comment 4 Yan Du 2013-11-25 00:50:02 EST
Test on devenv_4067

Issue still can be reproduced.

Steps:
1. Create a php application
   rhc create-app p1 php-5.3
2. Add a phpinfo file to the repo, and git push
   cd p1/php
   touch phpinfo.php
   echo "<?php phpinfo(); ?>" > phpinfo.php
   git commit and git push
3. curl the url of the application

root@openshift-ubuntu:~#  curl -k -X GET https://php1-111.dev.rhcloud.com:8443/phpinfo.php

<h2><a name="module_xsl">xsl</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">XSL </td><td class="v">enabled </td></tr>
<tr><td class="e">libxslt Vercurl: (18) transfer closed with outstanding read data remaining
sion </td><td class="v">
Comment 5 Mrunal Patel 2013-11-25 12:53:25 EST
The backend seems to end the connection prematurely. (Continuing to look into this).
Comment 6 Mrunal Patel 2014-01-20 12:50:59 EST
Unable to reproduce the issue on the latest devenv. Could QE please retest?
Comment 7 Chris Ryan 2014-01-20 13:30:29 EST
I am also unable to reproduce this on the latest devenv (devenv_4244 (ami-11c1f378)). The curl command returns an exit status 0, and the full output of the page is shown. It seems the original issue has been resolved.
Comment 8 Chris Ryan 2014-01-20 13:48:00 EST
After further testing, this still seems to be an issue. Once an app is created, I am able to access the site on port 8443 using https via curl with exit code zero. However, once I visit the browser again, using port 8443 and https, I am receiving an 18 exit code, and an incomplete web page. 

This also occurs with new apps; the error is immediate:

curl: (18) transfer closed with outstanding read data remaining
Comment 10 Mrunal Patel 2014-01-21 14:44:42 EST
*** Bug 1054693 has been marked as a duplicate of this bug. ***
Comment 11 openshift-github-bot 2014-01-21 16:27:21 EST
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/24c67cd91eefa006585e3ffa4462a5a36ca631ca
Bug 1032599: Set the headers on the original request.
Comment 12 chunchen 2014-01-22 03:51:29 EST
It's fixed, verified on devenv_4257, please refer to the following results:

1. Create a php application
   rhc create-app p1 php-5.3
2. Add a phpinfo file to the repo, and git push
   cd p1/php
   touch phpinfo.php
   echo "<?php phpinfo(); ?>" > phpinfo.php
   git commit and git push
3. Curl the url of the application
curl -k -X GET https://p1-cdm.dev.rhcloud.com:8443/phpinfo.php

4. Visit https://p1-cdm.dev.rhcloud.com:8443/phpinfo.php twice via browser

5. Curl the url of the application again

at step 4: visit the app site all successfully
at step 5 & 3:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html><head>
<style type="text/css">
body {background-color: #ffffff; color: #000000;}
body, td, th, h1, h2 {font-family: sans-serif;}
pre {margin: 0px; font-family: monospace;}
a:link {color: #000099; text-decoration: none; background-color: #ffffff;}
a:hover {text-decoration: underline;}
table {border-collapse: collapse;}
.center {text-align: center;}
.center table { margin-left: auto; margin-right: auto; text-align: left;}
.center th { text-align: center !important; }
td, th { border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}
h1 {font-size: 150%;}
h2 {font-size: 125%;}
.p {text-align: left;}
.e {background-color: #ccccff; font-weight: bold; color: #000000;}
.h {background-color: #9999cc; font-weight: bold; color: #000000;}
.v {background-color: #cccccc; color: #000000;}
.vr {background-color: #cccccc; text-align: right; color: #000000;}
img {float: right; border: 0px;}
hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}
</style>
<title>phpinfo()</title><meta name="ROBOTS" content="NOINDEX,NOFOLLOW,NOARCHIVE" /></head>
<body><div class="center">
<table border="0" cellpadding="3" width="600">
<tr class="h"><td>
<h1 class="p">PHP Version 5.3.3</h1>
</td></tr>
</table><br />
<table border="0" cellpadding="3" width="600">
<tr><td class="e">System </td><td class="v">Linux ip-10-180-231-119 2.6.32-431.3.1.el6.x86_64 #1 SMP Fri Dec 13 06:58:20 EST 2013 x86_64 </td></tr>
<tr><td class="e">Build Date </td><td class="v">Dec  5 2013 07:10:10 </td></tr>
<tr><td class="e">Configure Command </td><td class="v"> &#039;./configure&#039;  &#039;--build=x86_64-redhat-linux-gnu&#039; &#039;--host=x86_64-redhat-linux-gnu&#039; &#039;--target=x86_64-redhat-linux-gnu&#039; &#039;--program-prefix=&#039; &#039;--prefix=/usr&#039; &#039;--exec-prefix=/usr&#039; &#039;--bindir=/usr/bin&#039; &#039;--sbindir=/usr/sbin&#039; &#039;--sysconfdir=/etc&#039; &#039;--datadir=/usr/share&#039; &#039;--includedir=/usr/include&#039; &#039;--libdir=/usr/lib64&#039; &#039;--libexecdir=/usr/libexec&#039; &#039;--localstatedir=/var&#039; &#039;--sharedstatedir=/var/lib&#039; &#039;--mandir=/usr/share/man&#039; &#039;--infodir=/usr/share/info&#039; &#039;--cache-file=../config.cache&#039; &#039;--with-libdir=lib64&#039; &#039;--with-config-file-path=/etc&#039; &#039;--with-config-file-scan-dir=/etc/php.d&#039; &#039;--disable-debug&#039; &#039;--with-pic&#039; &#039;--disable-rpath&#039; &#039;--without-pear&#039; &#039;--with-bz2&#039; &#039;--with-exec-dir=/usr/bin&#039; &#039;--with-freetype-dir=/usr&#039; &#039;--with-png-dir=/usr&#039; &#039;--with-xpm-dir=/usr&#039; &#039;--enable-gd-native-ttf&#039; &#039;--without-gdbm&#039; &#039;--with-gettext&#039; &#039;--with-gmp&#039; &#039;--with-iconv&#039; &#039;--with-jpeg-dir=/usr&#039; &#039;--with-openssl&#039; &#039;--with-pcre-regex=/usr&#039; &#039;--with-zlib&#039; &#039;--with-layout=GNU&#039; &#039;--enable-exif&#039; &#039;--enable-ftp&#039; &#039;--enable-magic-quotes&#039; &#039;--enable-sockets&#039; &#039;--enable-sysvsem&#039; &#039;--enable-sysvshm&#039; &#039;--enable-sysvmsg&#039; &#039;--with-kerberos&#039; &#039;--enable-ucd-snmp-hack&#039; &#039;--enable-shmop&#039; &#039;--enable-calendar&#039; &#039;--without-sqlite&#039; &#039;--with-libxml-dir=/usr&#039; &#039;--enable-xml&#039; &#039;--with-system-tzdata&#039; &#039;--with-apxs2=/usr/sbin/apxs&#039; &#039;--without-mysql&#039; &#039;--without-gd&#039; &#039;--disable-dom&#039; &#039;--disable-dba&#039; &#039;--without-unixODBC&#039; &#039;--disable-pdo&#039; &#039;--disable-xmlreader&#039; &#039;--disable-xmlwriter&#039; &#039;--without-sqlite3&#039; &#039;--disable-phar&#039; &#039;--disable-fileinfo&#039; &#039;--disable-json&#039; &#039;--without-pspell&#039; &#039;--disable-wddx&#039; &#039;--without-curl&#039; &#039;--disable-posix&#039; &#039;--disable-sysvmsg&#039; &#039;--disable-sysvshm&#039; &#039;--disable-sysvsem&#039; </td></tr>
<tr><td class="e">Server API </td><td class="v">Apache 2.0 Handler </td></tr>
<tr><td class="e">Virtual Directory Support </td><td class="v">disabled </td></tr>
<tr><td class="e">Configuration File (php.ini) Path </td><td class="v">/etc </td></tr>
<tr><td class="e">Loaded Configuration File </td><td class="v">/var/lib/openshift/52df82521464691832000055/php/configuration/etc/php.ini </td></tr>
<tr><td class="e">Scan this dir for additional .ini files </td><td class="v">/etc/php.d </td></tr>
<tr><td class="e">Additional .ini files parsed </td><td class="v">/etc/php.d/apc.ini,
/etc/php.d/bcmath.ini,
/etc/php.d/curl.ini,
/etc/php.d/dom.ini,
/etc/php.d/fileinfo.ini,
/etc/php.d/gd.ini,
/etc/php.d/imagick.ini,
<------------snip------------>
<h2><a name="module_curl">curl</a></h2>
<table border="0" cellpadding="3" width="600">
<tr><td class="e">cURL support </td><td class="v">enabled </td></tr>
<tr><td class="e">cURL Information </td><td class="v">7.19.7 </td></tr>
<tr><td class="e">Age </td><td class="v">3 </td></tr>
<tr><td class="e">Features </td></tr>
<tr><td class="e">AsynchDNS </td><td class="v">No </td></tr>
<tr><td class="e">Debug </td><td class="v">No </td></tr>
<tr><td class="e">GSS-Negotiate </td><td class="v">Yes </td></tr>
<tr><td class="e">IDN </td><td class="v">Yes </td></tr>
<tr><td class="e">IPv6 </td><td class="v">Yes </td></tr>
<tr><td class="e">Largefile </td><td class="v">Yes </td></tr>
<tr><td class="e">NTLM </td><td class="v">Yes </td></tr>
<tr><td class="e">SPNEGO </td><td class="v">No </td></tr>
<tr><td class="e">SSL </td><td class="v">Yes </td></tr>
<tr><td class="e">SSPI </td><td class="v">No </td></tr>
<tr><td class="e">krb4 </td><td class="v">No </td></tr>
<tr><td class="e">libz </td><td class="v">Yes </td></tr>
<tr><td class="e">CharConv </td><td class="v">No </td></tr>
<tr><td class="e">Protocols </td><td class="v">tftp, ftp, telnet, dict, ldap, ldaps, http, file, https, ftps, scp, sftp </td></tr>
<------------snip------------>
<tr><td class="e">_ENV["OPENSHIFT_APP_NAME"]</td><td class="v">p1</td></tr>
<tr><td class="e">_ENV["TMP"]</td><td class="v">/tmp/</td></tr>
<tr><td class="e">_ENV["OPENSHIFT_DATA_DIR"]</td><td class="v">/var/lib/openshift/52df82521464691832000055/app-root/data/</td></tr>
<tr><td class="e">_ENV["OPENSHIFT_NAMESPACE"]</td><td class="v">cdm</td></tr>
<tr><td class="e">_ENV["OPENSHIFT_AUTO_DEPLOY"]</td><td class="v">true</td></tr>
<tr><td class="e">_ENV["OPENSHIFT_GEAR_UUID"]</td><td class="v">52df82521464691832000055</td></tr>
<tr><td class="e">_ENV["OPENSHIFT_BROKER_HOST"]</td><td class="v">localhost</td></tr>
<tr><td class="e">_ENV["OPENSHIFT_APP_UUID"]</td><td class="v">52df82521464691832000055</td></tr>
<tr><td class="e">_ENV["OPENSHIFT_UMASK"]</td><td class="v">077</td></tr>
<tr><td class="e">_ENV["OPENSHIFT_CARTRIDGE_SDK_RUBY"]</td><td class="v">/usr/lib/openshift/cartridge_sdk/ruby/sdk.rb</td></tr>
<tr><td class="e">_ENV["HISTFILE"]</td><td class="v">/var/lib/openshift/52df82521464691832000055/app-root/data/.bash_history</td></tr>
<tr><td class="e">_ENV["OPENSHIFT_PHP_IP"]</td><td class="v">127.1.245.129</td></tr>
<tr><td class="e">_ENV["_"]</td><td class="v">/usr/sbin/httpd</td></tr>
</table><br />
<h2>PHP License</h2>
<table border="0" cellpadding="3" width="600">
<tr class="v"><td>
<p>
This program is free software; you can redistribute it and/or modify it under the terms of the PHP License as published by the PHP Group and included in the distribution in the file:  LICENSE
</p>
<p>This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
</p>
<p>If you did not receive a copy of the PHP license, or have any questions about PHP licensing, please contact license@php.net.
</p>
</td></tr>
</table><br />
</div></body></html>

Note You need to log in before you can comment on or make changes to this bug.