** Changed in: openqa (Ubuntu)
       Status: New => Opinion

-- 
You received this bug notification because you are a member of
Canonical's Ubuntu QA, which is subscribed to openqa in Ubuntu.
https://bugs.launchpad.net/bugs/2006699

Title:
  apparmor deny openqa-webui access after system reboot

Status in openqa package in Ubuntu:
  Opinion

Bug description:
  This bug can be re-produced.

  STEP 1: install openqa by `sudo apt install openqa openqa-client 
openqa-common openqa-doc openqa-worker os-autoinst`, then check 
openqa-webui.service. it runs ok.
  STEP 2: reboot system
  STEP 3: after system reboot, check openqa-webui.service again, it runs fails. 
The error message prove that access to postgresql local socket is denied.

  ======================
  × openqa-webui.service - The openQA web UI
       Loaded: loaded (/lib/systemd/system/openqa-webui.service; enabled; 
vendor preset: enabled)
       Active: failed (Result: exit-code) since Thu 2023-02-09 15:41:46 CST; 
24min ago
         Docs: https://open.qa/docs/#_run_the_web_ui
      Process: 706327 ExecStart=/usr/share/openqa/script/openqa-webui-daemon 
(code=exited, status=13)
     Main PID: 706327 (code=exited, status=13)
          CPU: 888ms

  Feb 09 15:41:45 saturn systemd[1]: Started The openQA web UI.
  Feb 09 15:41:46 saturn openqa-webui-daemon[706327]: Error when trying to get 
the database version: DBIx::Class::Storage::DBI::catch {...} (): DBI Connection 
failed: DBI connect('dbname=openqa','',...) failed: connection to server on 
socket "/var/run/postgresql/.s.PGSQL.5432" failed: Permission denied
  Feb 09 15:41:46 saturn openqa-webui-daemon[706327]:         Is the server 
running locally and accepting connections on that socket? at 
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1639. at inline delegation in 
DBIx::Class::DeploymentHandler::VersionStorage::Standard for 
version_rs->database_version (attribute declared in 
/usr/share/perl5/DBIx/Class/DeploymentHandler/VersionStorage/Standard.pm at 
line 26) line 18
  Feb 09 15:41:46 saturn openqa-webui-daemon[706327]: 
DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed: DBI 
connect('dbname=openqa','',...) failed: connection to server on socket 
"/var/run/postgresql/.s.PGSQL.5432" failed: Permission denied
  Feb 09 15:41:46 saturn openqa-webui-daemon[706327]:         Is the server 
running locally and accepting connections on that socket? at 
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1639. at inline delegation in 
DBIx::Class::DeploymentHandler for deploy_method->txn_do (attribute declared in 
/usr/share/perl5/DBIx/Class/DeploymentHandler/WithApplicatorDumple.pm at line 
51) line 18
  Feb 09 15:41:46 saturn systemd[1]: openqa-webui.service: Main process exited, 
code=exited, status=13/n/a
  Feb 09 15:41:46 saturn systemd[1]: openqa-webui.service: Failed with result 
'exit-code'.
  ======================

  after redirect postgresql log to syslog, I found this related with
  apparmor block behavior.

  below image links prove:

  https://i.stack.imgur.com/vWlYL.png

  ProblemType: Bug
  DistroRelease: Ubuntu 22.04
  Package: openqa 4.6.1640268275.25ac0d7-2 [modified: 
lib/systemd/system/openqa-gru.service]
  ProcVersionSignature: Ubuntu 5.15.0-60.66-generic 5.15.78
  Uname: Linux 5.15.0-60-generic x86_64
  ApportVersion: 2.20.11-0ubuntu82.3
  Architecture: amd64
  CasperMD5CheckResult: pass
  CurrentDesktop: ubuntu:GNOME
  Date: Thu Feb  9 15:50:52 2023
  InstallationDate: Installed on 2022-11-15 (86 days ago)
  InstallationMedia: Ubuntu 22.04.1 LTS "Jammy Jellyfish" - Release amd64 
(20220809.1)
  PackageArchitecture: all
  SourcePackage: openqa
  UpgradeStatus: No upgrade log present (probably fresh install)
  modified.conffile..etc.openqa.database.ini:
   [production]
   dsn = dbi:Pg:dbname=openqa
   
   [development]
   dsn = dbi:Pg:dbname=openqa
  mtime.conffile..etc.openqa.database.ini: 2023-02-09T10:41:47.504204

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openqa/+bug/2006699/+subscriptions


-- 
Mailing list: https://launchpad.net/~canonical-ubuntu-qa
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~canonical-ubuntu-qa
More help   : https://help.launchpad.net/ListHelp

Reply via email to