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

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

Open
heilkit opened this issue Apr 28, 2024 · 21 comments
Open
Assignees
Labels

Comments

@heilkit
Copy link

heilkit commented Apr 28, 2024

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 heilkit added the bug Something is broken, we are tracking it label Apr 28, 2024
@heilkit
Copy link
Author

heilkit commented Apr 28, 2024

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

@SadeghSalman
Copy link

Try

ufw disable

reboot server

and check again.

@heilkit
Copy link
Author

heilkit commented Apr 29, 2024

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
Copy link

iloginov commented May 24, 2024

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
Copy link

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
Copy link

AdriCQ commented Jun 1, 2024

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

@jyyi1
Copy link
Contributor

jyyi1 commented Jun 3, 2024

Hi @heilkit @iloginov @AdriCQ , the sandbox issue seems to be caused by a known electron bug: electron/electron#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
Copy link

li11amy commented Jun 12, 2024

the same problem :(

@pffont
Copy link

pffont commented Jul 9, 2024

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

@jyyi1
Copy link
Contributor

jyyi1 commented Jul 9, 2024

Thanks @pffont for the logs. Outline will disable IPv6 when connecting:

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?

@pffont
Copy link

pffont commented Jul 9, 2024

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

@andprov
Copy link

andprov commented Aug 3, 2024

same problem. Ubuntu 24.04

@lagunovartur
Copy link

same problem Ubuntu 24.04

1 similar comment
@YoushaaMurhij
Copy link

same problem Ubuntu 24.04

@germanovn
Copy link

same problem Ubuntu 24.04 LTS

@sbruens sbruens added needs investigation and removed needs test Pull requests that require tests labels Aug 13, 2024
@goroption
Copy link

same problem after updating to ubuntu 24.04

@VijitCoder
Copy link

VijitCoder commented Sep 2, 2024

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...

@Zeus64
Copy link

Zeus64 commented Sep 6, 2024

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

@goroption
Copy link

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

@ibobak
Copy link

ibobak commented Sep 18, 2024

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
Copy link

ibobak commented Sep 19, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests