Skip to content
Snippets Groups Projects

Removed files related to SQLNetworkService #5

Merged Christopher Guindon requested to merge github/fork/Linus-CS/my-feature into master

Created by: Linus-CS

Removed following files:

  • org.eclipsefoundation.geoip.client.service.impl.SQLNetworkService
  • org.eclipsefoundation.geoip.client.dao.MariaDBDao
  • org.eclipsefoundation.geoip.client.dao.MockMariaDBDao

Aswell as following properties in src/main/resources/application.properties:

  • quarkus.datasource.driver
  • quarkus.datasource.url
  • quarkus.datasource.username
  • quarkus.datasource.min-size
  • quarkus.datasource.max-size

Signed-off-by: LinusCS linus.schulze@hsnet.de

Merge request reports

Approved by

Merged by Christopher GuindonChristopher Guindon 5 years ago (Apr 13, 2020 1:04pm UTC)

Merge details

  • Changes merged into master with cec3d2cf.
  • Deleted the source branch.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • @Linus-CS we've merged in the update that fixes fetching data for MaxMind. To be able to run this, you'll need to get a license key for MaxMind GeoLite2 DBs. This is free for this product, and only takes a couple of minutes to sign up for https://www.maxmind.com/en/geolite2/signup.

    Once you've got a key, you'll need 2 things. First is an environment with shell (WSL or Cygwin would likely work), and once there, you need to create a license file for your license key. This is just a text file with your key with a new line at the end. Doesn't matter where you put it as long as the current user can read it. Update the LICENSE_KEY_FILE environment var to point at the file (e.x. export LICENSE_KEY_FILE=/localdev/geoip-rest-api/key).

    From here, you should be able to run ./bin/maxmind.sh /tmp to get the MaxMind data and run your tests. Let me know if you have any issues running the script and I'll assist!

  • Created by: Linus-CS

    @autumnfound after running $ ./bin/maxmind.sh /tmp I get these errors: Getting data from MaxMind curl: (3) Illegal characters found in URL

    gzip: stdin: unexpected end of file tar: Child returned status 1 tar: Error is not recoverable: exiting now

    Even if I use $ dos2unix maxmind.sh to convert the file from Windows to Linux format

  • Do the contents of your key file contain any non-alphanumeric characters? Can you paste in the lines 38-40 from the script to ensure that nothing got munged in the conversion?

  • Created by: Linus-CS

    The lines seem to be right

    curl -sSL "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&suffix=tar.gz&license_key=$LICENSE_KEY" | tar zxv -C bin --wildcards '*.mmdb'
    curl -sSL "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&suffix=tar.gz&license_key=$LICENSE_KEY" | tar zxv -C bin --wildcards '*.mmdb'
    curl -sSL "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country-CSV&suffix=zip&license_key=$LICENSE_KEY" -o GeoLite2-Country-CSV.zi

    I ran the dos2unix command on my key file and now I do not get the error anymore, nevertheless I get a error in line 21: 1 isn't set.

  • That is for checking that the first variable is set (the DB write location). Did you run the script without setting the location to write data to?

  • Created by: Linus-CS

    Oh yes on accident. So now I am still getting the same errors again.

  • Created by: Linus-CS

    It works now. I had empty space in the key file, thanks for the help. Sorry for taking your time.

  • Created by: Linus-CS

    Sorry for bothering you again. I need some help. The maxmind.sh script works fine, yet the tests fail with the message The system is unable to locate \tmp\maxmind\bin\.. or \tmp\maxmind\db\..

    First of all the maxmind.sh script seems like creating the subfolders \bin and \db but not \maxmind\bin and \maxmind\db, but in the src\test\resources\application.properties all paths are \tmp\maxmind\... Maybe this needs to be added in the script.

    Nevertheless if I manualy add the maxmind folder I get the same errors that the system is unable to locate the files. If I navigate to the directory all files are there.

    This is how the errors look like:

    ERROR [org.ecl.geo.cli.res.map.RuntimeMapper] (vert.x-worker-thread-7) java.io.FileNotFoundException: \tmp\maxmind\bin\GeoLite2-Country.mmdb (Das System kann den angegebenen Pfad nicht finden)
  • The maxmind folder was added by running the script with /tmp/maxmind as the storage location. I ran it that way on my machine most times as I have multiple scripts running and I didn't want there to be a collision. I could have made that clearer, apologies!

    In terms of not being able to see the content...where are you running the maven/junit command for the test? Windows, Mac, or Linux?

  • Created by: Linus-CS

    That makes sense.

    I am running it on Windows.

  • Your issue might be that since you're running in a Windows-based environment, the file path format wouldn't be valid. We currently pipe the path directly into a File object which relies on your operating system to resolve the path. In Windows, you would need to give a path as your system would use (e.g. C:\home\joe\foo). Could you try updating the path to where those files reside in your Windows environment?

    More info on paths here: https://docs.oracle.com/javase/tutorial/essential/io/pathOps.html

  • Created by: Linus-CS

    I will try to do it on sunday, since I will be out of house till then. Thanks for the help again.

  • @Linus-CS how goes? It looks like your PR is having problems building. Have you rebased your changes yet? It looks like the issue is to do with the maxmind script being out of date

  • Created by: Linus-CS

    @autumnfound During the rebase i got merge conflicts. I think I solved them now, but the PR still doesn't build. I may need to take a look on everything again.

  • Created by: Linus-CS

    @autumnfound nice it worked.

  • Martin Lowe approved this merge request

    approved this merge request

  • Christopher Guindon approved this merge request

    approved this merge request

Please register or sign in to reply
Loading