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

Client not working on Bash on Windows #781

Closed
sijuk opened this issue Jul 29, 2016 · 20 comments
Closed

Client not working on Bash on Windows #781

sijuk opened this issue Jul 29, 2016 · 20 comments

Comments

@sijuk
Copy link

sijuk commented Jul 29, 2016

When I try to use mosh as client with Bash on Windows, I get the following error:
Network exception: setsockopt: Invalid argument

I am not a developer and I know Bash on Windows is still in heavy development, but could this be something that can/needs be fixed in mosh?

Versions:
mosh 1.2.5 compiled from .tar.gz on this system (default repositories have 1.2.4a-1ubuntu1)
Windows 10 Insider Preview 14393

If you don't have access to Bash on Windows, I will gladly try to help, if you decide to look into this.

@Doridian
Copy link

Doridian commented Aug 2, 2016

I am having a similar problem on Bash for Windows (or Linux Subsystem for Windows):

All I get on a successful connection is this:

user@PC:~$ mosh user@host


[mosh is exiting.]

@glensc
Copy link

glensc commented Aug 2, 2016

check if other tools like tmux work:
https://blogs.msdn.microsoft.com/commandline/2016/06/08/tmux-support-arrives-for-bash-on-ubuntu-on-windows/

as i read PTY support is not complete there, but probably there are updates on that....

@Doridian
Copy link

Doridian commented Aug 2, 2016

tmux runs fine, screen just exits without an error like mosh

@cgull
Copy link
Member

cgull commented Aug 2, 2016

I thought I answered this days ago, but I'm wrong.

Mosh almost works in Windows Subsystem for Linux. Its pty support is now fine for Mosh. At this point, only one thing is keeping Mosh from working-- a missing socket option for path MTU discovery causes Mosh to exit. My position is that if Microsoft is offering Linux binary compatibility, this is their problem to fix. However, the fix would be easy, and we have discussed changing how we do MTU discovery anyway.

I have a branch with the necessary changes (and some extras), https://github.com/cgull/mosh/tree/wsl-workarounds-14361.

@Doridian
Copy link

Doridian commented Aug 2, 2016

@cgull Beautiful, I merged your branch with the latest of master (no significant changes, but if I build a nightly, might as well be latest) and now mosh works. Thanks :)

@cgull
Copy link
Member

cgull commented Aug 3, 2016

I forgot to mention, I've reported this and it's in their queue: microsoft/WSL#170

@nadimkobeissi
Copy link

I am also having this problem.

@cgull
Copy link
Member

cgull commented Sep 18, 2016

Please upvote https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/13413396-setsockopt-fd-ipproto-ip-ip-mtu-discover-fla to encourage Microsoft to do the right thing :)

@cgull
Copy link
Member

cgull commented Oct 13, 2016

The Microsoft people have heard your votes :)
microsoft/WSL#170 (comment)

@deadalnix
Copy link

While microsoft is getting its shit together, what are the workaround options ?

@cgull
Copy link
Member

cgull commented Jan 5, 2017

Compiling the above-mentioned branch from source, or using Mosh under Cygwin or Msys2 are all usable workarounds.

@deadalnix
Copy link

Thanks.

@metasoarous
Copy link

For the record, there's also this issue: microsoft/WSL#1140

@cgull
Copy link
Member

cgull commented Mar 26, 2017

Windows Insider build 15002 and later support Mosh, and in all likelihood that means it goes into the Windows Creator update as well.

@cgull cgull closed this as completed Mar 26, 2017
@deadalnix
Copy link

I can confirm it is fixed using insider builds.

@huyinjie
Copy link

@cgull I am waiting Creator Update,hoping it won't Disappoint me.

@hossbeast
Copy link

Just got the Windows Creator Update, and the first thing I did was boot up bash and try mosh.

Failure on the client with this error:
mosh: Nothing received from server on UDP port 60001.

Client
todd@hossbeast:~$ mosh --version
mosh 1.2.4a

Server (Ubuntu 16.04.1)
0 % mosh --version
mosh 1.2.5 [build mosh 1.2.5]

@hossbeast
Copy link

I built from source and updated both sides to mosh-1.3.0, and continue to receive the same error.

@cgull
Copy link
Member

cgull commented Jun 7, 2017

@hossbeast, mosh works fine for me on the Windows Creator 1703 build. The message you're getting is likely due to network connectivity issues, not issues with Windows itself. Windows firewall/AV software can be difficult in this area. Please try the troubleshooting tips in the FAQ at https://mosh.org.

@hossbeast
Copy link

@cgull thanks, I assumed from my reading of this thread there was some Windows fix I needed, and jumped to conclusions. I fixed the firewall issue, and it now appears to be working.

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

9 participants