Hello Team,
I got the below error. I tried So many things which were failed to do things good. If you have any knowledge to rectify this error, please inform the references or commands to use.
fatal: [192.168.1.223]: FAILED! => {“changed”: false, “failed”: true, “msg”: “Failed to find handler for "/usr/bin/jdk-8u112-linux-x64.tar.gz". Make sure the required command to extract the file is installed. Command "/usr/bin/unzip" could not handle archive. Command "/usr/bin/gtar" could not handle archive.”}
to retry, use: --limit @/root/balu/ans_playbooks/install_java.retry
Thanks in advance.
Hi Balu,
If you did something like this:
wget http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz
then you've downloaded the html page saying you have to accept the OTN license terms.
Can you check the filesize of the downloaded file?
If your file is 100+MB then verify its checksum:
https://www.oracle.com/webfolder/s/digest/8u112checksum.html
To get the archive, try this method:
http://stackoverflow.com/questions/10268583/downloading-java-jdk-on-linux-via-wget-is-shown-license-page-instead#10959815
Cheers,
Marko
Yes, That link is fine. But When I used the wget it gave error
fatal: [192.168.1.223]: FAILED! => {“changed”: true, “cmd”: [“wget”, “–no-check-certificate”, “-c”, “–header”, “Cookie: oraclelicense=accept-securebackup-cookie”, “http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz”], “delta”: “0:02:26.744175”, “end”: “2016-12-09 10:36:58.731695”, “failed”: true, “rc”: 4, “start”: “2016-12-09 10:34:31.987520”, “stderr”: “–2016-12-09 10:34:31-- http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz\nResolving download.oracle.com (download.oracle.com)… 23.215.132.129, 23.215.132.163\nConnecting to download.oracle.com (download.oracle.com)|23.215.132.129|:80… connected.\nHTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.\nRetrying.\n\n–2016-12-09 10:34:33-- (try: 2) http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz\nConnecting to download.oracle.com (download.oracle.com)|23.215.132.129|:80… connected.\nHTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.\nRetrying.\n\n–2016-12-09 10:34:35-- (try: 3) http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz\nConnecting to download.oracle.com (download.oracle.com)|23.215.132.129|:80… connected.\nHTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.\nRetrying.\n\n–2016-12-09 10:34:38-- (try: 4) http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz\nConnecting to download.oracle.com (download.oracle.com)|23.215.132.129|:80… connected.\nHTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.\nRetrying.\n\n–2016-12-09 10:34:42-- (try: 5) http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz\nConnecting to download.oracle.com (download.oracle.com)|23.215.132.129|:80… connected.\nHTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.\nRetrying.\n\n–2016-12-09 10:34:47-- (try: 6) http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz\nConnecting to download.oracle.com (download.oracle.com)|23.215.132.129|:80… connected.\nHTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.\nRetrying.\n\n–2016-12-09 10:34:53-- (try: 7) http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz\nConnecting to download.oracle.com (download.oracle.com)|23.215.132.129|:80… connected.\nHTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.\nRetrying.\n\n–2016-12-09 10:35:00-- (try: 8) http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz\nConnecting to download.oracle.com (download.oracle.com)|23.215.132.129|:80… connected.\nHTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.\nRetrying.\n\n–2016-12-09 10:35:08-- (try: 9) http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz\nConnecting to download.oracle.com (download.oracle.com)|23.215.132.129|:80… connected.\nHTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.\nRetrying.\n\n–2016-12-09 10:35:17-- (try:10) http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz\nConnecting to download.oracle.com (download.oracle.com)|23.215.132.129|:80… connected.\nHTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.\nRetrying.\n\n–2016-12-09 10:35:27-- (try:11) http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz\nConnecting to download.oracle.com (download.oracle.com)|23.215.132.129|:80… connected.\nHTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.\nRetrying.\n\n–2016-12-09 10:35:37-- (try:12) http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz\nConnecting to download.oracle.com (download.oracle.com)|23.215.132.129|:80… connected.\nHTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.\nRetrying.\n\n–2016-12-09 10:35:48-- (try:13) http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz\nConnecting to download.oracle.com (download.oracle.com)|23.215.132.129|:80… connected.\nHTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.\nRetrying.\n\n–2016-12-09 10:35:58-- (try:14) http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz\nConnecting to download.oracle.com (download.oracle.com)|23.215.132.129|:80… connected.\nHTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.\nRetrying.\n\n–2016-12-09 10:36:08-- (try:15) http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz\nConnecting to download.oracle.com (download.oracle.com)|23.215.132.129|:80… connected.\nHTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.\nRetrying.\n\n–2016-12-09 10:36:18-- (try:16) http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz\nConnecting to download.oracle.com (download.oracle.com)|23.215.132.129|:80… connected.\nHTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.\nRetrying.\n\n–2016-12-09 10:36:28-- (try:17) http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz\nConnecting to download.oracle.com (download.oracle.com)|23.215.132.129|:80… connected.\nHTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.\nRetrying.\n\n–2016-12-09 10:36:38-- (try:18) http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz\nConnecting to download.oracle.com (download.oracle.com)|23.215.132.129|:80… connected.\nHTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.\nRetrying.\n\n–2016-12-09 10:36:48-- (try:19) http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz\nConnecting to download.oracle.com (download.oracle.com)|23.215.132.129|:80… connected.\nHTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.\nRetrying.\n\n–2016-12-09 10:36:58-- (try:20) http://download.oracle.com/otn-pub/java/jdk/8u112-b15/jdk-8u112-linux-x64.tar.gz\nConnecting to download.oracle.com (download.oracle.com)|23.215.132.129|:80… connected.\nHTTP request sent, awaiting response… Read error (Connection reset by peer) in headers.\nGiving up.”, “stdout”: “”, “stdout_lines”: [], “warnings”: [“Consider using get_url or uri module rather than running wget”]}
The connection from the Oracle server refused. So how to over come this in the ansible. Normally wget works fine. But in Ansible playbook, I got this error.
It's not looking very much like an Ansible problem from where I'm sat.
Do you have e.g. a proxy environment variable set in your shell
running wget that you haven't set in the
ansible task?
Actually, I do not have set any proxy environment variable in my Linux environment. By using unarchive module in the Ansible playbook it shows the below error.
fatal: [192.168.1.223]: FAILED! => {“changed”: false, “failed”: true, “msg”: “Failed to find handler for "/usr/bin/jdk-8u112-linux-x64.tar.gz". Make sure the required command to extract the file is installed. Command "/usr/bin/unzip" could not handle archive. Command "/usr/bin/gtar" could not handle archive.”}
to retry, use: --limit @/root/balu/ans_playbooks/install_java.retry
this is my playbook. Please consider.
Ansible Couldn’t handle archive error. Please help me to resolve.
Thank you
Hello Stankovic and Marko,
How to accept the OTN in ansible? Is there any documentation or references available for that? If available, Please suggest me to reach.
Thank you.
Hello Stankovi and Marko
Is there any docs or references available that how to accept the OTN of oracle java? If available, Please suggest me and give those links to me.
Thank you in advance.
Hi Balu,
Looking at the log you provided, you're using the right way for accepting the OTN license.
According to this comment:
http://tecadmin.net/install-oracle-java-8-jdk-8-ubuntu-via-ppa/#comment-1998
...the error may be related to timeout.
Try using --timeout=20 option for wget (or more than 20 if still getting the same error).
Cheers,
Marko