Map-Module not showing hosts

  • Hello everyone,

    I recently installed the map module on my test environment and added GPS-location via icinga director to my host.

    If I preview the director config (or show the hosts via icinga2 object list command) the hosts have the appropriate vars.geolocation="52.xxxxx,8.xxxxx" attributes


    The OSM loads but no bubbles are shown.


    If I check apache2 access log I see error 500s:

    Code
    1. 10.0.x.x - - [05/Oct/2017:14:59:32 +0200] "GET /icingaweb2/map HTTP/1.1" 200 1004 "https://<url removed>/icingaweb2/map" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.35"
    2. 10.0.x.x - - [05/Oct/2017:14:59:32 +0200] "GET /icingaweb2/map/data/points? HTTP/1.1" 500 3556 "https://<url removed>/icingaweb2/map" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.35"
    3. 10.0.x.x - - [05/Oct/2017:14:59:36 +0200] "GET /icingaweb2/map/data/points? HTTP/1.1" 500 3708 "https://<url removed>/icingaweb2/map" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.35"

    I tested that on multiple browsers (IE, Opera, Chrome).

    I also installed the Globe module. That works as intended and shows the hosts and as it uses the same custom var those seem to be correct.


    Are there additional logs from the map-module I could check?


    Best regards

  • Hello


  • not really...back in the days just installed mariaDB and I remember that director required utf8 but do not recall specifically configuring it for Icinga itself

  • Code
    1. MariaDB [icinga]> SELECT @@character_set_database, @@collation_database;
    2. +--------------------------+----------------------+
    3. | @@character_set_database | @@collation_database |
    4. +--------------------------+----------------------+
    5. | utf8mb4 | utf8mb4_general_ci |
    6. +--------------------------+----------------------+
    7. 1 row in set (0.01 sec)

    Icinga 2.7.1-2 was installed from repo via apt on ubuntu lts 16.04.3

    MariaDB 10.0 as well

  • Still not working


    Code
    1. MariaDB [icinga]> SELECT @@character_set_database, @@collation_database;
    2. +--------------------------+----------------------+
    3. | @@character_set_database | @@collation_database |
    4. +--------------------------+----------------------+
    5. | utf8 | utf8_general_ci |
    6. +--------------------------+----------------------+
    7. 1 row in set (0.00 sec)

    The alternation worked as expected but the error message is still the same:

  • I would try to change charset in the resources.ini similar to your director database. The error message isn't dedicated to the map module. It's more a Icingaweb-Core encoding problem, which pops up in this edge case.


    In case of convertion of your database:


    In my testing environment i've had to convert the existing tables besides the changes regarding the default collation (always mind a recent backup!)


    Code
    1. ALTER TABLE <table_name> CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
  • I have the same problem - what kind of negative affect might that have on the database? I don't want to make more problems - we are using director and a few basic addons.