Jump to content

Cloud + Local Server + WSL


Recommended Posts

I'm using Plastic Cloud in distributed mode (so running a local server) on Windows. Everything works great.

Now I want to also use the plastic command line client `cm` from WSL. This seems straightforward enough, installed CM as per Linux instructions. However I am unable to get `cm` to connect to the local server which is running on the Windows localhost.

In a WINDOWS shell these all work:

cm.exe repository list 127.0.0.1:8084
cm.exe repository list localhost:8084
cm.exe repository list local

Now in the WSL shell this will fail:

cm repository list "$(hostname).local:8084"

with a timeout error 

Error: Failed to connect to DESKTOP-QC45BRD.local:8084 within the 3000 ms timeout. To increase the timeout, set SocketConnectTimeoutMillisec in client.conf. If the timeout happens during push/pull, configure server.conf.

 

I've made sure that the native localhost is indeed accessible from WSL, for example, `ssh $(hostname).local` will work.

Is there any way to get this working?

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...

Hi,

The local server is listening by default on port 8087, that's why it may be failing.

In any case, "local" is an alias for the servername and the port, so using "cm repolist local" should work.

Is that failing?

 

Best,

Héber.

Link to comment
Share on other sites

Running `cm repository list local` in WSL simply gives "Error: Connection refused". Note that it gives the same output for any ip/host which is definitely inaccessible, e.g. `cm repo list localhost:9001`.

It seems my server definitely runs on port 8084.

It also tried to disable any firewall which could prohibit traffic between WSL/Windows, but no luck. Far as I can tell every port should be accessbile from WSL.

Link to comment
Share on other sites

4 hours ago, Héber said:

From what I have seen, it seems that WSL is not able to resolve localhost properly. Could you try instead using the hostname of the machine?

 

 

I'm not sure what you mean. I believe this is exactly what I've done in the OP.

On 11/25/2022 at 2:38 PM, ytoporovskyy said:
cm repository list "$(hostname).local:8084"

 

Have you tried this from WSL and it works for you?

 

 

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...