mosh problems #171

Closed
opened 2022-08-01 14:32:16 +00:00 by fogti · 7 comments

I tried to install mosh using Nix

nix-env -iA nixpkgs.mosh

(.nix-profile/bin is added to PATH via fish -Ux "shared variables")
which somewhat worked, but mosh-server is broken...

$ mosh exozy.me
The locale requested by LANG=en_US.UTF-8 isn't available here.
Running `locale-gen en_US.UTF-8' may be necessary.

The locale requested by LANG=de_DE.UTF-8 isn't available here.
Running `locale-gen de_DE.UTF-8' may be necessary.

mosh-server needs a UTF-8 native locale to run.

Unfortunately, the local environment (LANG=en_US.UTF-8) specifies
the character set "US-ASCII",

The client-supplied environment (LANG=de_DE.UTF-8) specifies
the character set "US-ASCII".

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=de_DE.UTF-8
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES=en_US.UTF-8
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=
Connection to exozy.me closed.
/nix/store/70bipk4d3g7nx0hshm6k3nyq236q1f75-mosh-1.3.2/bin/.mosh-wrapped: Did not find mosh server startup message. (Have you installed mosh on your server?)


$ LC_ALL=en_US.UTF-8 mosh exozy.me
The locale requested by LANG=en_US.UTF-8 isn't available here.
Running `locale-gen en_US.UTF-8' may be necessary.

The locale requested by LC_ALL=en_US.UTF-8 isn't available here.
Running `locale-gen en_US.UTF-8' may be necessary.

mosh-server needs a UTF-8 native locale to run.

Unfortunately, the local environment (LANG=en_US.UTF-8) specifies
the character set "US-ASCII",

The client-supplied environment (LC_ALL=en_US.UTF-8) specifies
the character set "US-ASCII".

LANG=de_DE.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8
Connection to exozy.me closed.
/nix/store/70bipk4d3g7nx0hshm6k3nyq236q1f75-mosh-1.3.2/bin/.mosh-wrapped: Did not find mosh server startup message. (Have you installed mosh on your server?)

(mosh (https://mosh.org) is a partial ssh-"replacement", which piggybacks on ssh for connection establishment, and then runs the rest of the session using an UDP tty synchronization protocol, which has a lower bandwidth usage in case huge amounts of outputs are produced by the tty, useful in case an accidentially run command produces lots of output, making it hard to Ctrl+C it (e.g. diff on the wrong directory, or with wrong options), or when logging in via WLAN)

I tried to install `mosh` using Nix ``` nix-env -iA nixpkgs.mosh ``` (`.nix-profile/bin` is added to `PATH` via fish -Ux "shared variables") which somewhat worked, but `mosh-server` is broken... ``` $ mosh exozy.me The locale requested by LANG=en_US.UTF-8 isn't available here. Running `locale-gen en_US.UTF-8' may be necessary. The locale requested by LANG=de_DE.UTF-8 isn't available here. Running `locale-gen de_DE.UTF-8' may be necessary. mosh-server needs a UTF-8 native locale to run. Unfortunately, the local environment (LANG=en_US.UTF-8) specifies the character set "US-ASCII", The client-supplied environment (LANG=de_DE.UTF-8) specifies the character set "US-ASCII". locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory LANG=de_DE.UTF-8 LC_CTYPE="de_DE.UTF-8" LC_NUMERIC="de_DE.UTF-8" LC_TIME="de_DE.UTF-8" LC_COLLATE="de_DE.UTF-8" LC_MONETARY="de_DE.UTF-8" LC_MESSAGES=en_US.UTF-8 LC_PAPER="de_DE.UTF-8" LC_NAME="de_DE.UTF-8" LC_ADDRESS="de_DE.UTF-8" LC_TELEPHONE="de_DE.UTF-8" LC_MEASUREMENT="de_DE.UTF-8" LC_IDENTIFICATION="de_DE.UTF-8" LC_ALL= Connection to exozy.me closed. /nix/store/70bipk4d3g7nx0hshm6k3nyq236q1f75-mosh-1.3.2/bin/.mosh-wrapped: Did not find mosh server startup message. (Have you installed mosh on your server?) $ LC_ALL=en_US.UTF-8 mosh exozy.me The locale requested by LANG=en_US.UTF-8 isn't available here. Running `locale-gen en_US.UTF-8' may be necessary. The locale requested by LC_ALL=en_US.UTF-8 isn't available here. Running `locale-gen en_US.UTF-8' may be necessary. mosh-server needs a UTF-8 native locale to run. Unfortunately, the local environment (LANG=en_US.UTF-8) specifies the character set "US-ASCII", The client-supplied environment (LC_ALL=en_US.UTF-8) specifies the character set "US-ASCII". LANG=de_DE.UTF-8 LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=en_US.UTF-8 Connection to exozy.me closed. /nix/store/70bipk4d3g7nx0hshm6k3nyq236q1f75-mosh-1.3.2/bin/.mosh-wrapped: Did not find mosh server startup message. (Have you installed mosh on your server?) ``` (mosh (https://mosh.org) is a partial ssh-"replacement", which piggybacks on ssh for connection establishment, and then runs the rest of the session using an UDP tty synchronization protocol, which has a lower bandwidth usage in case huge amounts of outputs are produced by the tty, useful in case an accidentially run command produces lots of output, making it hard to Ctrl+C it (e.g. `diff` on the wrong directory, or with wrong options), or when logging in via WLAN)
a added the
bug
label 2022-08-01 15:37:27 +00:00
a added this to the (deleted) project 2022-08-01 15:37:31 +00:00
Owner

This seems to be a known Nix on non-NixOS bug. The wiki has a fix that may work: https://git.exozy.me/exozyme/exozyme/wiki/Nix#locale-warnings

This seems to be a known Nix on non-NixOS bug. The wiki has a fix that may work: https://git.exozy.me/exozyme/exozyme/wiki/Nix#locale-warnings
Owner

@zseri Would you like me to also install Mosh globally for all users? It seems like a really nice program and might be useful to others.

@zseri Would you like me to also install Mosh globally for all users? It seems like a really nice program and might be useful to others.
Author

For Mosh to work, it seems it also needs to be able to reach some additional ports...

$ mosh exozy.me



mosh did not make a successful connection to 99.46.207.19:60002.
Please verify that UDP port 60002 is not firewalled and can reach the server.

(By default, mosh uses a UDP port between 60000 and 61000. The -p option
selects a specific UDP port number.)
[mosh is exiting.]

@exozyme ~ [1]> nix-shell -p nettools

[nix-shell:~]$ netstat -tulpen
udp        0      0 192.168.1.64:60002      0.0.0.0:*                           1054       11185036   2684205/mosh-server 

Would you like me to also install Mosh globally for all users?

sure, you could do that (I won't require that, but I also don't have anything against it)

For Mosh to work, it seems it also needs to be able to reach some additional ports... ``` $ mosh exozy.me mosh did not make a successful connection to 99.46.207.19:60002. Please verify that UDP port 60002 is not firewalled and can reach the server. (By default, mosh uses a UDP port between 60000 and 61000. The -p option selects a specific UDP port number.) [mosh is exiting.] @exozyme ~ [1]> nix-shell -p nettools [nix-shell:~]$ netstat -tulpen udp 0 0 192.168.1.64:60002 0.0.0.0:* 1054 11185036 2684205/mosh-server ``` > Would you like me to also install Mosh globally for all users? sure, you could do that (I won't require that, but I also don't have anything against it)
fogti changed title from mosh locale problem to mosh problems 2022-08-02 11:55:05 +00:00
Owner

For Mosh to work, it seems it also needs to be able to reach some additional ports...

I opened up port 60000 for Mosh since I read that we only need to open as many ports as the number of concurrent users, which in this case is 1. If you would like to me to open more ports in the firewall, just ask!

> For Mosh to work, it seems it also needs to be able to reach some additional ports... I opened up port 60000 for Mosh since I read that we [only need to open as many ports as the number of concurrent users](https://security.stackexchange.com/a/15923), which in this case is 1. If you would like to me to open more ports in the firewall, just ask!
Author

I think you should open more than one (although 2 should suffice for my usage). And maybe open port 60001 instead of 60000, because it seems to default to 60001, and it seems to search upwards...

I think you should open more than one (although 2 should suffice for my usage). And maybe open port 60001 instead of 60000, because it seems to default to 60001, and it seems to search upwards...
Owner

Sounds good, I'll open ports 60001 and 60002 then.

Sounds good, I'll open ports 60001 and 60002 then.
fogti closed this issue 2022-08-02 17:37:13 +00:00
Author

03087e7a76/src/network/network.h (L136-L137)

    static const int PORT_RANGE_LOW  = 60001;
    static const int PORT_RANGE_HIGH = 60999;

ah, and the port range indeed starts at 60001.

https://github.com/mobile-shell/mosh/blob/03087e7a761df300c2d8cd6e072890f8e1059dfa/src/network/network.h#L136-L137 ```cxx static const int PORT_RANGE_LOW = 60001; static const int PORT_RANGE_HIGH = 60999; ``` ah, and the port range indeed starts at 60001.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: exozyme/exozyme#171
No description provided.