Oracle Database Backup Service Configuration – java.net.UnknownHostException

In all the trials in the Oracle cloud in the past, I used the same syntax below to configure the Oracle Database Backup Service on my local servers. Last week I have decided to order the Service via shop.oracle.com. Now I am an official owner of an Oracle cloud account with a CSI :-). But back to my problem, after my account was created I got the mail with the configuration details. So far so good. Then I tried to configure the OPC package as always:

oracle@bern:/u00/app/oracle/stage/ [ORCL] java -jar opc_install.jar -serviceName <my-storage> -identityDomain <my-identitydomain> -opcId '<my-username>'  -opcPass '<my-password>' -walletDir $ORACLE_BASE/opc_wallet -libDir $ORACLE_HOME/lib -configFile $ORACLE_BASE/admin/ORCL/opc_config/opcORCL.ora
Oracle Database Cloud Backup Module Install Tool, build 2016-02-04
java.net.UnknownHostException: <my-identitydomain>.storage.oraclecloud.com
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:178)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
        at java.net.Socket.connect(Socket.java:579)
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:625)
        at sun.security.ssl.BaseSSLSocketImpl.connect(BaseSSLSocketImpl.java:160)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)
        at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:275)
        at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:371)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:933)
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1301)
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
        at oracle.backup.opc.install.OpcConfig.testConnection(OpcConfig.java:235)
        at oracle.backup.opc.install.OpcConfig.doOpcConfig(OpcConfig.java:204)
        at oracle.backup.opc.install.OpcConfig.main(OpcConfig.java:197)
Could not authenticate to Oracle Database Cloud Backup Module

The installer didn’t found the hostname where my backup location should be located. I tried to verify if the REST endpoint URL was available, it was ok:

storage_test_api

The output from the installer file without any parameter shows me no additional information:

oracle@bern:/u00/app/oracle/stage/ [ORCL] java -jar opc_install.jar
Oracle Database Cloud Backup Module Install Tool, build 2016-02-04
No arguments supplied
Usage: java -jar opc_install.jar
        -serviceName:    OPC Service Name
        -identityDomain: OPC Identity Domain
        -opcId:          OPC Username
        -opcPass:        OPC Password
        -walletDir:      Directory to store wallet
        -configFile:     File name of config file
        -libDir:         Directory to store library
        -libPlatform:    Platform of library to download
        -proxyHost:      HTTP proxy host
        -proxyPort:      HTTP proxy port
        -proxyId:        HTTP proxy username, if needed
        -proxyPass:      HTTP proxy password, if needed
        -container:      OPC container to store backups

In the extracted opc_installer.jar file is a Java class file called OpcConfig.class. I used JD-GUI, a small Java decompiler, to take a look insight the Java class file. And at line 90 I found a new parameter which was not listed above – the -host.

opc_class

So why not try to install opc_installer.jar again and add this -host parameter?

oracle@bern:/u00/app/oracle/stage/ [ORCL] java -jar opc_install.jar -serviceName <my-storage> -identityDomain <my-identitydomain> -opcId '<my-username>'  -opcPass '<my-password>' -walletDir $ORACLE_BASE/opc_wallet -libDir $ORACLE_HOME/lib -configFile $ORACLE_BASE/admin/ORCL/opc_config/opcORCL.ora -host https://storage-<my-identitydomain>.storage.oraclecloud.com/v1/storage-<my-identitydomain>
Oracle Database Cloud Backup Module Install Tool, build 2016-02-04
Oracle Database Cloud Backup Module credentials are valid.
Oracle Database Cloud Backup Module wallet created in directory /u00/app/oracle/opc_wallet.
Oracle Database Cloud Backup Module initialization file /u00/app/oracle/admin/ORCL/opc_config/opcORCL.ora created.
Downloading Oracle Database Cloud Backup Module Software Library from file opc_linux64.zip.
Downloaded 26933594 bytes in 14 seconds. Transfer rate was 1923828 bytes/second.
Download complete.

Et voilà – the Oracle Database Backup Service is now configured and ready to use. Time to start RMAN 🙂