-
Notifications
You must be signed in to change notification settings - Fork 20
rpki-validator seems to use a hardcoded path conf/log4j.xml #1
Comments
Hi Carl The path is hard coded because that allows us to 'watch' this file for changes, so that one can reconfigure the log level without restarting the app. In theory it's possible of course to optionally pass in a path for an alternative location of this file, but that adds complexity. So before we take this any further can you elaborate a bit more on why this current setup is causing issues for you? Cheers Tim |
On 28/10/2013 20:51, Tim Bruijnzeels wrote:
Hi Tim, Thanks for your answer. I currently write a Debian package for rpki-validator because our In order to make it I need to comply with some standards when my
I was able to perform this different tasks and rpki-validator.sh starts [ info ] Starting rpki-validator... After this error, rpki-validator.sh crashes. As I said above, my file Or maybe I'm missing something here. Let me know. RegardsCarl Chenet Blog : https://carlchenet.com |
Hi Carl, Great, having an official debian package would be really cool. We will look into this, and get back to you when we have some work done. I realised there are more hardcoded relative paths used by the validator, but following the gist of your reply I will make them configurable as well. I don't expect this to be very hard, but I am currently traveling so it may be a few days before I get back to you with a version to try. A side comment that my colleague Miklos raised: While most of us here use Oracle JDK7, Miklos uses OpenJDK 7 and has been for some time, and we're confident that we can support this as well. So, you will probably want the package to depend on "openjdk-7-jre" rather than having to download the Oracle version that has to be distributed differently because of its license. Note that openjdk 6 is not an option. Tim |
Hi Carl, I made a version that allows overriding the default paths for files and resources. Can you please try it out before we decide to release this? You can download it here: https://certification.ripe.net/content/static/validator/rpki-validator-app-616-dist.tar.gz (616 is the build number) I am not sure if you're wrapping our existing startup script, but if you are, then you can use these environment variables to change the defaults: RPKI_VALIDATOR_CONF_DIR Application expects log4j.xml here If you change the location of the log4j.xml config file, please be aware, there are hard coded paths to the validator.log and rtr.log file defined here. You will need to update these. On a related note I am more and more inclined to change this whole set up and use a simple configuration file for all these settings rather than passing everything in as command arguments. That would essentially just leave one option: to override the location of that config file. To me that seems more consistent with how daemon applications are normally run. That said, I am not sure when we will have the cycles to do this. It's a non-trivial change, so we can only really justify working on that if there is a good indication that users would see it as an improvement. Please let me know what you think. Does the current version work for you, or do you see a need to do things differently? Cheers |
On 01/11/2013 21:18, Tim Bruijnzeels wrote:
Hi Tim, Thanks a lot for your work. With this new version I was able to run the export RPKI_VALIDATOR_CONF_DIR=/etc/rpki-validatorexport RPKI_VALIDATOR_CONF_DIR=/etc/rpki-validator/confexport RPKI_VALIDATOR_LIB_DIR=/usr/share/rpki-validatorexport RPKI_VALIDATOR_DATA_DIR=/usr/share/rpki-validatorexport RPKI_VALIDATOR_TAL_DIR=/etc/rpki-validator/conf/talexport RPKI_VALIDATOR_WORK_DIR=/tmpexport RPKI_ACCESS_LOG=/var/log/rpki-validator/etc/init.d/rpki-validator.sh start[ info ] Starting rpki-validator... So it is ok for me. I guess using a simple configuration file for all Thanks again,Carl Chenet Blog : https://carlchenet.com |
Hi Carl, We have been working on a version that uses a config file for all settings. Could you please give it a try? We'd like to include this in the next release. We are still working on a small feature before this release (monitoring problems for each configured trust anchor), but I expect this will be done early next week. You can download a binary here: Thanks |
We had no feedback otherwise, so assume this addressed the issue. |
Hi,
I'm trying to realize a package with rpki-validator. In order to realize a good integration of this app on my system, I tried to modify CONF_DIR in order to be able to move the ./conf into /etc/rpki-validator/conf
But when I start rpki-validator.sh, I only get the following message:
/etc/init.d/rpki-validator.sh start
[ info ] Starting rpki-validator...
[ info ] writing logs under log directory
[ info ] Web user interface is available on port 8080
[ info ] Routers can connect on port 8282
[ info ] Writing PID 22630 to /var/run/rpki-validator.pid
Exception in thread "main" java.lang.IllegalArgumentException: requirement failed: Configuration file 'conf/log4j.xml' was not found.
at scala.Predef$.require(Predef.scala:233)
at net.ripe.rpki.validator.config.Main$.configureLogging(Main.scala:86)
at net.ripe.rpki.validator.config.Main$.main(Main.scala:75)
at net.ripe.rpki.validator.config.Main.main(Main.scala)
I just discovered the source code on Github and read that conf/log4j.xml seems hardcoded directly in the source code. Would it be possible to find a way in order it is not hardcoded ? Maybe by putting a path into the .sh or in a conf file ? Or maybe I'm missing something?
Thanks,
Carl Chenet
The text was updated successfully, but these errors were encountered: