outline-apps icon indicating copy to clipboard operation
outline-apps copied to clipboard

[Bug]: Outline Client can't establish stable connection on Ubuntu 24.04

Open heilkit opened this issue 10 months ago • 32 comments

Application

Outline Client

Describe the bug

Can't establish stable connection to Outline server after upgrading to Ubuntu 24.04 with my own surely working OK Outline Server, instead client constantly tries to reconnect.

Everything was fine until the upgrade to Ubuntu 24.04, using Outline CLI gets you connected, but the client won't.

I'm including debug log below.

Steps to reproduce

  1. Get Linux machine/VM with Ubuntu 24.04
  2. Install AppImage from getoutline.com
  3. Try to establish stable connection to a server

What did you expect to happen?

No response

What actually happened?

DEBUG LOG (some keys where changed for privacy reasons)

username@host:~/Documents$ OUTLINE_DEBUG=true ./Outline-Client.AppImage 
Sentry Logger [log]: Starting Electron crashReporter
Sentry Logger [log]: Integration installed: SentryMinidump
Sentry Logger [log]: Integration installed: ElectronBreadcrumbs
Sentry Logger [log]: Integration installed: Net
Sentry Logger [log]: Integration installed: MainContext
Sentry Logger [log]: Integration installed: ChildProcess
Sentry Logger [log]: Integration installed: OnUncaughtException
Sentry Logger [log]: Integration installed: PreloadInjection
Sentry Logger [log]: Integration installed: AdditionalContext
Sentry Logger [log]: Integration installed: Screenshots
Sentry Logger [log]: Integration installed: RendererProfiling
Sentry Logger [log]: Integration installed: InboundFilters
Sentry Logger [log]: Integration installed: FunctionToString
Sentry Logger [log]: Integration installed: LinkedErrors
Sentry Logger [log]: Integration installed: Console
Sentry Logger [log]: Integration installed: Http
Sentry Logger [log]: Integration installed: Undici
Sentry Logger [log]: Integration installed: OnUnhandledRejection
Sentry Logger [log]: Integration installed: ContextLines
Sentry Logger [log]: Integration installed: LocalVariablesSync
Sentry Logger [log]: Integration installed: Modules
Sentry Logger [log]: Integration installed: RequestData
Sentry Logger [log]: Integration installed: MainProcessSession
Sentry Logger [log]: The preload script could not be injected automatically. This is most likely caused by bundling of the main process
Outline is starting
loading web app from file:///tmp/.mount_OutlinAiCFNQ/resources/app.asar/www/index_electron.html?debug=true&appName=Outline
Could not load active tunnel:  [Error: ENOENT: no such file or directory, open '/home/username/.config/Outline/connection_store'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/username/.config/Outline/connection_store'
}
connecting to abcdefgk-c4fe-429d-bdad-00000000000...
using tun2socks to check connectivity      
[EXIT - tun2socks]: Exited with code 0
UDP support: true
starting routing daemon
[STDERR - tun2socks]: 2024/04/28 11:11:43 tun2socks running...

tun2socks started
2024/04/28 11:11:43 tun2socks running...
connected to abcdefgk-c4fe-429d-bdad-00000000000
reconnecting to abcdefgk-c4fe-429d-bdad-00000000000
reconnected to abcdefgk-c4fe-429d-bdad-00000000000
using tun2socks to check connectivity
[EXIT - tun2socks]: Exited with code 0
reconnecting to abcdefgk-c4fe-429d-bdad-00000000000
reconnected to abcdefgk-c4fe-429d-bdad-00000000000
using tun2socks to check connectivity
[EXIT - tun2socks]: Exited with code 0
reconnecting to abcdefgk-c4fe-429d-bdad-00000000000
reconnected to abcdefgk-c4fe-429d-bdad-00000000000
using tun2socks to check connectivity
[EXIT - tun2socks]: Exited with code 0
reconnecting to abcdefgk-c4fe-429d-bdad-00000000000
reconnected to abcdefgk-c4fe-429d-bdad-00000000000
using tun2socks to check connectivity
[EXIT - tun2socks]: Exited with code 0

Outline Version

1.13.0 (475480)

What operation system are you using?

Linux

Operating System Version

Ubuntu 24.04 LTS x86_64

Screenshots and Videos

No response

heilkit avatar Apr 28 '24 08:04 heilkit

Previously I had Ubuntu 22.04, Outline Client was working perfectly there.

heilkit avatar Apr 28 '24 08:04 heilkit

Try

ufw disable

reboot server

and check again.

SadeghSalman avatar Apr 29 '24 15:04 SadeghSalman

I have no firewall on my server, my Outline app on the phone works just fine. A windows laptop, that I could get my hands on connects just fine too.

Server:

$ sudo ufw status
Status: inactive

Outline CLI works stable on my Ubuntu machine still.

heilkit avatar Apr 29 '24 17:04 heilkit

I am issuing this problem too. I'm using version 1.13.1.

Also, I have to start client with command ./Outline-Client.AppImage --no-sandbox to prevent error "The SUID sandbox helper binary was found, but is not configured correctly".

iloginov avatar May 24 '24 13:05 iloginov

Also I noticed the following behavior:

  1. Outline-Client runs 2 instances of tun2socks (I see it in ps ax | grep tun2socks)
  2. First instance works permanently but second one (with argument -checkConnectivity) periodically restarts (I see that PID changes in the output of ps ax command)
  3. When I run second one tun2socks from console (I copied it to home directory and start with arguments I saw in ps ax) it reports error Failed to open TUN device: ioctl: operation not permitted. When I run it with sudo it works and does not restart.

I used strace to see that it tries to open /dev/net/tun:

openat(AT_FDCWD, "/dev/net/tun", O_RDWR|O_NONBLOCK) = 3
ioctl(3, TUNSETIFF, 0xc000072bf8)       = -1 EPERM (Operation not permitted)

Also, on fresh Ubuntu 24.04 Outline-Client reports error

FATAL:setuid_sandbox_host.cc(157)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /tmp/.mount_OutlinMA3Lfs/chrome-sandbox is owned by root and has mode 4755.

when I start it without --no-sandbox.

It seems like SUID sandbox is the key here.

For now I use outline-cli from outline-sdk package.

iloginov avatar May 24 '24 19:05 iloginov

I have the same issue. How can i solve it ?

AdriCQ avatar Jun 01 '24 10:06 AdriCQ

Hi @heilkit @iloginov @AdriCQ , the sandbox issue seems to be caused by a known electron bug: https://github.com/electron/electron/issues/41066.

You may try these arguments when launching Outline: --no-sandbox --disable-gpu-sandbox.

And yes, please also feel free to continue using outline-cli instead.

jyyi1 avatar Jun 03 '24 19:06 jyyi1

the same problem :(

li11amy avatar Jun 12 '24 20:06 li11amy

Same problem here with ubuntu 23.10

I noticed these messages in the NetworkManager logs when the client is in the connect/disconnect loop

Jul 09 13:54:41 YYYYY NetworkManager[1253]: <warn>  [1720544081.9169] platform-linux: do-add-ip6-address[3: XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:]: failure 13 (Permission denied)
Jul 09 13:54:41 YYYYY NetworkManager[1253]: <warn>  [1720544081.9169] l3cfg[d0c580eb092b62c9,ifindex=3]: unable to configure IPv6 route: type unicast fe80::/64 dev 3 metric 1024 mss 0 rt-src ipv6ll
Jul 09 13:54:43 YYYYY NetworkManager[1253]: <warn>  [1720544083.9191] platform-linux: do-add-ip6-address[3: fe80::db23:ae37:e847:8687]: failure 13 (Permission denied)
Jul 09 13:54:43 YYYYY NetworkManager[1253]: <warn>  [1720544083.9192] platform-linux: do-add-ip6-address[3: XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:]: failure 13 (Permission denied)
Jul 09 13:54:45 YYYYY NetworkManager[1253]: <warn>  [1720544085.9211] platform-linux: do-add-ip6-address[3: fe80::5a87:35ab:a325:9aaa]: failure 13 (Permission denied)
Jul 09 13:54:45 YYYYY NetworkManager[1253]: <warn>  [1720544085.9211] platform-linux: do-add-ip6-address[3: XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:]: failure 13 (Permission denied)
Jul 09 13:54:47 YYYYY NetworkManager[1253]: <warn>  [1720544087.9238] platform-linux: do-add-ip6-address[3: fe80::f776:15d5:19ec:5e6b]: failure 13 (Permission denied)
Jul 09 13:54:47 YYYYY NetworkManager[1253]: <warn>  [1720544087.9239] platform-linux: do-add-ip6-address[3: XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:]: failure 13 (Permission denied)
Jul 09 13:54:49 YYYYY NetworkManager[1253]: <warn>  [1720544089.9246] platform-linux: do-add-ip6-address[3: fe80::940e:9ba7:42df:16c7]: failure 13 (Permission denied)
Jul 09 13:54:49 YYYYY NetworkManager[1253]: <warn>  [1720544089.9247] platform-linux: do-add-ip6-address[3: XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:]: failure 13 (Permission denied)
Jul 09 13:54:51 YYYYY NetworkManager[1253]: <warn>  [1720544091.9255] platform-linux: do-add-ip6-address[3: fe80::7b68:b204:b633:7758]: failure 13 (Permission denied)
Jul 09 13:54:51 YYYYY NetworkManager[1253]: <warn>  [1720544091.9256] platform-linux: do-add-ip6-address[3: XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:]: failure 13 (Permission denied)
Jul 09 13:54:53 YYYYY NetworkManager[1253]: <warn>  [1720544093.9281] ipv6ll[593412afebf2c5ba,ifindex=3]: changed: no IPv6 link local address to retry after Duplicate Address Detection failures (back off)
Jul 09 13:54:53 YYYYY NetworkManager[1253]: <warn>  [1720544093.9283] platform-linux: do-add-ip6-address[3: XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:]: failure 13 (Permission denied)
Jul 09 13:54:53 YYYYY NetworkManager[1253]: <warn>  [1720544093.9283] l3cfg[d0c580eb092b62c9,ifindex=3]: unable to configure IPv6 route: type unicast fe80::1/128 dev 3 metric 600 mss 0 rt-src ndisc pref high
Jul 09 13:54:53 YYYYY NetworkManager[1253]: <warn>  [1720544093.9283] l3cfg[d0c580eb092b62c9,ifindex=3]: unable to configure IPv6 route

ps: "XXXX" is hiding the IPV6 address

pffont avatar Jul 09 '24 17:07 pffont

Thanks @pffont for the logs. Outline will disable IPv6 when connecting: https://github.com/Jigsaw-Code/outline-apps/blob/13931fa8e3f0a1a40a607c47ec8f45593ff7e474/client/electron/linux_proxy_controller/outline_proxy_controller.cpp#L402

It's weird to see IPv6 routing logs, I'm not sure why. Maybe you can try the outline-cli mentioned above to see whether the same issue happens?

jyyi1 avatar Jul 09 '24 22:07 jyyi1

It's weird to see IPv6 routing logs, I'm not sure why. Maybe you can try the outline-cli mentioned above to see whether the same issue happens?

outline-cli is working perfectly @jyyi1

pffont avatar Jul 09 '24 22:07 pffont

same problem. Ubuntu 24.04

andprov avatar Aug 03 '24 16:08 andprov

same problem Ubuntu 24.04

lagunovartur avatar Aug 06 '24 07:08 lagunovartur

same problem Ubuntu 24.04

YoushaaMurhij avatar Aug 06 '24 09:08 YoushaaMurhij

same problem Ubuntu 24.04 LTS

germanovn avatar Aug 09 '24 19:08 germanovn

same problem after updating to ubuntu 24.04

goroption avatar Aug 30 '24 07:08 goroption

For an error such as

You need to make sure that ... chrome-sandbox is owned by root and has mode 4755

Using --no-sandbox is not recommended for security reasons.

So you can unpack AppImage archive and set owner/mod for the file chrome-sandbox like it said above. And then run Outline via AppRun.

Here is the commands. Suppose you downloaded Outline-Client.AppImage to ~/downloads:

cd ~/downloads
chmod 0766 Outline-Client.AppImage
./Outline-Client.AppImage --appimage-extract
cd squashfs-root/
sudo chown root:root chrome-sandbox 
sudo chmod 4755 chrome-sandbox

You'll got this: 2024-09-03_00-17

Now run ./AppRun, connect and see what you got:

$ ./AppRun 
Outline is starting
loading web app from file:///home/all/download/squashfs-root/resources/app.asar/client/www/index_electron.html?appName=Outline
Could not load active tunnel:  [Error: ENOENT: no such file or directory, open '/home/vijit/.config/Outline/connection_store'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/vijit/.config/Outline/connection_store'
}
APPIMAGE env is not defined, current application is not an AppImage
connecting to d4b6d4ed-58b1-405a-b3f6-9dcb66c15895...
using tun2socks to check connectivity
[EXIT - tun2socks]: Exited with code 0
UDP support: true
starting routing daemon
tun2socks started
connected to d4b6d4ed-58b1-405a-b3f6-9dcb66c15895
reconnecting to d4b6d4ed-58b1-405a-b3f6-9dcb66c15895
reconnected to d4b6d4ed-58b1-405a-b3f6-9dcb66c15895
using tun2socks to check connectivity
[EXIT - tun2socks]: Exited with code 0
reconnecting to d4b6d4ed-58b1-405a-b3f6-9dcb66c15895
reconnected to d4b6d4ed-58b1-405a-b3f6-9dcb66c15895
using tun2socks to check connectivity
[EXIT - tun2socks]: Exited with code 0
... over and over again...

VijitCoder avatar Sep 02 '24 17:09 VijitCoder

not sure the same but with ubuntu 24.04 i have "Unable to Connect: Invalid Access Key Error" (https://github.com/Jigsaw-Code/outline-server/issues/1591)

Zeus64 avatar Sep 06 '24 11:09 Zeus64

found a temporarily solution from another discuss - turn off ipv6 on active interface Right now problem is solved for my ubuntu 24.04

goroption avatar Sep 07 '24 11:09 goroption

I have exactly the same issue after upgrading to Ubuntu 24.04

I applied this patch

cd ~/downloads
chmod 0766 Outline-Client.AppImage
./Outline-Client.AppImage --appimage-extract
cd squashfs-root/
sudo chown root:root chrome-sandbox 
sudo chmod 4755 chrome-sandbox

as it is said above, and now it is running.

However, as soon as any traffic is happening, I am getting these messages in console:

using tun2socks to check connectivity
[EXIT - tun2socks]: Exited with code 0
reconnecting to 78dbda82-2259-4670-826c-7a3f83c2b6e0
reconnected to 78dbda82-2259-4670-826c-7a3f83c2b6e0
using tun2socks to check connectivity
[EXIT - tun2socks]: Exited with code 0
reconnecting to 78dbda82-2259-4670-826c-7a3f83c2b6e0
reconnected to 78dbda82-2259-4670-826c-7a3f83c2b6e0
using tun2socks to check connectivity
[EXIT - tun2socks]: Exited with code 0
reconnecting to 78dbda82-2259-4670-826c-7a3f83c2b6e0
reconnected to 78dbda82-2259-4670-826c-7a3f83c2b6e0
using tun2socks to check connectivity
...

image

and they are repeating and repeating: I am getting messages every second that something is being reconnected. What might be the problem?

ibobak avatar Sep 18 '24 21:09 ibobak

Dear developers of Outline, you did really a great job, but with Ubuntu 24 something is terribly wrong: connection is always lost, reconnecting multiple times. This needs to be fixed. It doesn't have to be like that.

ibobak avatar Sep 19 '24 07:09 ibobak

Same problem( Fix pls

hirebbec avatar Sep 30 '24 05:09 hirebbec

I had to re-install back my Ubuntu 22.04 (was 24.04) just to make Outline working. This is one of the key software on my PC, and if it doesn't work - this is a disaster for me.

ibobak avatar Sep 30 '24 07:09 ibobak

For me even on Ubuntu 22.04 it's not work :(

Zeus64 avatar Sep 30 '24 08:09 Zeus64

As it mentioned before, disabling of IPv6 on network interface helps. Al least in KUbuntu 24.04

VijitCoder avatar Sep 30 '24 08:09 VijitCoder

How you disable the IPv6

Zeus64 avatar Sep 30 '24 08:09 Zeus64

Don't forget to reboot after this change.

2024-09-30_16-01

VijitCoder avatar Sep 30 '24 09:09 VijitCoder

Thanks @VijitCoder , but i m on ubuntu server, i have no graphical interface :(

Zeus64 avatar Sep 30 '24 09:09 Zeus64

@Zeus64 How about this solution? It seems that it should work.

VijitCoder avatar Sep 30 '24 09:09 VijitCoder

My experience with latest appimage on ubuntu 22.04 and on fresh install of PopOs 22.04 :

  • after outline loses connection, it indicates in gui that connection is present. However ping does not show any connection.
  • pressing "disconnect" starts endless "disconnecting" loop.
  • killing the outline processes somehow brickes the network connection for the current session. Only reboot helps, not even log out
  • ip addr indicates "wifi" interface in down state. Switching states of the interfaces does nothing to restore connection. I doubt that it is a dns problem.
  • trying to restart via sudo systemctl restart NetworkManager sometimes helps, but usually not. resolvectl status does not show any anomaly.

outline cli, suggested by @jyyi1, currently works like a charm.

Mikluki avatar Oct 01 '24 19:10 Mikluki