Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --debug option #1

Closed
martjushev opened this issue Mar 16, 2021 · 8 comments
Closed

Add --debug option #1

martjushev opened this issue Mar 16, 2021 · 8 comments

Comments

@martjushev
Copy link

Feature request

clearml-session CLI should have a --debug argument, which would increase verbosity of logging.

Motivation:

There is a workstation behind NAT which has clearml-agent running. Invoking clearml-session on another machine fails:

Remote machine is ready
Setting up connection to remote session
Starting SSH tunnel
SSH tunneling failed, retrying in 3 seconds

it would be beneficial to understand why exactly tunneling fails. Currently there is no logging for that

except Exception as ex:
child.terminate(force=True)
child = None

Probably there are also other parts of code where extra debug logging could be handy

@bmartinn
Copy link
Member

Thanks @martjushev , I think you have a valid point here, and we should definitely add the ability to better debug the SSH connection.
Now we just need to figure out if we can get the pexpect to dump the console stdout it processed for us...
Let me check if we can somehow access this data

clearml-bot pushed a commit that referenced this issue Mar 18, 2021
@bmartinn
Copy link
Member

@martjushev just updating, --debug will now print all conda outputs during the venv setup :)

@norrishd
Copy link

@martjushev did you find a solution to this specific error message? I'm also getting it, and am a bit stuck as the relevant port is open, and the logs look normal on the agent side.

@martjushev
Copy link
Author

@martjushev did you find a solution to this specific error message? I'm also getting it, and am a bit stuck as the relevant port is open, and the logs look normal on the agent side.

No solution, only a workaround: I have set up my own profile in ~/.ssh/config for the server which runs clearml-agent. I run clearml-session until the point where it unsuccessfully tries to SSH into the server. I then Ctrl+C this process (which doesn't kill the session on the remote server) and then open my own SSH tunnel

@bmartinn
Copy link
Member

Hi @martjushev
Is this dues to having to use SSH keys to login into the container, or is it due to the double tunneling ?
What would we need to add to the session to do the tunneling for you?
(Basically I'm assuming you tunnel into the host machine, then you SSH into the container, is this correct?)

@martjushev
Copy link
Author

I'm not trying to SSH into the container, only into the host machine (which is enough to give me access to jupyter server). SSH connection to host machine initiated by clearml-session succeeds if I'm physically located in the same network as the host machine. Otherwise, I use ngrok to access the host machine. I assume that if I would be able to customize the args to ssh executable, then it would work (I would add the address + port provided by ngrok and IdentityFile + UseKeychain )

args = ['-N', '-C',

@bmartinn
Copy link
Member

SSH connection to host machine initiated by clearml-session succeeds if I'm physically located in the same network as the host machine

Yep I think this is the main issue,

Otherwise, I use ngrok to access the host machine.

ngrok basically does reverse proxy for you...

I assume that if I would be able to customize the args to ssh executable, then it would work (I would add the address + port provided by ngrok and IdentityFile + UseKeychain )

That is a great idea! what did you have in mind ?

@qwaxys
Copy link

qwaxys commented Nov 8, 2022

Closing this issue for now, the extra arguments will be added to the documentation. If you still have problems related to SSH or other things, feel free to open another issue and link to this one.

@qwaxys qwaxys closed this as completed Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants