Network unreachable in Geary.Devel flatpak

Since a few days I cannot use anymore Geary.Devel flatpak from gnome-nightly.

Looking at the logs the main suspect might be ipv6:

[deb] 16:10:15.0485 GLib-GIO:GSocketClient: Starting TCP connection attempt
 [deb] 16:10:15.0485 GLib-GIO:GSocketClient: Address enumeration completed (out of addresses)
 [deb] 16:10:15.0485 GLib-GIO:GSocketClient: Address enumeration failed: (null)
 [deb] 16:10:15.0485 GLib-GIO:GSocketClient: Connection failed: Could not connect to 2c0f:f930:0:4::108: Network is unreachable
 [deb] 16:10:15.0486 GLib-GIO:GSocketClient: Connection attempt failed: Network is unreachable
 [deb] 16:10:15.0486 GLib-GIO:GSocketClient: Starting new address enumeration
 [deb] 16:10:15.0486 Geary.Imap: [account_01] [imap] [connecting] GearyImapClientSession: Connecting send/recv error, dropping client connection: Could not connect to mail.DOMAIN.org: Network is unreachable
 [deb] 16:10:15.0626 Geary.Imap: [account_01] [imap] GearyImapClientService: Error creating new session for the pool: GIOError 38: "Could not connect to mail.DOMAIN.org: Network is unreachable"
 [deb] 16:10:15.0626 Geary.Imap: [account_01] [imap] GearyImapClientService: Status changed to: connection-failed
 [deb] 16:10:15.0795 Geary.Imap: [account_01] [imap] GearyImapClientService: Closing the pool, disconnecting 0 sessions

I tried disabling ipv6 in GNOME Settings, but the Apply button is not activated:

If I manually disable ipv6:

sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1

Connection error seems to go away.
But messages cannot be loaded.

[deb] 16:39:52.0204 geary:app-email-store.vala:150: EmailStore GearyImapEngineOtherAccount(account_01) running GearyAppFetchOperation on 1 emails
 [deb] 16:39:52.0228 Geary: [account_01] [>INBOX, open_count=3, remote_opened=true] GearyImapEngineOtherFolder: Scheduling folder close
 [deb] 16:39:52.0284 geary:web-process-extension.vala:56: Console: [ERROR] JAVASCRIPT undefined:166: ReferenceError: Can't find variable: _GearyWebExtension
 [deb] 16:40:38.0826 geary:util-connectivity-manager.vala:109: Checking if smtp.DOMAIN.org:465 reachable...

I cannot reproduce the problem anymore:

$ rpm-ostree status
State: idle
Deployments:
● ostree://fedora:fedora/34/x86_64/silverblue
                   Version: 34.20210306.n.0 (2021-03-06T08:06:05Z)
                BaseCommit: d4bec8745086a713fb74413edb11be1dd30a7b163b970547491f414627086499
              GPGSignature: Valid signature by 8C5BA6990BDB26E19F2A1A801161AE6945719A39
           LayeredPackages: libinput-utils
$ flatpak info org.gnome.Geary.Devel

Geary - Send and receive email

          ID: org.gnome.Geary.Devel
         Ref: app/org.gnome.Geary.Devel/x86_64/master
        Arch: x86_64
      Branch: master
     Version: 3.38
     License: LGPL-2.1+
      Origin: gnome-nightly
  Collection: org.gnome.Nightly
Installation: system
   Installed: 24.7 MB
     Runtime: org.gnome.Platform/x86_64/master
         Sdk: org.gnome.Sdk/x86_64/master

      Commit: 63c63bd5848dc3fa1445672362cf0992bdfd1fe839b2d961c135d2c3d0699337
      Parent: 530fddbe41889928878b89f2503880e096d10e0d43c920175bdd1eacc99c8cae
     Subject: Export org.gnome.Geary.Devel
        Date: 2021-03-06 01:04:46 +0000

Famous last words… now I’m reproducing 100% of times using either Geary or Geary.Devel flatpaks.

I guess the key error is:

GLib-GIO:GSocketClient: Address enumeration failed: (null)

Current versions:

Geary version: 40.alpha
Geary revision: pipelines/263509-0-g26978c4-dirty
GTK version: 3.24.26
GLib version: 2.67.5
WebKitGTK version: 2.31.90
Desktop environment: GNOME
Distribution name: GNOME
Distribution release: Nightly (Flatpak runtime)
Installation prefix: /app

This is a known bug and fix is coming:
https://bugzilla.redhat.com/show_bug.cgi?id=1932674

While waiting for it, it seems that changing the DNS server using nmcli fixes the network problem:

nmcli con mod 'NETWORK NAME' ipv4.dns "8.8.8.8 1.1.1.1"
nmcli con down 'NETWORK NAME'
nmcli con up 'NETWORK NAME'

No, adding other DNS servers did not solve the issue.
I’m having this problem again after a system&flatpak upgrade + reboot.

Glib bug?

[deb] 23:59:43.0717 GLib-GIO:GSocketClient: Starting new address enumeration
 [deb] 23:59:43.0726 GLib-GIO:GSocketClient: Address enumeration succeeded
 [deb] 23:59:43.0726 GLib-GIO:GSocketClient: Starting TCP connection attempt
 [deb] 23:59:43.0726 GLib-GIO:GSocketClient: Connection attempt failed: Network is unreachable
 [deb] 23:59:43.0726 GLib-GIO:GSocketClient: Starting new address enumeration
 [deb] 23:59:43.0726 GLib-GIO:GSocketClient: Address enumeration completed (out of addresses)
 [deb] 23:59:43.0726 GLib-GIO:GSocketClient: Address enumeration failed: (null)
 [deb] 23:59:43.0726 GLib-GIO:GSocketClient: Connection failed: Could not connect to 2c0f:f930:0:4::108: Network is unreachable
 [deb] 23:59:43.0726 Geary.Imap: [account_01] [imap] [connecting] GearyImapClientSession: Connecting send/recv error, dropping client connection: Could not connect to mail.autistici.org: Network is unreachable
 [deb] 23:59:43.0841 Geary.Imap: [account_01] [imap] GearyImapClientService: Error creating new session for the pool: GIOError 38: "Could not connect to mail.autistici.org: Network is unreachable"
 [deb] 23:59:43.0841 Geary.Imap: [account_01] [imap] GearyImapClientService: Closing the pool, disconnecting 0 sessions

Currently nightly is working fine for me, but if GLib’s sockets aren’t able to look up addresses when connecting, then that would indicate either a GLib bug or a system configuration issue.

Maybe try doing a flatpak update and see if that helps, if not file a GLib bug?

Let us know how it goes.

A good test is usually to try some other GLlib networking based apps - Web nightly would be a good example.

It’s not GLib, it’s a systemd issue.
Eventually I found the Fedora bug.

It seems solved with this version of systemd:

$ rpm -q systemd
systemd-248~rc2-3.fc34.x86_64

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.