Skip to content

Sometimes vplc start before local codemter service #4

Open

Description

@Leeable

sometimes vplc started before codemeter service leads to no license condition. maybe should add extra command in template.service?

[Unit]
Description=VPLCNEXTCONTROL CONTAINER
After=network.target

ConditionPathExists=/usr/lib/systemd/system/codemeter.service


[Service]
Type=simple

# fix when vplc service start before host codemeter
ExecCondition=/bin/bash -c "if [ -f /usr/lib/systemd/system/codemeter.service ]; then while ! systemctl is-active --quiet codemeter.service; do sleep 1; done; fi"

Activity

  1. OWarneke commented on Aug 25, 2025

    @OWarneke
    Member

    Hello @Leeable ,
    thanks for the info I haven´t run into those issues yet on my hardware.
    You are right in some circumstances you might want to add CodeMeter as a condition.
    Did you also test just using the default SystemD solution for service dependencies?
    e.g.:

    [Unit]
    Requires=codemeter.service
    After=codemeter.service

    This is however dependent on having CodeMeter running on the same installation at all.
    That is not always the case, sometimes an external CodeMeter instance is used instead.

    Maybe we can achieve a general solution instead or I will add another service template file to choose from during installation. (or maybe detect during installation if CodeMeter is installed on the host and decide depending on that)

    # If CodeMeter exists, wait for it to become active.
    ExecCondition=/bin/bash -c '
      if systemctl list-unit-files | grep -q codemeter.service; then
        echo " CodeMeter service exists, waiting for it to be active..."
        while ! systemctl is-active --quiet codemeter.service; do sleep 1; done
      else
        echo "CodeMeter service does not exist, continuing without waiting."
      fi
    '
  2. added
    enhancement
    on Aug 25, 2025
  3. self-assigned this
    on Aug 25, 2025
  4. Leeable commented on Aug 26, 2025

    @Leeable
    Author

    @OWarneke Hi, yes, I have encountered this situation, it happens about 3 times out of 20 or so. When this situation occurs, there is no license being used on codeMeter, I need to restart the container or use systemctl restart pclnext again.

    Did you also test just using the default SystemD solution for service dependencies?
    e.g.:
    [Unit]
    Requires=codemeter.service
    After=codemeter.service

    Nope, I decided not to use this method because it is not widely used. If I do not have CodeMeter installed on the host machine.

  5. added a commit that references this issue on Jun 23, 2026
    3814829
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions