Closed w5pny closed 10 months ago
Thanks for reporting this. Are you running in --no-gui
mode?
If so, could you try editing line 65 of the 2023-11-01
version to start except Exception
rather than except ImportError
and see whether this helps?
I suspect the reason for this is that the previous approach didn't try importing GUI-mode requirements if the proxy was running in non-GUI mode. This was changed to support packaging the proxy as a python module, but didn't account for situations where you have pystray installed but it isn't set up.
Yes -- I run in --no-gui mode...
The edit you suggested on line 65 of the 2023-11-01 version DID solve the start up error and 2023-11-01 seems to be working ok now with this edit in place.
Hope this helps...
The syslog for starting version 2023-11-01 has "Unable to init server: Could not connect: Connection refused" repeated 3 times.
What is this about??? Is it to be expected???
The syslog follows:
Nov 3 08:22:49 maui systemd[1]: Started Email OAuth 2.0 Proxy.
Nov 3 08:22:49 maui python3[222683]: Unable to init server: Could not connect: Connection refused
Nov 3 08:22:49 maui python3[222683]: message repeated 3 times: [ Unable to init server: Could not connect: Connection refused]
Nov 3 08:22:50 maui Email OAuth 2.0 Proxy: Initialising Email OAuth 2.0 Proxy (version 2023-11-01) from config file /usr/local/lib/emailproxy/emailproxy.config
Nov 3 08:22:50 maui Email OAuth 2.0 Proxy: Starting IMAP server at [::]:1993 (unsecured) proxying outlook.office365.com:993 (SSL/TLS)
Nov 3 08:22:50 maui Email OAuth 2.0 Proxy: Starting POP server at [::]:1995 (unsecured) proxying outlook.office365.com:995 (SSL/TLS)
Nov 3 08:22:50 maui Email OAuth 2.0 Proxy: Starting SMTP server at [::]:1587 (unsecured) proxying smtp.office365.com:587 (STARTTLS)
Nov 3 08:22:50 maui Email OAuth 2.0 Proxy: Initialised Email OAuth 2.0 Proxy - listening for authentication requests. Connect your email client to begin
Nov 3 08:22:54 maui tracker-store[222616]: OK
Nov 3 08:22:54 maui systemd[3890]: tracker-store.service: Succeeded.
Nov 3 08:24:19 maui Email OAuth 2.0 Proxy: Accepting new connection from [::ffff:127.0.0.1]:38710 to POP server at [::]:1995 (unsecured) proxying outlook.office365.com:995 (SSL/TLS)
Nov 3 08:24:20 maui Email OAuth 2.0 Proxy: Rotating stored secrets for account w5pny@w5pny.com to use new cryptographic parameters
Nov 3 08:24:21 maui Email OAuth 2.0 Proxy: POP ([::]:1995; w5pny@w5pny.com) [ Successfully authenticated POP connection - releasing session ]
Nov 3 08:24:23 maui Email OAuth 2.0 Proxy: Accepting new connection from [::ffff:127.0.0.1]:38726 to POP server at [::]:1995 (unsecured) proxying outlook.office365.com:995 (SSL/TLS)
Nov 3 08:24:25 maui Email OAuth 2.0 Proxy: POP ([::]:1995; w5pny@w5pny.com) [ Successfully authenticated POP connection - releasing session ]
Nov 3 08:24:27 maui Email OAuth 2.0 Proxy: Accepting new connection from [::ffff:127.0.0.1]:54264 to POP server at [::]:1995 (unsecured) proxying outlook.office365.com:995 (SSL/TLS)
Nov 3 08:24:28 maui Email OAuth 2.0 Proxy: POP ([::]:1995; w5pny@w5pny.com) [ Successfully authenticated POP connection - releasing session ]
Nov 3 08:24:33 maui Email OAuth 2.0 Proxy: Accepting new connection from [::ffff:127.0.0.1]:54274 to POP server at [::]:1995 (unsecured) proxying outlook.office365.com:995 (SSL/TLS)
Nov 3 08:24:35 maui Email OAuth 2.0 Proxy: POP ([::]:1995; w5pny@w5pny.com) [ Successfully authenticated POP connection - releasing session ]
Nov 3 08:24:48 maui Email OAuth 2.0 Proxy: Accepting new connection from [::ffff:127.0.0.1]:42394 to POP server at [::]:1995 (unsecured) proxying outlook.office365.com:995 (SSL/TLS)
Nov 3 08:24:49 maui Email OAuth 2.0 Proxy: POP ([::]:1995; w5pny@w5pny.com) [ Successfully authenticated POP connection - releasing session ]
Great! Glad that has resolved this.
The other syslog message may also be related - you could try changing line 64 from import pystray
to pass
?
If that removes the message, I can partly incorporate the old behaviour just for pystray to work around this.
Changing "import pystray" to "pass" fixed those syslog messages!
Nov 3 10:08:19 maui systemd[1]: Started Email OAuth 2.0 Proxy.
Nov 3 10:08:19 maui Email OAuth 2.0 Proxy: Initialising Email OAuth 2.0 Proxy (version 2023-11-01) from config file /usr/local/lib/emailproxy/emailproxy.config
Nov 3 10:08:19 maui Email OAuth 2.0 Proxy: Starting IMAP server at [::]:1993 (unsecured) proxying outlook.office365.com:993 (SSL/TLS)
Nov 3 10:08:19 maui Email OAuth 2.0 Proxy: Starting POP server at [::]:1995 (unsecured) proxying outlook.office365.com:995 (SSL/TLS)
Nov 3 10:08:19 maui Email OAuth 2.0 Proxy: Starting SMTP server at [::]:1587 (unsecured) proxying smtp.office365.com:587 (STARTTLS)
Nov 3 10:08:19 maui Email OAuth 2.0 Proxy: Initialised Email OAuth 2.0 Proxy - listening for authentication requests. Connect your email client to begin
Great - thanks for confirming. I'll make this change when I get chance. Thanks for reporting this and helping find the root cause.
The version I've been running that was the current git September 12, 2023 runs fine, but the current version (11.1) won;t start because get_display() is passed an empty string.
Syslog:
Reverting to my previous version works fine....