IPA, Failed to determine user credentials

Installation and configuration.
Post Reply
dagtm
Posts: 8
Joined: Thu Jan 10, 2019 7:34 am

IPA, Failed to determine user credentials

Post by dagtm »

Hi,

Had to redesign my server and pushed my users to ldap via FreeIPA. I have also removed previous installation and started new, fresh one.
After installing afserver, I did some initial settings :

Code: Select all

{"cgru_config":{
        "af_servername":"ipaserver.home.mydomain.com",
        "af_ipv6_disable":0,
        "af_ip_trust":["10.0.5.*"],

        "realm":"MYDOMAIN",
        "projects_root":["/jobs"]
}}

unfortunately this time server is not starting end errors out with message:
sudo systemctl status afserver

Code: Select all

● afserver.service - Afanasy server daemon
   Loaded: loaded (/opt/cgru/afanasy/systemd/afserver.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2019-03-27 23:23:45 PDT; 3min 54s ago
  Process: 9281 ExecStart=/opt/cgru/start/AFANASY/_afserver.sh -log_nodate (code=exited, status=217/USER)
 Main PID: 9281 (code=exited, status=217/USER)

Mar 27 23:23:45 ipaserver.home.mydomain.com systemd[1]: Started Afanasy server daemon.
Mar 27 23:23:45 ipaserver.home.mydomain.com systemd[9281]: afserver.service: Failed to determine user credentials: No such process
Mar 27 23:23:45 ipaserver.home.mydomain.com systemd[9281]: afserver.service: Failed at step USER spawning /opt/cgru/start/AFANASY/_afserver.sh: No such process
Mar 27 23:23:45 ipaserver.home.mydomain.com systemd[1]: afserver.service: Main process exited, code=exited, status=217/USER
Mar 27 23:23:45 ipaserver.home.mydomain.com systemd[1]: afserver.service: Failed with result 'exit-code'.
If I run afserver manually, it will run, but it will not connect to database:

Code: Select all

$ afserver
Executable path: /opt/cgru/afanasy/bin/afserver
Compilation date = 'Mar 11 2019 09:59:01'
CGRU version = '2.3.1'
Afanasy build version = '2.3.1'
Afanasy build revision = 'e77ad43e1cdddd19b148ddb2d43c9f3309054d1d'
Python version = '3.7.2'
GCC version = '8.3.1'
RLIMIT_NOFILE: Files descriptors limit: 1024
RLIMIT_NPROC: Processes (threads) limit: 96239
Database connection "AFDB_update" is not working.
Wed 27 Mar 23:36.37: INFO    Reading store file: "/var/tmp/afanasy/server.json"
AFERROR: AFDB_upTables: Database connect failed: could not connect to server: Connection refused
	Is the server running on host "localhost" (::1) and accepting
	TCP/IP connections on port 5432?
could not connect to server: Connection refused
	Is the server running on host "localhost" (127.0.0.1) and accepting
	TCP/IP connections on port 5432?

Wed 27 Mar 23:36.37: INFO    Getting renders from store...
Wed 27 Mar 23:36.37: INFO    1 renders found.
Render offline registered - "myworkstation".
Wed 27 Mar 23:36.37: INFO    1 renders registered.
Wed 27 Mar 23:36.37: INFO    Getting users from store...
Wed 27 Mar 23:36.37: INFO    1 users found.
Wed 27 Mar 23:36.37: INFO    1 users registered from store.
Wed 27 Mar 23:36.37: INFO    Getting branches from store...
Wed 27 Mar 23:36.37: INFO    1 branches found.
Wed 27 Mar 23:36.37: INFO    Root branch created from store.
Wed 27 Mar 23:36.37: INFO    1 branches registered from store.
Wed 27 Mar 23:36.37: INFO    Getting jobs from store...
Wed 27 Mar 23:36.37: INFO    1 jobs found.
Wed 27 Mar 23:36.37: INFO    System job retrieved from store.
Wed 27 Mar 23:36.37: INFO    1 jobs registered from store.
Wed 27 Mar 23:36.37: INFO    Raising 10 threads to process incoming connections...
Wed 27 Mar 23:36.37: Job registered: "afanasy"[1]: afadmin[0] - 16233 bytes.
Wed 27 Mar 23:36.37: INFO    Raising 10 threads to read/write sockets...
Wed 27 Mar 23:36.37: INFO    Raised 10 threads.
Wed 27 Mar 23:36.37: INFO    Run thread started.
Available addresses:
IP = '0.0.0.0'
IPv6 = '::'
Using IPv6 addresses family.
IPv4 connections addresses will be mapped to IPv6.
Wed 27 Mar 23:36.37: INFO    Listening 51000 port...
Wed 27 Mar 23:36.37: Render:  ON                     myworkstation@root[1] 10.0.5.4

Code: Select all

$ afcmd db_check
AFERROR: afanasy.cmd.Check: Database connect failed: could not connect to server: Connection refused
	Is the server running on host "localhost" (::1) and accepting
	TCP/IP connections on port 5432?
could not connect to server: Connection refused
	Is the server running on host "localhost" (127.0.0.1) and accepting
	TCP/IP connections on port 5432?


Database connection is NOT WORKING !
User avatar
timurhai
Site Admin
Posts: 911
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: IPA, Failed to determine user credentials

Post by timurhai »

Hi.
Authentication and af_ip_trust mask does not work now.
It happen long ago, on server architecture redesign, and was not rewritten for a new manner for now (it should be, and will be).
SQL database connection is needed for statistics only, since afserver got an own JSON store.
SQL connection has no relation with authentication and af_ip_trust mask.
Look at this: http://cgru.info/afanasy/server#statistics
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
Post Reply