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

pkispawn with acme.cfg try to start tomcat daemon via systemctl with pki_systemd_service_create=False #4947

Open
AllanElleuch opened this issue Feb 3, 2025 · 0 comments

Comments

@AllanElleuch
Copy link

Hi,

I try to spawn an acme subsystem, however this is not going well in a container without booting on /usr/sbin/init.
The reason is that the spawn command is going to try to start the container. However, after reading

if config.str2bool(deployer.mdict['pki_systemd_service_create']):

I understand that this should not happen. For some reasons this work perfectly well with pki-ca image and the spawning of the CA container without systemd service. But the argument is not working in the case of the acme.cfg. So this looks more like a bug. Could you confirm me if it is a bug? If yes I can look to do a PR for fixing it.

acme.cfg

[DEFAULT]
pki_server_database_password=XX
pki_cert_chain_nickname=ca_signing

[Tomcat]
pki_systemd_service_create=False

[ACME]
pki_sslserver_nickname=sslserver
acme_database_type=ds
acme_database_url=XX
acme_database_bind_password=XX
acme_database_bind_dn=cn=Directory Manager
acme_database_auth_type=BasicAuth
acme_database_base_dn=XX
authType=BasicAuth


acme_issuer_type=pki
acme_issuer_username=caadmin
acme_issuer_url=XX
acme_issuer_password=XX

acme_realm_type=ds
acme_realm_url=XX
acme_realm_bind_password=XX
acme_realm_bind_dn=cn=Directory Manager
acme_realm_auth_type=BasicAuth
acme_realm_users_dn=XX
acme_realm_groups_dn=XX

spawn.log

INFO: Using default realm configuration
INFO: Using default database configuration
INFO: Using default realm configuration
1
Please check pkispawn logs in /var/log/pkispawn.log
################################################################################
################################################################################
Echo current process PID
System has not been booted with systemd as init system (PID 1). Can't operate.

  File "/usr/lib/python3.13/site-packages/pki/server/deployment/__init__.py", line 5874, in spawn
        ^^^^^^^^^^
Loading deployment configuration from /conf/acme/acme.cfg.
Please check pkispawn logs in /var/log/pkispawn.log
    self.spawn_acme()
    self.instance.start(
        max_wait=self.startup_timeout,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/subprocess.py", line 419, in check_call
  File "/usr/lib/python3.13/site-packages/pki/server/deployment/__init__.py", line 5594, in spawn_acme
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        timeout=self.request_timeout)
  File "/usr/lib/python3.13/site-packages/pki/server/__init__.py", line 455, in start
  File "/usr/lib64/python3.13/subprocess.py", line 419, in check_call
INFO: Using default metadata configuration
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/subprocess.py", line 419, in check_call
Installation log: /var/log/pkispawn.log
    deployer.spawn()
    ~~~~~~~~~~~~~~~^^
        max_wait=self.startup_timeout,
    self.instance.start(
  File "/usr/lib/python3.13/site-packages/pki/server/pkispawn.py", line 594, in main
    ~~~~~~~~~~~~~~~^^
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
################################################################################

Installing ACME into /var/lib/pki/pki-tomcat.

################################################################################
################################################################################
################################################################################
Echo current process PID
Failed to connect to system scope bus via local transport: Host is down
################################################################################
INFO: Using default realm configuration
INFO: Using default issuer configuration
Echo current process PID
ERROR: CalledProcessError: Command '['systemctl', 'start', '[email protected]']' returned non-zero exit status 1.
Failed to connect to system scope bus via local transport: Host is down
Spawn ACME component
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

1 participant