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

Unable to connect. Username and password dialog not showing #158

Open
rhelms opened this issue Oct 7, 2021 · 5 comments
Open

Unable to connect. Username and password dialog not showing #158

rhelms opened this issue Oct 7, 2021 · 5 comments

Comments

@rhelms
Copy link

rhelms commented Oct 7, 2021

Hi

I'm running Xubuntu 21.04 with i3, and attempting to use openFortiGUI 0.9.5 installed from the https://apt.iteas.at/ repo.

When I try to connect to the configured VPN, the username and password dialogue does not show.

This is from the logs.

==> logs/openfortigui.log <==
Oct 7 17:46:07 openfortiGUI::Debug: "start-main::"
Oct 7 17:46:07 openfortiGUI::Warning: QMetaObject::connectSlotsByName: No matching signal for on_btnAddVPN_clicked()
Oct 7 17:46:07 openfortiGUI::Warning: QMetaObject::connectSlotsByName: No matching signal for on_btnDeleteVPN_clicked()
Oct 7 17:46:07 openfortiGUI::Warning: QMetaObject::connectSlotsByName: No matching signal for on_btnEditVPN_clicked()
Oct 7 17:46:07 openfortiGUI::Warning: QMetaObject::connectSlotsByName: No matching signal for on_btnCopyVPN_clicked()
Oct 7 17:46:07 openfortiGUI::Warning: QMetaObject::connectSlotsByName: No matching signal for on_btnAddGroup_clicked()
Oct 7 17:46:07 openfortiGUI::Warning: QMetaObject::connectSlotsByName: No matching signal for on_btnDeleteGroup_clicked()
Oct 7 17:46:07 openfortiGUI::Warning: QMetaObject::connectSlotsByName: No matching signal for on_btnEditGroup_clicked()
Oct 7 17:46:07 openfortiGUI::Warning: QMetaObject::connectSlotsByName: No matching signal for on_btnCopyGroup_clicked()
Oct 7 17:46:07 openfortiGUI::Warning: QObject::connect: No such signal vpnLogger::finished()
Oct 7 17:46:07 openfortiGUI::Warning: QObject::connect: No such signal vpnLogger::finished()
Oct 7 17:46:07 openfortiGUI::Debug: tiConfVpnProfile::readVpnProfiles() -> vpnprofile found: "/home/reuben-local/.openfortigui/vpnprofiles/OTW.conf"
Oct 7 17:46:07 openfortiGUI::Debug: MainWindow::refreshVpnProfileList() -> vpnprofiles found:: "OTW"
Oct 7 17:46:07 openfortiGUI::Debug: tiConfVpnProfile::readVpnProfiles() -> vpnprofile found: "/home/reuben-local/.openfortigui/vpnprofiles/OTW.conf"
Oct 7 17:46:07 openfortiGUI::Debug: OS not affected by SUDO-Preserve-Env fix or no supported OS found, osname:: "hirsute"
Oct 7 17:46:16 openfortiGUI::Debug: active-tab:: 0
Oct 7 17:46:16 openfortiGUI::Debug: start vpn: "OTW" active-tab:: 0
Oct 7 17:46:16 openfortiGUI::Debug: Start vpn:: "OTW"
Oct 7 17:46:16 openfortiGUI::Debug: add logger "/home/reuben-local/.openfortigui/main.conf"
Oct 7 17:46:16 openfortiGUI::Debug: tiConfVpnProfile::readVpnProfiles() -> vpnprofile found: "/home/reuben-local/.openfortigui/vpnprofiles/OTW.conf"
Oct 7 17:46:16 openfortiGUI::Debug: "start-vpn process::" "OTW"
Oct 7 17:46:16 openfortiGUI::Debug: "start-vpn process::config_file::" "/home/reuben-local/.openfortigui/main.conf"
Oct 7 17:46:16 openfortiGUI::Warning: "QLocalSocket::connectToServer: Invalid name"
Oct 7 17:46:16 openfortiGUI::Debug: tiConfVpnProfile::readVpnProfiles() -> vpnprofile found: "/home/reuben-local/.openfortigui/vpnprofiles/OTW.conf"
Oct 7 17:46:16 openfortiGUI::Warning: Socket not open
Oct 7 17:46:46 openfortiGUI::Warning: Socket not open
Oct 7 17:46:46 openfortiGUI::Debug: shutting down vpn process:: "OTW"
Oct 7 17:46:46 openfortiGUI::Debug: VPN process  "OTW"  finished!

However, when I run as root, or rather, via sudo openfortigui from the command line, everything works fine.

I do have the SUDO -E Option selected, but as you can see from the log, it may not be kicking in, or it may be totally unrelated.

I use this successfully on Xubuntu 20.04 running i3, although I'm on version 0.9.0, and I don't want to risk it not working by upgrading.

@rhelms
Copy link
Author

rhelms commented Oct 8, 2021

C++ isn't really my thing, but I've tried to follow the code, and what I think is happening is calls to apiServer.connectToServer(openfortigui_config::name) are failing due to "Invalid name" and the subsequent check to see if the socket is open is failing, hence "Socker not open".

In my install, I can see a socket getting created at /tmp/user/1000/openfortiGUI when the application is opened. While the socket file itself and the directory is owned by my local user, the parent directory is owned by root and does not allow group or other read access. This is likely a default of the Xubuntu setup. There is also a config-err-KATMCo file in the same directory that is rw by my user only.

In my 20.04 install, the same socket file is located under /tmp. Understandabley, the /tmp direct has rwx for ug and rwt for owner.

I wonder if a lack of read access by root (group) to /tmp/user/1000, and possibly execute, is causing the issue. I'll try some incremental changes to the permissions of those directories and see what happens.

@rhelms
Copy link
Author

rhelms commented Oct 8, 2021

Nope, that did not work. I tried changing the group of /tmp/user/1000 to be reuben-local and even fully opened permissions to rwx for /tmp/user/1000, but no dice. There must be something going on in connectToServer, rather than just testing that the socket is open.

@rhelms
Copy link
Author

rhelms commented Oct 11, 2021

Small update. The VPN side of things is working. If I supply the password in the config, then when I ask the GUI to Connect, and I complete the MFA side of things that the VPN server requires, the pppd session is started and works a treat. However, the GUI doesn't get any feedback about this, and the logs/openfortigui.log file has "openfortiGUI::Warning: Socket not open" spammed into it (every 2 seconds).

For completeness, another log

Oct 11 18:16:24 openfortiGUI::Debug: "start-main::"
Oct 11 18:16:25 openfortiGUI::Warning: QMetaObject::connectSlotsByName: No matching signal for on_btnAddVPN_clicked()
Oct 11 18:16:25 openfortiGUI::Warning: QMetaObject::connectSlotsByName: No matching signal for on_btnDeleteVPN_clicked()
Oct 11 18:16:25 openfortiGUI::Warning: QMetaObject::connectSlotsByName: No matching signal for on_btnEditVPN_clicked()
Oct 11 18:16:25 openfortiGUI::Warning: QMetaObject::connectSlotsByName: No matching signal for on_btnCopyVPN_clicked()
Oct 11 18:16:25 openfortiGUI::Warning: QMetaObject::connectSlotsByName: No matching signal for on_btnAddGroup_clicked()
Oct 11 18:16:25 openfortiGUI::Warning: QMetaObject::connectSlotsByName: No matching signal for on_btnDeleteGroup_clicked()
Oct 11 18:16:25 openfortiGUI::Warning: QMetaObject::connectSlotsByName: No matching signal for on_btnEditGroup_clicked()
Oct 11 18:16:25 openfortiGUI::Warning: QMetaObject::connectSlotsByName: No matching signal for on_btnCopyGroup_clicked()
Oct 11 18:16:25 openfortiGUI::Warning: QObject::connect: No such signal vpnLogger::finished()
Oct 11 18:16:25 openfortiGUI::Warning: QObject::connect: No such signal vpnLogger::finished()
Oct 11 18:16:25 openfortiGUI::Debug: tiConfVpnProfile::readVpnProfiles() -> vpnprofile found: "/home/reuben-local/.openfortigui/vpnprofiles/OTW.conf"
Oct 11 18:16:25 openfortiGUI::Debug: MainWindow::refreshVpnProfileList() -> vpnprofiles found:: "OTW"
Oct 11 18:16:25 openfortiGUI::Debug: tiConfVpnProfile::readVpnProfiles() -> vpnprofile found: "/home/reuben-local/.openfortigui/vpnprofiles/OTW.conf"
Oct 11 18:16:25 openfortiGUI::Debug: OS not affected by SUDO-Preserve-Env fix or no supported OS found, osname:: "hirsute"
Oct 11 18:16:37 openfortiGUI::Debug: active-tab:: 0
Oct 11 18:16:37 openfortiGUI::Debug: start vpn: "OTW" active-tab:: 0
Oct 11 18:16:37 openfortiGUI::Debug: Start vpn:: "OTW"
Oct 11 18:16:37 openfortiGUI::Debug: add logger "/home/reuben-local/.openfortigui/main.conf"
Oct 11 18:16:37 openfortiGUI::Debug: tiConfVpnProfile::readVpnProfiles() -> vpnprofile found: "/home/reuben-local/.openfortigui/vpnprofiles/OTW.conf"
Oct 11 18:16:37 openfortiGUI::Debug: "start-vpn process::" "OTW"
Oct 11 18:16:37 openfortiGUI::Debug: "start-vpn process::config_file::" "/home/reuben-local/.openfortigui/main.conf"
Oct 11 18:16:37 openfortiGUI::Warning: "QLocalSocket::connectToServer: Invalid name"
Oct 11 18:16:38 openfortiGUI::Debug: tiConfVpnProfile::readVpnProfiles() -> vpnprofile found: "/home/reuben-local/.openfortigui/vpnprofiles/OTW.conf"
Oct 11 18:16:38 openfortiGUI::Debug: vpnWorker::process::slot
Oct 11 18:16:38 openfortiGUI::Debug: 1633940198223 bytes avail:: 52
Oct 11 18:16:38 openfortiGUI::Debug: vpnProcess::onObserverUpdate::status_update "OTW" state 1
Oct 11 18:16:38 openfortiGUI::Debug: vpnProcess::onObserverUpdate::status_update2 "OTW" state 1
Oct 11 18:16:38 openfortiGUI::Warning: Socket not open
Oct 11 18:16:47 openfortiGUI::Debug: 1633940207899 bytes avail:: 118
Oct 11 18:16:48 openfortiGUI::Debug: 1633940208100 bytes avail:: 242
Oct 11 18:16:50 openfortiGUI::Debug: 1633940210589 bytes avail:: 291
Oct 11 18:16:51 openfortiGUI::Debug: vpnProcess::onObserverUpdate::status_update "OTW" state 2
Oct 11 18:16:51 openfortiGUI::Debug: vpnProcess::onObserverUpdate::status_update2 "OTW" state 2 ppp-interface:: ppp0
Oct 11 18:16:51 openfortiGUI::Warning: Socket not open
Oct 11 18:16:52 openfortiGUI::Warning: Socket not open

When I hit the Disconnect button, the UI crashes and I have to kill the background --start-vpn process.

@oviron
Copy link

oviron commented Dec 22, 2021

Got exatly the same issue with Ubuntu 21.10

I could provide log if needed, but every detail is the same.

@rhelms
Copy link
Author

rhelms commented Jun 20, 2022 via email

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

No branches or pull requests

2 participants