Cannot establish connection while opening project that uses Remote Linux host

已回答

Hi colleagues,

I am working with a project that uses Remote Linux host.

Every time opening this project, I get the message «CMake executable not found: /usr/bin/cmake Configure».

Then I turn to Build, Execution, Deployment > Toolchains.

My settings there are:

               Remote Linux host

               Credentials: ssh://yuri@192.168.253.129:22

               Authentication type: Password

There I see the message «Cannot establish connection».

Ok I turn into Build, Execution, Deployment > Deployment.

Then I press the Test connection button. I am waiting a few seconds and get the message «Successfully connected to 192.168.253.129».

Returning to the Toolchain I see «Connected». After that I can work with the CMake.

My question is why it doesn't work automatically? Maybe I didn't set something up?

Toolchain "Remote Host" was created and configured by me. The corresponding Deployment settings were created automatically based on this Toolchain.

Best regards,

Yuri Markov

I am using CLion 2019.1.4, Windows 7, CentOS Linux release 7.6.1810

0

Hi Yuri! Is the "Save password" option checked in the toolchain settings? Is the password saved or is it lost when you open the settings?

0

Hi Anna! Surely the first thing I checked was whether the "Save password" option is selected. When I open the settings, the password is displayed as dots. And I think its value is, as I have defined. At least I tried to save it again. Is there any hidden option here?

0

No, no hidden option, but, unfortunately, password might get lost in some cases although the option is enabled. Could you please open File | Settings | Appearance & Behavior | System Settings | Passwords and select to save the passwords in KeePass instead of a native Keychain, just in case? Does the issue still persist after that?

0

Anna, it's good idea. I never opened this option before (because I am a beginner with the CLion).

And what I see there.

Save passwords:

(*) In KeePass

     Database: C:\Users\Юра\.CLion2019.1\config\c.kdbx

( ) Do not save. . .

Ok, and how can I save my password here? "In KeePass" was just chosen ;)

 

0

Yuri,

Please do the following:

  1. Set clion.remote.test.connection.timeout=15000 in Help -> “Edit Custom Properties…”;
  2. Restart CLion;
  3. Create new remote-toolchain and try to use it instead of the old one.

Does it help?

1

Thank you, Anna! You have really helped me. Your solution works good for me!
I think such long timeout is required because of my network.

My next question will be on how configure the Custom Build Targets :)

The program, external tool, which I define there (make for example), runs locally but not on remote host. Is it possible to run it on remote host?

0

So I can't use External Tools with Full Remote Mode, is this true?

This link on help is what I used to configure my project.

0

Yes, that's true. And you can't work with Compilation Database projects in the full remote mode for now.

There are Remote SSH External Tools: https://www.jetbrains.com/help/clion/settings-tools-remote-ssh-external-tools.html. You can try configuring and using them to run a command over SSH.

0

It's wonderful, thank you very much for the information. I will try it.
I already found the CLion is a suitable tool for my work.

0

请先登录再写评论。