karamelchef / karamel

Reproducing Distributed Systems and Experiments on Cloud
http://www.karamel.io
Apache License 2.0
39 stars 22 forks source link

generated keys: Authentication problem using ssh keys. #126

Closed mqus closed 9 years ago

mqus commented 9 years ago

OS: Xubuntu 15.04 Java: openjdk-7 Setup type: bare metal yml: Single node installation including VLDB demo workflows

When trying to start the Installation with generated keys(without passwords), it throws the following error:


   | Failure         | Id       | Message                                          |
  =================================================================================
1. | SSH_KEY_NOT_AUTH| 127.0.0.1| 127.0.0.1: Authentication problem using ssh keys.|

What I did exactly:

  1. start karamel (downloaded from the website)
  2. open yml
  3. press launch (a configuration window opens)
  4. generate keys
  5. copy generated public key into ~/.ssh/authorized_keys (with cat .karamel/.ssh/ida_rsa.pub >> .ssh/authorized_keys)
  6. enter sudo password (my password, not root)
  7. press activate
  8. press submit

I also tried the generated keys with ssh localhost -i .karamel/.ssh/ida_rsa and it worked.

Console Output:

ERROR [2015-09-15 15:20:32,292] net.schmizz.concurrent.Promise: <<authenticated>> woke to: net.schmizz.sshj.userauth.UserAuthException: publickey auth failed
ERROR [2015-09-15 15:20:32,327] se.kth.karamel.backend.machines.MachinesMonitor: 
! net.schmizz.sshj.userauth.UserAuthException: publickey auth failed
! at net.schmizz.sshj.userauth.UserAuthImpl.handle(UserAuthImpl.java:157) ~[sshj-0.8.1.jar:na]
! at net.schmizz.sshj.transport.TransportImpl.handle(TransportImpl.java:474) ~[sshj-0.8.1.jar:na]
! at net.schmizz.sshj.transport.Decoder.decode(Decoder.java:127) ~[sshj-0.8.1.jar:na]
! at net.schmizz.sshj.transport.Decoder.received(Decoder.java:195) ~[sshj-0.8.1.jar:na]
! at net.schmizz.sshj.transport.Reader.run(Reader.java:72) ~[sshj-0.8.1.jar:na]
! Causing: net.schmizz.sshj.userauth.UserAuthException: Exhausted available authentication methods
! at net.schmizz.sshj.userauth.UserAuthImpl.authenticate(UserAuthImpl.java:114) ~[sshj-0.8.1.jar:na]
! at net.schmizz.sshj.SSHClient.auth(SSHClient.java:205) ~[sshj-0.8.1.jar:na]
! at net.schmizz.sshj.SSHClient.authPublickey(SSHClient.java:305) ~[sshj-0.8.1.jar:na]
! at net.schmizz.sshj.SSHClient.authPublickey(SSHClient.java:324) ~[sshj-0.8.1.jar:na]
! at se.kth.karamel.backend.machines.SshMachine.connect(SshMachine.java:367) ~[karamel-core-0.1.jar:na]
! ... 7 common frames omitted
! Causing: se.kth.karamel.common.exception.KaramelException: 127.0.0.1: Authentication problem using ssh keys.
! at se.kth.karamel.backend.machines.SshMachine.connect(SshMachine.java:399) ~[karamel-core-0.1.jar:na]
! at se.kth.karamel.backend.machines.SshMachine.ping(SshMachine.java:425) ~[karamel-core-0.1.jar:na]
! at se.kth.karamel.backend.machines.MachinesMonitor.run(MachinesMonitor.java:101) ~[karamel-core-0.1.jar:na]
! at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_79]
! at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_79]
! at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_79]
! at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_79]
! at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79]
jimdowling commented 9 years ago

Does the user account 'hiway' exist on your local machine? It should already exist...

jimdowling commented 9 years ago

You can also use an existing account on your machine, but you have to edit this file: http://saasfee.informatik.hu-berlin.de/download/saasfee_standalone_baremetal_vldb_demo.yml Change the hiway user, hdfs user, yarn user, and mr user entries from 'hiway' to 'mqus' or whatever your username is.

mqus commented 9 years ago

The user hiway didn't exist. Just now i tried another installation after changing the user to markus (my username) i also tried with and without changing the data directory to /home/markus, but it just showed the same error.

Btw, my karamel version is 0.1(the archive from the karamel.io website).

jimdowling commented 9 years ago

First test is: ssh markus@localhost If that works without asking you for a password, then karamel should be able to login to your machine. If you need to enter a password, then you have to enter it in "ssh keys" dialog - advanced part. Second test: Does 'markus' user have sudo privileges. If yes, but you need to enter a password, then you need to enter that password again in the "ssh keys" dialog - advanced part

mqus commented 9 years ago

when I try ssh markus@localhost, it still asks for my password (propably because ssh doesn't know the private key). When I give ssh the key like above with ssh markus@localhost -i .karamel/.ssh/ida_rsa, the login works. My key (the generated one) doesn't have any password.

I just noticed in the logs, that there were some entries above the mentioned error that are propably interesting, I don't know if they were there the first time i tried...

INFO  [2015-09-16 21:08:25,974] se.kth.karamel.backend.machines.SshMachine: 127.0.0.1: connecting ...
INFO  [2015-09-16 21:08:25,988] net.schmizz.sshj.transport.TransportImpl: Client identity string: SSH-2.0-SSHJ_0_8_1_SNAPSHOT
INFO  [2015-09-16 21:08:26,054] net.schmizz.sshj.transport.TransportImpl: Server identity string: SSH-2.0-OpenSSH_6.7p1 Ubuntu-5ubuntu1.3
INFO  [2015-09-16 21:08:26,877] se.kth.karamel.backend.machines.SshMachine: 127.0.0.1: Yey!! connected ^-^
ERROR [2015-09-16 21:08:26,981] net.schmizz.concurrent.Promise: <<authenticated>> woke to: net.schmizz.sshj.userauth.UserAuthException: publickey auth failed
ERROR [2015-09-16 21:08:26,987] se.kth.karamel.backend.machines.MachinesMonitor: 
! net.schmizz.sshj.userauth.UserAuthException: publickey auth failed
! at net.schmizz.sshj.userauth.UserAuthImpl.handle(UserAuthImpl.java:157) ~[sshj-0.8.1.jar:na]
! at net.schmizz.sshj.transport.TransportImpl.handle(TransportImpl.java:474) ~[sshj-0.8.1.jar:na]
! at net.schmizz.sshj.transport.Decoder.decode(Decoder.java:127) ~[sshj-0.8.1.jar:na]
! at net.schmizz.sshj.transport.Decoder.received(Decoder.java:195) ~[sshj-0.8.1.jar:na]
! at net.schmizz.sshj.transport.Reader.run(Reader.java:72) ~[sshj-0.8.1.jar:na]
! Causing: net.schmizz.sshj.userauth.UserAuthException: Exhausted available authentication methods
! at net.schmizz.sshj.userauth.UserAuthImpl.authenticate(UserAuthImpl.java:114) ~[sshj-0.8.1.jar:na]
! at net.schmizz.sshj.SSHClient.auth(SSHClient.java:205) ~[sshj-0.8.1.jar:na]
! at net.schmizz.sshj.SSHClient.authPublickey(SSHClient.java:305) ~[sshj-0.8.1.jar:na]
! at net.schmizz.sshj.SSHClient.authPublickey(SSHClient.java:324) ~[sshj-0.8.1.jar:na]
! at se.kth.karamel.backend.machines.SshMachine.connect(SshMachine.java:367) ~[karamel-core-0.1.jar:na]
! ... 7 common frames omitted
! Causing: se.kth.karamel.common.exception.KaramelException: 127.0.0.1: Authentication problem using ssh keys.
! at se.kth.karamel.backend.machines.SshMachine.connect(SshMachine.java:399) ~[karamel-core-0.1.jar:na]
! at se.kth.karamel.backend.machines.SshMachine.ping(SshMachine.java:425) ~[karamel-core-0.1.jar:na]
! at se.kth.karamel.backend.machines.MachinesMonitor.run(MachinesMonitor.java:101) ~[karamel-core-0.1.jar:na]
! at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_79]
! at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_79]
! at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_79]
! at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_79]
! at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79]
mqus commented 9 years ago

Do I have to change the username of the provider (from nothing/root to markus)? If I do, it seems to work.

jimdowling commented 9 years ago

@kamalhakim ?

kamalhakim commented 9 years ago

Sorry for reacting late on this, gmail spammed the emails from github.

@mqus I see that in your yaml file you had hiway as the user name but later you said you didn't have that user-name and made markus.. however in your last comment you say if you change the root to markus it works.. i am a bit confused why did you think it should work with root (considering you set ssh password for the user markus in karamel) ?

mqus commented 9 years ago

I tried the yaml without changing the username and then i changed the username and tried it again. The yaml file isn't mine, I just tried the steps shown in this youtube video. I didn't know I had to change the provider, if that was what I missed, then thank you and sorry for the commotion :)

kamalhakim commented 9 years ago

Yes, that's the only place you set the user-name. I close it then.