geoipupdate
geoipupdate copied to clipboard
Error loading configuration: unknown option on line 1 - windows server 2019
When trying to update database on windows server 2019:
E:\GEOIP\geoipupdate_6.1.0_windows_amd64\geoipupdate.exe
Error loading configuration: unknown option on line 1
My config file is a default:
# Please see https://dev.maxmind.com/geoip/updating-databases?lang=en for
# instructions on setting up geoipupdate, including information on how to
# download a pre-filled GeoIP.conf file.
# Replace YOUR_ACCOUNT_ID_HERE and YOUR_LICENSE_KEY_HERE with an active account
# ID and license key combination associated with your MaxMind account. These
# are available from https://www.maxmind.com/en/my_license_key.
AccountID 00000
LicenseKey XXyyXXyyXXyyXXyyXXyyXXyyXXyy
# Enter the edition IDs of the databases you would like to update.
# Multiple edition IDs are separated by spaces.
EditionIDs GeoLite2-Country
# The remaining settings are OPTIONAL.
# The directory to store the database files. Defaults to %SystemDrive%ProgramDataMaxMindGeoIPUpdateGeoIP
# DatabaseDirectory %SystemDrive%ProgramDataMaxMindGeoIPUpdateGeoIP
# The server to use. Defaults to "updates.maxmind.com".
# Host updates.maxmind.com
# The proxy host name or IP address. You may optionally specify a
# port number, e.g., 127.0.0.1:8888. If no port number is specified, 1080
# will be used.
# Proxy 127.0.0.1:8888
# The user name and password to use with your proxy server.
# ProxyUserPassword username:password
# Whether to preserve modification times of files downloaded from the server.
# Defaults to "0".
# PreserveFileTimes 0
# The lock file to use. This ensures only one geoipupdate process can run at a
# time.
# Note: Once created, this lockfile is not removed from the filesystem.
# Defaults to ".geoipupdate.lock" under the DatabaseDirectory.
# LockFile %SystemDrive%ProgramDataMaxMindGeoIPUpdateGeoIP/.geoipupdate.lock
# The amount of time to retry for when errors during HTTP transactions are
# encountered. It can be specified as a (possibly fractional) decimal number
# followed by a unit suffix. Valid time units are "ns", "us" (or "µs"), "ms",
# "s", "m", "h".
# Defaults to "5m" (5 minutes).
# RetryFor 5m
# The number of parallel database downloads.
# Defaults to "1".
# Parallelism 1
conf file: GeoIP.conf.txt
The GeoIP.conf is placed at \ProgramData\MaxMind\GeoIPUpdate\GeoIP.conf on the server's system drive.
Tried both amd64 & x86 versions, both throw the same error.
Tried explicity giving -f to specify the config and -d for destination. Still the same error.
Kindly advise.
The pasted text has \# rather than #, which would cause an issue similar to what you are experiencing. Comments should start with #. That said, i see that the linked file does not have that. I tested the file you provided and it worked fine for me.
Thanks for pointing out, the slashes were added mistakenly while setting the formatting on the post. The actual file doesn't have slashes, it is same as the linked file. I've corrected it now.
This file works fine on my machine but is not working on the server.
Could you please provide the prerequisites / checklist for the server to make it run. Thanks, P
There isn't much to go on here. I would suspect that the file is getting messed up when you transfer it to the server. One thought is that your editor may be saving it as UTF-16 rather than ASCII or UTF-8.
I verified this on the server, the encoding of GeoIP.conf is UTF-8 only.
The exe does not recognize the conf file, not sure why. The worst part is, there are no events logged for this to check what is wrong. Please help!!
I'd suggest contacting [email protected]. It sounds like the file is invalid, but it is not clear how from your description. They should be in a better position to help you.