airavata-courses / TeamAlpha

Team Alpha's Repository for Spring 2016 I590 Class
0 stars 0 forks source link

Can't run the project even from eclipse #6

Closed anujbhan closed 8 years ago

anujbhan commented 8 years ago

After following the instructions given for running the project, the following error pops up :

2016-01-31 14:00:10,918 INFO com.teamAlpha.airavata.facade.Main - monitor() -> Submit and monitor job.
2016-01-31 14:00:10,918 INFO com.teamAlpha.airavata.service.JobManagementImpl - submitJob() -> Submit job to server queue.
2016-01-31 14:00:10,919 INFO com.teamAlpha.airavata.net.ConnectionImpl - getSession() -> Get user session. Connection Essentials : ConnectionEssential [host=karst.uits.iu.edu, user=patelprv, port=22, pkFilePath=//home//pratik//.ssh//id_rsa, pkPassphrase=pratik9991]
2016-01-31 14:00:13,186 ERROR com.teamAlpha.airavata.net.ConnectionImpl - getSession() -> Error creating session.
com.jcraft.jsch.JSchException: java.io.FileNotFoundException: \\home\pratik\.ssh\id_rsa (The network path was not found)
    at com.jcraft.jsch.KeyPair.load(KeyPair.java:524)
    at com.jcraft.jsch.IdentityFile.newInstance(IdentityFile.java:40)
    at com.jcraft.jsch.JSch.addIdentity(JSch.java:389)
    at com.jcraft.jsch.JSch.addIdentity(JSch.java:370)
    at com.teamAlpha.airavata.net.ConnectionImpl.getSession(ConnectionImpl.java:52)
    at com.teamAlpha.airavata.service.JobManagementImpl.submitJob(JobManagementImpl.java:114)
    at com.teamAlpha.airavata.facade.Main.monitor(Main.java:46)
    at com.teamAlpha.airavata.facade.Main.main(Main.java:32)
Caused by: java.io.FileNotFoundException: \\home\pratik\.ssh\id_rsa (The network path was not found)
    at java.io.FileInputStream.open0(Native Method)
    at java.io.FileInputStream.open(Unknown Source)
    at java.io.FileInputStream.<init>(Unknown Source)
    at java.io.FileInputStream.<init>(Unknown Source)
    at com.jcraft.jsch.Util.fromFile(Util.java:492)
    at com.jcraft.jsch.KeyPair.load(KeyPair.java:521)
    ... 7 more
Exception in thread "main" com.teamAlpha.airavata.exception.ConnectionException: Error creating session.
    at com.teamAlpha.airavata.net.ConnectionImpl.getSession(ConnectionImpl.java:65)
    at com.teamAlpha.airavata.service.JobManagementImpl.submitJob(JobManagementImpl.java:114)
    at com.teamAlpha.airavata.facade.Main.monitor(Main.java:46)
    at com.teamAlpha.airavata.facade.Main.main(Main.java:32)
ajinkya-dhamnaskar commented 8 years ago

From the exception it seems path to the private key is not set. I would suggest you to put your public key on karst for your profile instance and copy appropriate private key for the same on your system and in user_input.properties provide correct path to the private key. Above path is for the key that Pratik uses to connect to server from his own system. Your path would definitely be different. I would suggest you to search for the instruction here https://github.com/airavata-courses/TeamAlpha/blob/master/Airavata_Remote_Job_Runner/Instructions/readme.txt

patel99 commented 8 years ago

Anuj, It is a bad practice to provide your private key to others, hence instead of providing hard coded private key in the project, we are taking private key file as an input from user. As ajinkya mentioned, you will have to put your public key on karst for your profile instance. Instructions on how to use ssh public key authentication can be found at: https://kb.iu.edu/d/aews

Kindly mark this issue as closed if you are not getting this error any more.

Thanks.

anujbhan commented 8 years ago

Yes, I found out what went wrong. Hadn't changed the property file correctly. Closing the issue