trying to update geoip gets error -21 - It has been working until recently - geoip

I have been downloading the geoip lite database for a long time. However, something has changed somewhere that is causing an error -21. This is the verbose output:
sudo geoipupdate -v
Opened License file /etc/GeoIP.conf
Read in license key 000000000000
number of product ids 2
Connecting to MaxMind GeoIP server
via Host or Proxy Server: updates.maxmind.com:80
sending request GET /app/update_getfilename?product_id=506 HTTP/1.0
Host: updates.maxmind.com
database product id 506 database file name /usr/share/GeoIP/GeoLiteCountry.dat
/usr/share/GeoIP/GeoLiteCountry.dat can't be opened, proceeding to download database
MD5 sum of database /usr/share/GeoIP/GeoLiteCountry.dat is 0000000000000000000000000000000
Connecting to MaxMind GeoIP Update server
sending request GET /app/update_getipaddr HTTP/1.0
Host: updates.maxmind.com
client ip address: 162.230.29.192
md5sum of ip address and license key is b2e7d4d48d92ec691a3f67b6d861e1bb
sending request GET /app/update_secure?db_md5=0000000000000000000000000000000&challenge_md5=b2e7d4d48d92ec691a3f67b6d861e1bb&user_id=999999&edition_id=506 HTTP/1.0
Host: updates.maxmind.com
Downloading gzipped GeoIP Database...
Done
Updating /usr/share/GeoIP/GeoLiteCountry.dat
Saving gzip file to /usr/share/GeoIP/GeoLiteCountry.dat.gz ... download data to a gz file named /usr/share/GeoIP/GeoLiteCountry.dat.gz
Done
Uncompressing gzip file ... Done
Performing sanity checks ... Database type is 1
database_info FAIL null
Received Error -21 (Sanity check database_info string failed) when attempting to update GeoIP Database
Connecting to MaxMind GeoIP server
via Host or Proxy Server: updates.maxmind.com:80
sending request GET /app/update_getfilename?product_id=533 HTTP/1.0
Host: updates.maxmind.com
database product id 533 database file name /usr/share/GeoIP/GeoLiteCity.dat
/usr/share/GeoIP/GeoLiteCity.dat can't be opened, proceeding to download database
MD5 sum of database /usr/share/GeoIP/GeoLiteCity.dat is 0000000000000000000000000000000
md5sum of ip address and license key is b2e7d4d48d92ec691a3f67b6d861e1bb
sending request GET /app/update_secure?db_md5=0000000000000000000000000000000&challenge_md5=b2e7d4d48d92ec691a3f67b6d861e1bb&user_id=999999&edition_id=533 HTTP/1.0
Host: updates.maxmind.com
Downloading gzipped GeoIP Database...
Done
Updating /usr/share/GeoIP/GeoLiteCity.dat
Saving gzip file to /usr/share/GeoIP/GeoLiteCity.dat.gz ... download data to a gz file named /usr/share/GeoIP/GeoLiteCity.dat.gz
Done
Uncompressing gzip file ... Done
Performing sanity checks ... Database type is 1
database_info FAIL null
Received Error -21 (Sanity check database_info string failed) when attempting to update GeoIP Database
It is not clear to me if the dat files are not downloading (each gets that "can't be opened") message which may be normal. Or if there is something going on with the unzip that causes the update to fail the sanity check. Can someone help me figure this out? TIA.

GeoLite Legacy has been discontinued. The error given by your version of geoipupdate does not seem particularly useful. Newer versions of geoipupdate say 404 Not Found: Database edition not found.

Related

CURLE_UNSUPPORTED_PROTOCOL - ftp download fails

i use cURL (installed via vcpkg). Also openssl installed via vcpkg for a c++ project on VS 2019.
The problem:
CURLE_UNSUPPORTED_PROTOCOL = curl_easy_perform(curl);
I used this example:
https://curl.haxx.se/libcurl/c/ftpsget.html
with corrected connection and file data. The FTP server is filezilla. I checked the connection and file
download with filezilla client. All fine.
When i use the sample from link, i get the CURLE_UNSUPPORTED_PROTOCOL and in my FTP server i can't see
any connection try.
The error is described like this:
The URL you passed to libcurl used a protocol that this libcurl does not support..
Verbose information is:
* STATE: INIT => CONNECT handle 0x148090e0b38; line 1356 (connection #-5000)
* Protocol "ftp" not supported or disabled in libcurl
* Closing connection -1
* Expire cleared (transfer 0x148090e0b38)
I check the internet for the error message above and none of those i found solved my problem.
It seems not to be a format problem or problem related to wrong url .
So my question is, where can i enable this ? Do i need additional packages ? Or is the problem elsewhere ?
Many thanks
Mean while i figured out how to accomplish this using latest curl command line tool (version 7.68.0) on windows:
curl -u my_user:my_password --ftp-ssl ftp://my_ip/my_relative_path/my_file --insecure -o my_file
The file for download is on a server where a FileZilla FTP server is working. This server cyphers with a self created cert. The curl client only accepts this, when using flag:
--insecure
So far, i could not find the related options for my c++ curl. Perhaps it is not possible at all, because sources available through vcpkg are not (yet) up to date. But i want to stick with vcpkg. For me, this solutions: using command line tool instead, works fine.
One more hint, which is important: curl version 7.64.00 works NOT. You get error:
curl: (35) schannel: failed to receive handshake, SSL/TLS connection failed

Sqoop job fails on AWS with Connection error

I am executing the below sqoop command to get a table from another aws rds instance over to hdfs.
#!/bin/bash
sqoop import \
--connect jdbc:mysql://awsrds.cpclxrkdvwmz.us-east-1.rds.amazonaws.com/financials_data \
--username someuser \
--password somepwd \
--table member_score \
--m 1 \
--target-dir /capstone/member_score
I could connect to this server using the workbench.
But, sqoop fails to get the data.
The stack-trace is as shown below:
[ec2-user#ip-10-0-0-238 capstone]$ ./DataIngestion.txt
Warning: /opt/cloudera/parcels/CDH-5.15.1-1.cdh5.15.1.p0.4/bin/../lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
20/01/03 03:56:45 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6-cdh5.15.1
20/01/03 03:56:45 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
20/01/03 03:56:45 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
20/01/03 03:56:45 INFO tool.CodeGenTool: Beginning code generation
20/01/03 03:58:52 ERROR manager.SqlManager: Error executing statement: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at
The stack-trace says connection error. But, I could connect using Mysql Workbench
As sqoop was giving a Connection Error, I tried to ping the server.
[ec2-user#ip-10-0-0-238 capstone]$ ping awsrds.cpclxrkdvwmz.us-east-1.rds.amazonaws.com
PING ec2-3-211-175-82.compute-1.amazonaws.com (3.211.175.82) 56(84) bytes of data.
^C
--- ec2-3-211-175-82.compute-1.amazonaws.com ping statistics ---
2935 packets transmitted, 0 received, 100% packet loss, time 2934021ms
On seeing that server is not reachable, the next step to check was the Security Groups settings on AWS.
The outbound rule should allow All Traffic
I had previously set Outbound to specific IP. Since AWS allocates new IP each time static IP's dont work.

Maxmind geoipupdate mmdb.gz is not a valid gzip file

I'am try to update my GeoIP Databases using the geoipupdater.
Using the following ProductIds
ProductIds GeoIP2-City GeoIP2-Connection-Type GeoIP2-Country GeoIP2-ISP
Geoipupdate Version 2.3.1 is installed
geoipupdate -V
geoipupdate 2.3.1
When I run the geoipupdate the City and Country Databases are getting updated/downloaded. But for the ISP and Connection-Type Updates I got the following output from the updater.
url: https://updates.maxmind.com/app/update_secure?db_md5=00000000000000000000000000000000&challenge_md5=0926a7ab0bf38eafe43622a25fd6e7e2&user_id=*****&edition_id=GeoIP2-Connection-Type
/usr/share/GeoIP/GeoIP2-Connection-Type.mmdb.gz is not a valid gzip file
url: https://updates.maxmind.com/app/update_secure?db_md5=00000000000000000000000000000000&challenge_md5=0926a7ab0bf38eafe43622a25fd6e7e2&user_id=*****&edition_id=GeoIP2-ISP
/usr/share/GeoIP/GeoIP2-ISP.mmdb.gz is not a valid gzip file
Why are the downloaded .gz files aren't valid?
thanks in advance!
I got the same error, but the reason was an expired subscription.
/my_path/data/GeoIP2-City.mmdb.gz is not a valid gzip file
I'd suggest you call the URL generated by geoipupdate to see the "real error".
curl -i "https://updates.maxmind.com/app/update_secure?db_md5=00000000000000000000000000000000&challenge_md5=f2d60fa3afdaa26b18dd94457a999999&user_id=******&edition_id=GeoIP2-City"
HTTP/1.1 200 OK
Date: Tue, 21 Feb 2017 08:38:13 GMT
Content-Length: 59
Content-Type: text/plain; charset=utf-8
Invalid product ID or subscription expired for GeoIP2-City

libCurl gives unsupported protocol on a script running as cron job

Here is my situation: I have an sh script that writes some data to text files then calls a pre-built c++ binary that processes these text files and uses libCurl to send an email. Under the user that created the script and the binary everything is working fine, the email is delivered perfectly. Something goes wrong when executing the script under the cron daemon. Permissions-wise, the script and binary have 777 and the text files have 666. I have created another user and tried executing the binary it gave me the following error:
* Protocol smtp not supported or disabled in libcurl
* Unsupported protocol
curl_easy_perform() failed: Unsupported protocol
After the cron period passed the shell gave a message something like You have a new mail in/var/spool/mail/$USER, that file contains the same message.
Executing curl -V on both users:
curl 7.48.0 (i686-pc-linux-gnu) libcurl/7.48.0 OpenSSL/1.0.0 zlib/1.2.3 libidn/1.18
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: IDN IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets
Any help is really appreciated.

Deploying Django with Mezzanine on FastCGI

I'm in the middle of trying to deploy a Django project on Subsys.no, Who uses FastCGI. I have never deployed a project before and have been trying for 3 days straight.
I have made a virtualenv on the server and installed all the packages I need.
I have uploaded (FTP) the project I have onto the server (in the correct place)
I have tired using Fabrics "fab all" command on the server and locally. The server gave this response:
--
all
---
-------
install
-------
$ cat /etc/default/locale ->
Fatal error: Low level socket error connecting to host subsys.no on port 22: Connection refused (tried 1 time)
Underlying exception:
Connection refused
Aborting.
The local gave the same answer but with one twist:
Fatal error: Timed out trying to connect to subsys.no (tried 1 time)
Underlying exception:
timed out
I'm not sure if the error lie here or here on the site. It gives out alot that I dont understand.
All help is greatly appreciated and thanks in advance!