Open swrobel opened 10 years ago
I'm actually not 100% sure that a relative path for the key won't work. Is it possible that the working directory remote_syslog was started in - that is, what ssl/
would be relative to - is not the app root (or wherever ssl/
is). Couple ideas for how to identify the working directory:
tls_endpoint.rb
on that system and have it puts Dir.getwd
(Dir.getwd), which is that process's working directory./
, ~root
, or a similar system-related path.ssl/
(with the same arguments is used by the init script).If one or more of those confirm that the wd is the directory containing ssl/
, we're into other options:
current
symlink to the current release version.I tried your 3rd suggestion, "as a last resort, try invoking remote_syslog as a user while in the directory containing ssl/ (with the same arguments is used by the init script)."
Still get not found even when running it from within the ssl/ dir within my app simply using the following command:
bundle exec remote_syslog -c ../config/remote_syslog.yml --dest-port <port> --tls
I also tried adding puts Dir.getwd
in the source but it doesn't seem to get output to the command line. It also seemed to me that this was a better place to put it so I tried it there as well - no luck. I've tried adding an additional puts in cli.rb
and that comes out, so it isn't that I'm modifying in the wrong gem dir or something.
I'm out of easy ideas too. I had one question. You mentioned:
Still get not found even when running it from within the ssl/ dir within my app
Were you in the directory containing ssl/
or in the ssl/
directory itself? I'm guessing that it was just wording, but wanted to confirm.
I've tried it from both
Okay. If you can get it to spit out the wd, it may well be /
but there's a chance it'll be something else.
remote_syslog: #<Errno::ENOENT: No such file or directory @ rb_sysopen - ssl/papertrail.crt
I have the papertrail certificate in my application's code and I'm attempting to access it by giving the relative path to the file. I can't give an absolute path, since my deploy directory depends on the environment, application, etc. Anyway, hardcoding paths sucks. I think it has something to do with this comment regarding Daemonize setting the path to / https://github.com/papertrail/remote_syslog/blob/master/lib/remote_syslog/cli.rb#L171