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

pS 5.1 Ubuntu22 ssupervisord pSconfig daemon fails Logger config #40

Closed
igarny opened this issue Apr 5, 2024 · 3 comments
Closed

pS 5.1 Ubuntu22 ssupervisord pSconfig daemon fails Logger config #40

igarny opened this issue Apr 5, 2024 · 3 comments
Assignees

Comments

@igarny
Copy link

igarny commented Apr 5, 2024

pSconfig service is not operational

>>>~/pstp-dkr/tmp$ dexect ps2 ps ax
    PID TTY      STAT   TIME COMMAND
      1 ?        Ss     0:00 /bin/sh -c /usr/bin/supervisord -c /etc/supervisord.conf
      7 ?        S      0:00 /usr/bin/python3 /usr/bin/supervisord -c /etc/supervisord.conf
     10 ?        S      0:00 /usr/bin/python3 /usr/lib/perfsonar/host_metrics/perfsonar_host_exporter
     11 ?        S      0:01 lsregistrationdaemon.pl
     12 ?        Ss     0:00 /usr/sbin/owampd -c /etc/owamp-server -R /var/run
     13 ?        S      0:00 /usr/lib/postgresql/14/bin/postgres -D /var/lib/postgresql/14/main -c config_file=/etc/postgresql/14/main/postgresql.conf
     19 ?        Sl     0:00 rsyslogd -n
     22 ?        Ss     0:00 /usr/sbin/twampd -c /etc/twamp-server -R /var/run
     35 ?        Ss     0:00 postgres: 14/main: checkpointer
     36 ?        Ss     0:00 postgres: 14/main: background writer
     37 ?        Ss     0:00 postgres: 14/main: walwriter
     38 ?        Ss     0:00 postgres: 14/main: autovacuum launcher
     39 ?        Ss     0:00 postgres: 14/main: stats collector
     40 ?        Ss     0:00 postgres: 14/main: logical replication launcher
     51 ?        S      0:00 /usr/bin/python3 /usr/lib/pscheduler/daemons/archiver --dsn @/etc/pscheduler/database/database-dsn
     52 ?        Sl     0:00 /usr/bin/python3 /usr/lib/pscheduler/daemons/runner --dsn @/etc/pscheduler/database/database-dsn
     53 ?        S      0:00 /usr/bin/python3 /usr/lib/pscheduler/daemons/scheduler --dsn @/etc/pscheduler/database/database-dsn
     54 ?        Sl     0:00 /usr/bin/python3 /usr/lib/pscheduler/daemons/ticker --dsn @/etc/pscheduler/database/database-dsn
     57 ?        Ssl    0:01 postgres: 14/main: pscheduler pscheduler [local] idle
     58 ?        Ss     0:00 postgres: 14/main: pscheduler pscheduler [local] idle
     59 ?        Ss     0:00 postgres: 14/main: pscheduler pscheduler [local] idle
     60 ?        Ss     0:00 postgres: 14/main: pscheduler pscheduler [local] idle
     62 ?        Ss     0:00 postgres: 14/main: pscheduler pscheduler [local] idle
     63 ?        Ss     0:00 postgres: 14/main: pscheduler pscheduler [local] idle
    225 pts/1    Rs+    0:00 ps ax

On my attempt to manually start it configparser.MissingSectionHeaderError: File contains no section headers.

>>>~/pstp-dkr/tmp$ dexecti ps2 /usr/bin/python3 /usr/lib/perfsonar/psconfig/bin/psconfig_pscheduler_agent --config=/etc/perfsonar/psconfig/pscheduler-agent.json --logger=/etc/perfsonar/psconfig/pscheduler-agent-logger.conf
Traceback (most recent call last):
  File "/usr/lib/perfsonar/psconfig/bin/psconfig_pscheduler_agent", line 58, in <module>
    logging.config.fileConfig(args.LOGGER_CONF)
  File "/usr/lib/python3.10/logging/config.py", line 70, in fileConfig
    cp.read(fname, encoding=encoding)
  File "/usr/lib/python3.10/configparser.py", line 699, in read
    self._read(fp, filename)
  File "/usr/lib/python3.10/configparser.py", line 1087, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
configparser.MissingSectionHeaderError: File contains no section headers.
file: '/etc/perfsonar/psconfig/pscheduler-agent-logger.conf', line: 1
'log4perl.logger.perfSONAR_PS=INFO, A1\n'
>>>~/pstp-dkr/tmp$

When starting without Logger

>>>~/pstp-dkr/tmp$ dexecti ps2 /usr/bin/python3 /usr/lib/perfsonar/psconfig/bin/psconfig_pscheduler_agent --config=/etc/perfsonar/psconfig/pscheduler-agent.json
2024-04-05 15:09:06,482 INFO pid=800 prog=psconfig_pscheduler_agent func=<module> line=99 msg=Starting pSConfig pScheduler agent
2024-04-05 15:09:06,482 INFO pid=800 prog=psconfig_pscheduler_agent func=<module> line=110 guid=79c8aa04-dcef-4a7d-8b5c-3d6ef4c276d8 msg=Running agent...
2024-04-05 15:09:06,552 INFO pid=800 prog=task_manager.py func=log_info line=556 action=list url=https://localhost/pscheduler msg=Getting task list from https://localhost/pscheduler
2024-04-05 15:09:06,616 ERROR pid=800 prog=task_manager.py func=log_error line=549 action=list url=https://localhost/pscheduler msg=Error getting task list from https://localhost/pscheduler: No task objects returned
2024-04-05 15:09:06,659 INFO pid=800 prog=task_manager.py func=log_info line=556 guid=79c8aa04-dcef-4a7d-8b5c-3d6ef4c276d8 action=delete msg=Deleting tasks
2024-04-05 15:09:06,659 INFO pid=800 prog=task_manager.py func=log_info line=556 guid=79c8aa04-dcef-4a7d-8b5c-3d6ef4c276d8 action=delete msg=No tasks marked for deletion
2024-04-05 15:09:06,659 INFO pid=800 prog=task_manager.py func=log_info line=556 guid=79c8aa04-dcef-4a7d-8b5c-3d6ef4c276d8 action=delete msg=Done deleting tasks
2024-04-05 15:09:06,659 INFO pid=800 prog=task_manager.py func=log_info line=556 guid=79c8aa04-dcef-4a7d-8b5c-3d6ef4c276d8 action=create msg=Creating tasks
2024-04-05 15:09:06,659 INFO pid=800 prog=task_manager.py func=log_info line=556 guid=79c8aa04-dcef-4a7d-8b5c-3d6ef4c276d8 action=create msg=No tasks to create
2024-04-05 15:09:06,659 INFO pid=800 prog=task_manager.py func=log_info line=556 guid=79c8aa04-dcef-4a7d-8b5c-3d6ef4c276d8 action=create msg=Done creating tasks
2024-04-05 15:09:06,660 INFO pid=800 prog=psconfig_pscheduler_agent func=<module> line=112 guid=79c8aa04-dcef-4a7d-8b5c-3d6ef4c276d8 msg=Agent completed running
2024-04-05 15:09:06,660 INFO pid=800 prog=psconfig_pscheduler_agent func=<module> line=127 guid=79c8aa04-dcef-4a7d-8b5c-3d6ef4c276d8 msg=Time until next record refresh is 3599.8226935863495 seconds
@igarny
Copy link
Author

igarny commented Apr 17, 2024

so the logger configuration file is there, but is full of references to perl and none for python

>>>docker exec -it ps1 cat /etc/perfsonar/psconfig/psconfig-pscheduler-agent-logger.conf
log4perl.logger.perfSONAR_PS=INFO, A1

  # uncomment to display log messages on the screen
#log4perl.appender.A1=Log::Dispatch::Screen

 # uncomment to log via syslog
#log4perl.appender.A1=Log::Dispatch::Syslog
#log4perl.appender.A1.facility=local5

  # comment to prevent logging to a file
log4perl.appender.A1=Log::Dispatch::FileRotate

# alter location of the log file below
log4perl.appender.A1.filename=/var/log/perfsonar/psconfig-pscheduler-agent.log
log4perl.appender.A1.max=7
log4perl.appender.A1.size=16777216
log4perl.appender.A1.mode=append
log4perl.appender.A1.permissions=sub{ 0644; }
log4perl.appender.A1.layout=Log::Log4perl::Layout::PatternLayout
log4perl.appender.A1.layout.ConversionPattern=%d %p pid=%P prog=%M line=%L %m%n

log4perl.logger.TaskLogger=INFO, A2

log4perl.appender.A2=Log::Dispatch::FileRotate

# alter location of the log file below
log4perl.appender.A2.filename=/var/log/perfsonar/psconfig-pscheduler-agent-tasks.log
log4perl.appender.A2.max=7
log4perl.appender.A2.size=16777216
log4perl.appender.A2.mode=append
log4perl.appender.A2.permissions=sub{ 0644; }
log4perl.appender.A2.layout=Log::Log4perl::Layout::PatternLayout
log4perl.appender.A2.layout.ConversionPattern=%d %p %m%n

log4perl.logger.TransactionLogger=INFO, A3

log4perl.appender.A3=Log::Dispatch::FileRotate

# alter location of the log file below
log4perl.appender.A3.filename=/var/log/perfsonar/psconfig-pscheduler-agent-transactions.log
log4perl.appender.A3.max=7
log4perl.appender.A3.size=16777216
log4perl.appender.A3.mode=append
log4perl.appender.A3.permissions=sub{ 0644; }
log4perl.appender.A3.layout=Log::Log4perl::Layout::PatternLayout
log4perl.appender.A3.layout.ConversionPattern=%d %p %m%n

@arlake228 arlake228 assigned arlake228 and igarny and unassigned arlake228 Apr 22, 2024
@igarny
Copy link
Author

igarny commented Apr 23, 2024

Hi Andy
I see you have assigned the ticket to me.
I have no clear instruction on what to check about it, so I rebuilt everything following the guide.
using /etc/apt/sources.list.d/perfsonar-5.1-snapshot.list

Now the system operates well and the change that I see is the LOGGER config file had been renamed.
NOW psconfig responds upon requests

STILL my observation is:
the perl references in the LOGGER config remain.

it is SAFE to close the ticket

@arlake228 arlake228 assigned arlake228 and unassigned igarny Apr 24, 2024
@igarny
Copy link
Author

igarny commented Apr 24, 2024

the issue had been fully addressed and static files on my side have confused me in my findings

@igarny igarny closed this as completed Apr 24, 2024
@github-project-automation github-project-automation bot moved this from Ready to Done in perfSONAR Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants