{"id":219,"date":"2008-08-22T11:15:43","date_gmt":"2008-08-22T16:15:43","guid":{"rendered":"http:\/\/www.dannorris.com\/?p=219"},"modified":"2019-04-01T13:58:13","modified_gmt":"2019-04-01T13:58:13","slug":"corrupt-download-caused-installation-to-hang-unzip-lessons-learned","status":"publish","type":"post","link":"https:\/\/www.dannorris.com\/blog\/2008\/08\/22\/corrupt-download-caused-installation-to-hang-unzip-lessons-learned\/","title":{"rendered":"Corrupt download caused installation to hang, unzip lessons learned"},"content":{"rendered":"<p>\t\t\t\tI&#8217;m posting this because apparently it hasn&#8217;t happened to anyone else except me (heavens knows I searched for help!). The root cause certainly wasn&#8217;t obvious to me, so hopefully, this will help someone (maybe me, once I forget about it).<\/p>\n<p>All I needed to do was install a default Oracle Database 11g R1 environment with a starter database for some experimentation. Seems simple.<\/p>\n<p>I had archived a copy of <a href=\"http:\/\/www.oracle.com\/technology\/software\/products\/database\/oracle11g\/111060_linuxsoft.html\">linux_11gR1_database.zip<\/a> from <a href=\"http:\/\/otn.oracle.com\/\">OTN<\/a>, so I copied that to my <a href=\"http:\/\/www.oracle.com\/technology\/tech\/linux\/index.html\">Oracle Enterprise Linux<\/a> 5 U1 virtual machine and unzipped it (no errors or warnings, mind you). I proceeded to launch the installer as the oracle user and it ran me through the 4-6 screens of questions, prerequisite checks, etc, then the summary screen and started installing. The progress bar on the first task (copying files or similar) quickly progressed to 38% and then stopped&#8230;forever (I waited an hour).<!--more--><\/p>\n<p>So, I checked logfiles&#8230;nothing. Checked CPU, memory, disk activity&#8230;system (VM) was completely idle. So, I killed it and relaunched. Ran through the same screens, but this time once the progress meter started, I ran strace against the installer process (attached when progress was around 20%). Once it got to 38% again, I waited a little bit to ensure it was once again &#8220;stuck&#8221; and then stopped strace to review the log&#8230;nothing different at the start when compared to the end&#8211;all looked fine.<\/p>\n<p>On a complete swag (sorry <a href=\"http:\/\/www.battleagainstanyguess.com\/\">BAAG<\/a>!), I found another copy of the linux_11gR1_database.zip file on one of the fileservers at the office (original one was from my laptop) and copied it in to the VM. I proceeded to unzip it, then follow the same exact steps to launch the installer, answer the questions, and proceed to the installation. It worked fine.<\/p>\n<p>Now I need to know why these two were different. As many of you probably know, the unzip utility&#8217;s default behavior is to scroll a list of extracted files as it extracts them. This means there&#8217;s a ton of output (over 2900 lines) scrolling by faster than you can read them. This is the normal behavior and most people, like me, just enter the command and then check back in a few minutes to see the end of the output. In this case, I need to know if there was some error reported part way through the extraction. So, I unzipped it again, but redirected output to a logfile for review (<code>unzip linux_11gR1_database.zip &gt; logfile.txt 2&gt;&amp;1<\/code>). Reviewing that for the word &#8220;error&#8221; showed that several files (more than 8) were not decompressed properly due to some error condition. Further investigation of the unzip command syntax showed that the &#8220;<code>-q<\/code>&#8221; flag will provide &#8220;quiet&#8221; output. I tried this and found that the &#8220;<code>-q<\/code>&#8221; option does silence the normal verbose list of files shown by default, but still displays the error messages that would have been helpful to me.<\/p>\n<p>Just for kicks, I tried unzipping the &#8220;bad&#8221; .zip file on my Mac (by double-clicking it which launches the Archiver utility) and it progressed about half way through and then threw an error and refused to continue.<\/p>\n<p>The moral of the story is that from now on, I&#8217;ll always use &#8220;<code>alias unzip='unzip -q'<\/code>&#8221; to ensure I see the errors without all the noise. It also makes you realize that OUI is not just a single binary, but is comprised of many libraries and files, so just because it launches doesn&#8217;t mean it has all the necessary files to complete its tasks.<\/p>\n<p>Good news: I figured it out. Bad news: I lost too much time figuring it out. Happy Friday!\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m posting this because apparently it hasn&#8217;t happened to anyone else except me (heavens knows I searched for help!). The root cause certainly wasn&#8217;t obvious to me, so hopefully, this will help someone (maybe me, once I forget about it). All I needed to do was install a default Oracle Database 11g R1 environment with &hellip; <a href=\"https:\/\/www.dannorris.com\/blog\/2008\/08\/22\/corrupt-download-caused-installation-to-hang-unzip-lessons-learned\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Corrupt download caused installation to hang, unzip lessons learned&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,7,15,35,22],"tags":[39,93,102,156,223],"class_list":["post-219","post","type-post","status-publish","format-standard","hentry","category-database","category-general","category-oracle","category-oracle-db-11g","category-technical","tag-11gr1","tag-hang","tag-installation","tag-oui","tag-unzip"],"_links":{"self":[{"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/posts\/219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/comments?post=219"}],"version-history":[{"count":1,"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/posts\/219\/revisions"}],"predecessor-version":[{"id":528,"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/posts\/219\/revisions\/528"}],"wp:attachment":[{"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/media?parent=219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/categories?post=219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dannorris.com\/blog\/wp-json\/wp\/v2\/tags?post=219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}