error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure
jtkifa opened this issue · 4 comments
When I do (drakma:http-request "https://ssd.jpl.nasa.gov/horizons_batch.cgi" ) I get the error
error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure
But not for other https sites (eg google, new york times). However, this NASA site is accessible via a browser. Is this an issue in drakma, the site, or cl+ssl?
SOLVED - it seems TLS1.2 support was missing in default SSL library
in cl+ssl/reload.lisp I had to force load of macports openssl library
(cffi:define-foreign-library libssl
(:darwin (:or
"/opt/local/lib/libssl.dylib" ;; this is new - default OSX libssl does not support TLS 1.2?
"libssl.dylib" "/usr/lib/libssl.dylib"))
Hello ,
We have RHEL 7.4 and configured some script that get data from other server through some url and make csv file, Following is the script and i am getting following error as well.
=================
--2018-02-12 11:04:03-- https://xx.xxx.xx.xx:8443/webservice/DataServiceServlet?type=timeValues&UserName=xxxxxx&Password=xxxxxxxxx&numGroups=2&groupType1=Appliance&groupArgument1=s1gz0pc001&groupType2=BusinessGrou
p&groupArgument2=EAD&metrics=TPI,TPO&start=1514750400&end=1517428740&granularity=300&showOnlyValidData=true&skipZeroOrInvalidRows=fa
lse&showGroupPath=false&csv=true
Connecting to XX>XX>XXXX.:8443... connected.
OpenSSL: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure
Script as below.
#!/bin/bash
pd=date '+%d' --date="1 day ago"
pm=date '+%b' --date="1 day ago"
py=date '+%Y' --date="1 day ago"
pday=date '+%a' --date="1 day ago"
cd=date '+%d'
cm=date '+%b'
cy=date '+%Y'
cday=date '+%a'
pdate="$pday $pm $pd 00:00:00 GST $py"
cdate="$cday $cm $cd 00:00:00 GST $cy"
startTime=date --date="$pdate" +%s
endTime=date --date="$cdate" +%s
echo $startTime
echo $endTime
/home/oracle/scripts/reporting_db_scripts/archive
create archive of prvious data and remove data
echo "Generating archive at ..... /home/oracle/scripts/reporting_db_scripts/archive/"$d1-$m-$y.tar.gz
#tar cvfz /home/oracle/scripts/reporting_db_scripts/archive/$d-$m-$y.tar.gz /home/oracle/scripts/reporting_db_scripts/*
#tar cvfz /home/oracle/scripts/reporting_db_scripts/archive/$d-$m-$y.tar.gz /home/oracle/scripts/reporting_db_scripts/* --exclude="/
home/oracle/scripts/reporting_db_scripts/archive"
tar cvfz /offline_archive/reporting_archive/$cd-$cm-$cy.tar.gz /home/oracle/scripts/reporting_db_scripts/*
remove older than 7 days archives
find /offline_archive/reporting_archive/ -name '*.gz' -mtime +7 -exec rm {} ;
remove previous day data, so that current day data can be downloaded
rm -f /home/oracle/scripts/reporting_db_scripts/opnetData/*.csv
INPUT1=/home/oracle/scripts/reporting_db_scripts/entity.txt
OLDIFS=$IFS
IFS="|"
while read srno entityName
do
url="https://xx.xxx.xx.xx:8443/webservice/DataServiceServlet?type=timeValues&UserName=xxxxxxxxxxxxx&Password=rxxxxxxxxxxxxxxxxxxx
alVamwjfU5DgxvHHXY8tnccbgEPyn&numGroups=2&groupType1=Appliance&groupArgument1=s1gz0pc001&groupType2=BusinessGroup&groupArgument2=EAD
&metrics=TPI,TPO&start=1514750400&end=1517428740&granularity=300&showOnlyValidData=true&skipZeroOrInvalidRows=false&showGroupPath=fa
lse&csv=true"
Retrieve csv file for each entity
wget --no-check-certificate --secure-protocol=TLSv1 $url -O /home/oracle/scripts/reporting_db_scripts/opnetData/$entityName.csv
done < $INPUT1
IFS=$OLDIFS
remove the string 'xxxxxx:'
sed -i 's/xxxxx://g' /home/oracle/scripts/reporting_db_scripts/opnetData/*.csv
replace , with |
sed -i 's/,/|/g' /home/oracle/scripts/reporting_db_scripts/opnetData/*.csv
remove the header from each file
sed -i -e '1d' /home/oracle/scripts/reporting_db_scripts/opnetData/*.csv
consolidate data
empty older allEntitiesInOut.csv file
cat /dev/null > /home/oracle/scripts/reporting_db_scripts/sqlldr/allEntitiesInOut.csv
INPUT1=/home/oracle/scripts/reporting_db_scripts/entity.txt
IFS="|"
while read srno entityName
do
echo "Processing . . . . ." $entityName
INPUT2=/home/oracle/scripts/reporting_db_scripts/opnetData/$entityName.csv
while read eName epocTime tIn tOut
do
echo $srno,date -d @$epocTime +"%d-%m-%Y %T"
,$tIn,$tOut,2 >> /home/oracle/scripts/reporting_db_scripts/sqlldr/allEntit
iesInOut.csv
done < $INPUT2
done < $INPUT1
echo "File Processing Completed ......... /home/oracle/scripts/reporting_db_scripts/sqlldr/allEntitiesInOut.csv"
The error is below
OpenSSL: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure
@attiqork I may be wrong, but I don't see any indications of you using Drakma in your scripts. Instead you appear to be using wget
to retrieve data from a remote host. In any case, the problem might be that the used OpenSSL library is not able to deal with the remote TLS handshake.
I am closing this ticket right now. Please let me know if there is Drakma anywhere in your code being used.