Thinking Out Loud

February 29, 2020

Try, Try, And Try Again

Filed under: shell scripting,Vagrant — mdinh @ 2:12 am

I hope you don’t judge a post by its title.

Working with vagrant build and experiencing periodic timed out.

    default: ******************************************************************************
    default: Unzip database software. Sat Feb 29 00:34:50 UTC 2020
    default: ******************************************************************************
    default: ‘/vagrant_software/LINUX.X64_193000_db_home.zip’ -> ‘./LINUX.X64_193000_db_home.zip’
    default: cp: error reading ‘/vagrant_software/LINUX.X64_193000_db_home.zip’: Protocol error
    default: cp: failed to extend ‘./LINUX.X64_193000_db_home.zip’: Protocol error
    default: 1
    default:
    default: real       0m3.468s
    default: user       0m0.000s
    default: sys        0m0.558s
    default: unzip:  cannot find or open LINUX.X64_193000_db_home.zip, LINUX.X64_193000_db_home.zip.zip or LINUX.X64_193000_db_home.zip.ZIP.
    default: 9
    default:
    default: real       0m0.006s
    default: user       0m0.001s
    default: sys        0m0.001s
    default: 0
    default:
    default: real       0m0.001s
    default: user       0m0.000s
    default: sys        0m0.001s
    default: ******************************************************************************
    default: Do database software-only installation. Sat Feb 29 00:34:54 UTC 2020
    default: ******************************************************************************
    default: /vagrant/scripts/oracle_db_software_installation.sh: line 15: /u01/app/oracle/product/19.0.0/dbhome_1/runInstaller: No such file or directory
    default: ******************************************************************************

I have probably brought this upon myself since I Create Windows Symlinks to Vagrant Software Folder

However, issue is that it works from GI and not DB software is what agitates me.

Enough of the rant and there is the resolution.

The while loop will repeat the last command until successful.

echo "******************************************************************************"
echo "Unzip database software." `date`
echo "******************************************************************************"

time cp -fv /vagrant_software/${DB_SOFTWARE} ${ORACLE_BASE}
while [ $? -ne 0 ] ; do fc -s ; done
time unzip -oq ${ORACLE_BASE}/${DB_SOFTWARE} -d ${ORACLE_HOME}
while [ $? -ne 0 ] ; do fc -s ; done
time rm -fv ${ORACLE_BASE}/${DB_SOFTWARE}
while [ $? -ne 0 ] ; do fc -s ; done

Somehow, just magically works.

    default: ******************************************************************************
    default: Unzip database software. Sat Feb 29 01:57:23 UTC 2020
    default: ******************************************************************************
    default: ‘/vagrant_software/LINUX.X64_193000_db_home.zip’ -> ‘/u01/app/oracle/LINUX.X64_193000_db_home.zip’
    default:
    default: real       0m11.455s
    default: user       0m0.008s
    default: sys        0m1.409s
    default:
    default: real       1m50.354s
    default: user       0m46.963s
    default: sys        0m8.285s
    default: removed ‘/u01/app/oracle/LINUX.X64_193000_db_home.zip’
    default:
    default: real       0m0.133s
    default: user       0m0.000s
    default: sys        0m0.128s
    default: ******************************************************************************
    default: Do database software-only installation. Sat Feb 29 01:59:25 UTC 2020
    default: ******************************************************************************
    default: Launching Oracle Database Setup Wizard...

Back to work!

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a free website or blog at WordPress.com.

%d bloggers like this: