jamesrwhite / minicron

🕰️ Monitor your cron jobs
GNU General Public License v3.0
2.34k stars 154 forks source link

Job runs from CLI, but not UI #227

Closed fortynachos closed 8 years ago

fortynachos commented 8 years ago

Hi James!

Sorry if this is a duplicate question, but I've read through https://github.com/jamesrwhite/minicron/issues/169 and https://github.com/jamesrwhite/minicron/issues/178 but I'm still stumped.

0) I installed this using your install script, and am using ruby 2.1.0. 1) Minicron is in my $PATH:

$ which minicron
/usr/local/bin/minicron

2) I've added the relevant minicron public key to my authorized keys:

michael.fotinatos@localhost ~/.ssh
$ cat authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9LzpeE/rI90yxU9l5JOwExUeHIY+bWOCXgErq0kTJ+Lu3gUUClW7ZqbXq+9bEH9NhxJAzHl92ONXZZczZ9PxnQ1CxvIW5su/FdeMut+Ewkl2y88HMAss4/wHQMTBnaZxGEbhEJpEp3tKD45QkhNvT529Gl+PSuflF35C35y7Rt/uwMjzik2bnUVNWleC9/Ri0DjyV2y8L2aUuTHjcDl/Tk1wUbuyd7pChPDTE9Tc2U/aO3N80/aCUlJsJwec9E11OSNXBImJVb0KBO7yV5S3WdpHMbPGcAs7BmNbwL1UAhwWoo/oQvdF3zfsIio5UvEznnKeTGzZK/P8eBlnOS5dB minicron public key for localhost

3) I've tried using the root user when defining the host, but not only does that not work, but it's not really what I want since the commands I want to execute shouldn't use root.

I can kick off jobs using the CLI (minicron run ls, for example), but when I go to test the connection on that very same job in the UI, the test fails, and I get a Authentication failed for user michael.fotinatos@127.0.0.1.

Here's my /etc/minicron.toml in a gist. I'm probably just doing something stupid, but could you help point me in the right direction?

jamesrwhite commented 8 years ago

Hey!

What OS is this on and are the client and hub and on the same server?

Can you try manually connecting like so and see what it says?

ssh -v -i ~/.ssh/minicron_host_X_rsa user@localhost

Where X is the ID of the host that you see in the URL when you view it and user is the user you configured the host to use for ssh.

jamesrwhite commented 8 years ago

I'm closing this due to inactivity, feel free to re-open if you still wish to discuss it further.

yizhexu commented 8 years ago

Hi! I ran into similar problem. authorized key set up similarly to @jamesrwhite Running ssh -v -i ..ssh/minicron_host_x_rsa yizhe@silver gives me the following message gist

yizhexu commented 8 years ago

Hey, I resolved this issue by running: chmod 700 ~/.ssh chmod 600 ~/.ssh/authorized_keys