The DMX Debian Package

There seems to be a problem with the System Unit file. My log file just reported:

/lib/systemd/system/dmx.service:12: PIDFile= references path below legacy directory /var/run/, updating /var/run/dmx/dmx.pid → /run/dmx/dmx.pid; please update the unit file accordingly.

See the Check out our DMX Admin Documentation topic for my earlier finding:

@jpn DMX 5.0-beta-7 is running 24/7 on my FreedomBox. Only issues I have:

  1. Serve DMX from a path prefix
  2. This PIDFILE issue, where the logs says “please update the unit file accordingly.” Do you know how to do that?

BTW Can I be of any assistance, to get the DMX package distributed through Debian repositories? As I recall, you had begun to clarify what we had to do to achieve this.

Hi Ralf, I will have to look into that and then get back to you asap.

Hi Ralf, not sure about the status of this issue at your end, but here is what I found out about it: when installing DMX this symlink should be created: /etc/systemd/system/multi-user.target.wants/dmx.service -> /lib/systemd/system/dmx.service. Let me know if you can find that link on your freedombox or not, pls.

I am not sure what exactly the problem is, but when you edit the PIDFile=/var/run/dmx/dmx.pid in dmx.service, you could try to adjust it to your local requirements.

Here is the todo list:

  1. File an ITP. | done
  2. Do the work. | in progress
  3. Publish the package.
  4. Look for sponsors, usually starting with filing an RFS.

See https://mentors.debian.net/intro-maintainers for more details on this
workflow.

A comment from a sponsor also was:

Looks like your git repo doesn’t contain a source package tree, only some
teemplates for it, you’ll need a proper source package, correctly
buildable in a minimal sid chroot, to get it sponsored.
You also need to run lintian on the source package, not just on the binary
ones.

I have received a more detailed feedback from another sponsor and it will be quite an effort to make it happen. But I am willing to do that, even if it might take a while. Any help is most welcome. One issue for example is the whole license topic:

Debian takes copyright and license information very seriously; if
there is any doubt on the license of some file, it might need to be
removed from the set of packaged files through a +dfsg modification.
Therefore it is highly advised that the license of each source file in
the upstream source code be very clear. The safest if you can is to
add to each nontrivial source file the copyright line of each
contributor with the years of contributions, and indicate which
license applies to this file (and in particular if it is AGPL3 strict
or “AGPL3 or later”); this is the case for the GNU project.

Could that be something for you to help us? Or if not, what were you thinking of?

@jpn Yes, Juergen, that file does exist:

3128 0 lrwxrwxrwx 1 root root 31 Dec 11  2019 /etc/systemd/system/multi-user.target.wants/dmx.service -> /lib/systemd/system/dmx.service

with the following content:

[Unit]
Description=DMX - The Context Machine
Documentation=https://docs.dmx.systems
After=network.target


[Service]
Type=simple
User=dmx
Group=dmx
Environment=JAVA_XMS=128
Environment=JAVA_XMX=256
ExecStartPre=/bin/mkdir -p /var/run/dmx
PIDFile=/var/run/dmx/dmx.pid
WorkingDirectory=/usr/share/dmx
PermissionsStartOnly=true
SyslogIdentifier=DMX

ExecStart=/usr/bin/java \
    -Xms${JAVA_XMS}M \
    -Xmx${JAVA_XMX}M \
    -Dfile.encoding=UTF-8 \
    -Dfelix.system.properties=file:/etc/dmx/config.properties \
    -Dfelix.config.properties=file:/etc/dmx/config.properties \
    -Dpidfile.path=/var/run/dmx/dmx.pid \
    -jar /usr/share/dmx/bin/felix.jar


[Install]
WantedBy=multi-user.target

/etc/systemd/system/multi-user.target.wants/dmx.service (END)

The problem is, that there is no such PIDFILE:

$ sudo ls -Filas /var/run/dmx/dmx.pid
ls: cannot access '/var/run/dmx/dmx.pid': No such file or directory

What should it say (content) and which access rights must be defined on the PIDFILE.
It was obviously not created during the installation.

@jpn @silke There seems to be an issue with the docs (DMX Admin Documentation) regarding Overview of directories: The mentioned System unit file could not be found under /etc/systemd/system/dmx.service as stated in the docs but as /etc/systemd/system/multi-user.target.wants/dmx.service -> /lib/systemd/system/dmx.service as Juergen explained in this thread.

Hi @RalfBarkow thanks a lot for the hint. I just corrected the path to the unit file in the documentation. As to the pid file: Is it possible that the pid file doesn’t get created because the dmx process cannot create the folder it goes into? Could you please try to create the folder /var/run/dmx manually and/or make the user dmx the owner of that folder? The pid file should then be created and we would have to fix the Debian package. Greetings!

1 Like

@silke @jpn Just want to let you know that dmx 5.01-11009 now runs on my FreedomBox. The automatic update from dmx 5.0-beta-7 initially failed. (“Error while installing package: installed dmx package post-installation script subprocess returned error exit status 1”) The notorious message "PIDFile= references path below legacy directory /var/run/, updating /var/run/dmx/dmx.pid → /run/dmx/dmx.pid; please update the unit file accordingly. " showed up again. After comparing and adjusting the /etc/dmx/config.properties (merged the diffs from config.properties.dpkg-dist), and as I got some exceptions, preventing the dmx service from starting, I did an ‘$ sudo apt-get --reinstall dmx’. Now DMX 5.0.1 is up and running! No need to look into the formerly reported issues from my side. (I do not have time to deal with it in detail right now.)

After an automatic update from DMX 5.0-beta7 to 5.0 or 5.0.1 (I can’t tell since when the error exists) the DMX Webclient doesn’t come up anymore. After inspecting the contents of /usr/share/dmx/bundle/ I can confirm that my instance is now running DMX version 5.0.1.

From my brower console I can only suspect that this might have to do with the case of a change in config properties file as the websockets server could not be found, as previously mentioned here.

Where can I find the diff of the changes made to the config.properties files in DMX 5.0

I currently get two errors in the browers console.

Error: Request failed with status code 404 (4 Times) GET http://x.y.z.0:8182/systems.dmx.webclient/c73114364f132319f119.main.js
Firefox kann keine Verbindung zu dem Server unter ws://x.y.z.0:8183/ aufbauen.

Sadly, I couldn’t find any release notes. Also the blogpost and the milestone board does not point to any such changes (see https://dmx.berlin/5-0-released/ which led me to https://git.dmx.systems/dmx-platform/dmx-platform/-/milestones/8).

To get back my instance, I probably will need to fix this manually. Can somebody point me to the docs informing me about this change? What do I need to do?

Thanks for your support!

Regarding changed websocket config parameters in 5.0 see
https://git.dmx.systems/dmx-platform/dmx-platform/-/issues/384#note_15573

The official DMX Release notes are always posted to this forum (in thread “General Discussion”). Since DMX 5.0-beta-7 the detailed changelog is just a link to the GitLab milestone tickets. This link is always part of the release notes. For 5.0 this is https://git.dmx.systems/dmx-platform/dmx-platform/-/milestones/8
(Note that the DMX release notes in the DMX blog are non-official.)

For versions 5.0 and 5.0.1 GitLab release notes were indeed missing. I’ve added them now: https://git.dmx.systems/dmx-platform/dmx-platform/-/releases
Thank you for the hint!