Zimbra-Community / account-history

A Zimbra extension that allows the user to monitor their recent login and account activity. This is important to keep the user's account safe.
GNU General Public License v2.0
21 stars 2 forks source link

No maps in 8.8.8 #14

Closed jbnance closed 6 years ago

jbnance commented 6 years ago

Hello,

I just installed this Zimlet on 8.8.8 from master. The history appears in both the user and admin interfaces but no maps load. Here is a sample of the html source for the frame (after selecting a log entry in the user interface):

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8">
    <title>OpenStreetMap Embedded</title>
    <link rel="stylesheet" media="screen" href="/assets/embed-4dbfd7a8634cab9ca4b7172c30c2fef965e94e7de09a5576f759bb7f41a7dd7b.css" />
    <script src="/assets/embed-0dc0d4ec0e1ba7be3851027037dbc5cbb3bba504c0039f4c6cbe7ab154149bec.js"></script>
  </head>
  <body>
    <div id="map"></div>
  </body>
</html>
barrydegraaff commented 6 years ago

Do you see a blue-ocean or something like that? Perhaps your IP's are not understood by GeoIP, the maps work here.

Can you restart your server and flush your browser cache.

Do you see your IPv4?

jbnance commented 6 years ago

The map controls - the "+" and "-" - show up but there's no data - it's just a grey background. I've flushed and restarted with no change. I'm using IPv4.

Did you mean to close this while we're still conversing about the issue?

barrydegraaff commented 6 years ago

Can you try an incognito window, in Google Chrome

jbnance commented 6 years ago

Same results. I'm using Chrome 66.0.3359.139 on Windows.

jbnance commented 6 years ago

Is /usr/share/GeoIP/GeoLiteCity.dat supposed to exist on RHEL/CentOS servers or is that for Debian/Ubuntu only? I noticed this section in the installer:

set +e
echo "Updating GeoIP"
if [[ ! -z $APT_CMD ]]; then
   cd $TMPFOLDER
   wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
   gunzip GeoLiteCity.dat.gz
   mv GeoLiteCity.dat /usr/share/GeoIP/
else
   # if no update is found, the script would not continue running in set -e
   geoipupdate
fi
set -e

Since my server runs on CentOS that section of the installer isn't ran, but the GeoIP RPM doesn't provide GeoLiteCity.dat:

# ls -l /usr/share/GeoIP/
total 2508
lrwxrwxrwx. 1 root root      17 Dec 13  2016 GeoIP.dat -> GeoIP-initial.dat
-rw-r--r--. 1 root root      16 Apr 30 20:15 GeoIP.dat.test
-rw-r--r--. 1 root root  890597 Nov  4  2016 GeoIP-initial.dat
lrwxrwxrwx. 1 root root      19 Dec 13  2016 GeoIPv6.dat -> GeoIPv6-initial.dat
-rw-r--r--. 1 root root 1667515 Nov  4  2016 GeoIPv6-initial.dat
barrydegraaff commented 6 years ago

What version of CentOS is that? Is it a custom version?

jbnance commented 6 years ago

CentOS 7 with latest updates. Nothing custom about it.

# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core)

# ls -l /usr/share/GeoIP/
total 2508
lrwxrwxrwx. 1 root root      17 Dec 13  2016 GeoIP.dat -> GeoIP-initial.dat
-rw-r--r--. 1 root root      16 Apr 30 20:15 GeoIP.dat.test
-rw-r--r--. 1 root root  890597 Nov  4  2016 GeoIP-initial.dat
lrwxrwxrwx. 1 root root      19 Dec 13  2016 GeoIPv6.dat -> GeoIPv6-initial.dat
-rw-r--r--. 1 root root 1667515 Nov  4  2016 GeoIPv6-initial.dat

# rpm -qf /usr/share/GeoIP/GeoIP.dat
GeoIP-1.5.0-11.el7.x86_64

# rpm -qV GeoIP
barrydegraaff commented 6 years ago

Can you try an incognito window, in Google Chrome

barrydegraaff commented 6 years ago

What is the result of the command:

  /usr/bin/geoiplookup  -f  /usr/share/GeoIP/GeoLiteCity.dat your-ip-here

Run it form your Zimbra server.

barrydegraaff commented 6 years ago

I can confirm this issue, on CentOS I ran the installer using bash -x...

  + geoipupdate
  /usr/share/GeoIP/GeoLiteCountry.dat can't be opened, proceeding to download database
  Updating /usr/share/GeoIP/GeoLiteCountry.dat
  Received Error -21 (Sanity check database_info string failed) when attempting to update GeoIP Database
  /usr/share/GeoIP/GeoLiteCity.dat can't be opened, proceeding to download database
  Updating /usr/share/GeoIP/GeoLiteCity.dat
  Received Error -21 (Sanity check database_info string failed) when attempting to update GeoIP Database
  + set -e
  + echo 'Restoring config.properties'
  Restoring config.properties

So that means there is an upstream change and geoipupdate no longer works on CentOS...

barrydegraaff commented 6 years ago

I changed the installer to fix the issue. Please re-download and re-run the installer, and it should work.

Please let me know if it works now.

Thanks for reporting.

jbnance commented 6 years ago

Works great now. Thanks!

leonardochristo1 commented 5 years ago

/usr/bin/geoiplookup -f /usr/share/GeoIP/GeoLiteCity.dat your-ip-here essa é a saida do comando para mim, após acertar o problema da Issue 21

root@zimbrateste:/# /usr/bin/geoiplookup -f /usr/share/GeoIP.dat 10.x.x.x /usr/share/GeoIP.dat not available, skipping...

barrydegraaff commented 5 years ago

Did you downloaded and installed the latest version of Account History?

Try and run /usr/local/sbin/geoip2-zimbra-update.sh

Kind regards,

Barry de Graaff Zeta Alliance Co-founder & Developer zetalliance.org | github.com/Zimbra-Community

Signal: +31 617 220 227 Fingerprint: 97f4694a1d9aedad012533db725ddd156d36a2d0

From: "leonardochristo1" notifications@github.com To: "Zimbra-Community" account-history@noreply.github.com Cc: "Barry de Graaff" info@barrydegraaff.tk, "State change" state_change@noreply.github.com Sent: Wednesday, 31 July, 2019 12:51:17 Subject: Re: [Zimbra-Community/account-history] No maps in 8.8.8 (#14)

/usr/bin/geoiplookup -f /usr/share/GeoIP/GeoLiteCity.dat your-ip-here essa é a saida do comando para mim, após acertar o problema da Issue 21

root@zimbrateste:/# /usr/bin/geoiplookup -f /usr/share/GeoIP.dat 10.x.x.x /usr/share/GeoIP.dat not available, skipping...

— You are receiving this because you modified the open/close state. Reply to this email directly, [ https://github.com/Zimbra-Community/account-history/issues/14?email_source=notifications&email_token=ABBGZPOG63H7JCFJMOVJTKDQCFVCLA5CNFSM4E5V27YKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3G3WHY#issuecomment-516799263 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ABBGZPKWVXJI2VMOMVC2LALQCFVCLANCNFSM4E5V27YA | mute the thread ] .

leonardochristo1 commented 5 years ago

fiz tudo o que pediu mas continua com a tela cinza. Não estou querendo atualizar o zcs por ser multiserver

barrydegraaff commented 5 years ago

Sorry, not a Portuguese speaker.

Kind regards,

Barry de Graaff Zeta Alliance Co-founder & Developer zetalliance.org | github.com/Zimbra-Community

Signal: +31 617 220 227 Fingerprint: 97f4694a1d9aedad012533db725ddd156d36a2d0

From: "leonardochristo1" notifications@github.com To: "Zimbra-Community" account-history@noreply.github.com Cc: "Barry de Graaff" info@barrydegraaff.tk, "State change" state_change@noreply.github.com Sent: Wednesday, 31 July, 2019 17:37:51 Subject: Re: [Zimbra-Community/account-history] No maps in 8.8.8 (#14)

fiz tudo o que pediu mas continua com a tela cinza. Não estou querendo atualizar o zcs por ser multiserver

— You are receiving this because you modified the open/close state. Reply to this email directly, [ https://github.com/Zimbra-Community/account-history/issues/14?email_source=notifications&email_token=ABBGZPK7WNRJ7NHRYYNTZ4TQCGWU7A5CNFSM4E5V27YKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3HVECQ#issuecomment-516903434 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/ABBGZPOI2NCLSHLYGC4TQZDQCGWU7ANCNFSM4E5V27YA | mute the thread ] .