Jigsaw-Code / outline-apps

Outline Client and Manager, developed by Jigsaw. Outline Manager makes it easy to create your own VPN server. Outline Client lets you share access to your VPN with anyone in your network, giving them access to the free and open internet.
https://getoutline.org/
Apache License 2.0
8.21k stars 1.35k forks source link

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

Open heilkit opened 2 months ago

heilkit commented 2 months ago

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 commented 2 months ago

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

SadeghSalman commented 2 months ago

Try

ufw disable

reboot server

and check again.

heilkit commented 2 months ago

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.

iloginov commented 1 month ago

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 commented 1 month ago

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.

AdriCQ commented 4 weeks ago

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

jyyi1 commented 3 weeks ago

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.

li11amy commented 2 weeks ago

the same problem :(