Unattended install: Error running chown

I’m trying to use the unattended linux installer but it fails on chown, as the script seems to miss the username:

./Ignition-7.9.12-linux-x64-installer.run --mode unattended --prefix /opt/ignition-manual --unattendedmodeui minimal --edition edge --serviceuser ignition
Problem running post-install step. Installation may not complete correctly
 Error running chown -R  /opt/ignition-manual: chown: manca l'operando dopo "/opt/ignition-manual"
Try 'chown --help' for more information.

OTOH installing using the zip file I wasn’t able to undestand how to choose the platform, as it seems to just contain the full version…

What’s the correct way to install the Edge version, possibly unattended, with at least one of the two installer variant?

thanks

I think you have things mostly correct here, the only issue is the serviceuser param doesn’t really work as one would think - it literally just adds the user, it doesn’t change permissions on files to set that user as the owner, or attempt to run the Ignition service as that user.

Uninstall whatever is in /opt/ignition-manual and re-run the installer, this time using --username ignition instead of the serviceuser parameter.

1 Like

Thanks James, that worked out!

Unfortunately I ran into another issue: the installer would not create $destpath/jre-tmp, so was failing to start. Manually creating it made it work!

For your knowledge here’s the error:

INFO   | jvm 1    | 2019/10/09 21:29:39 | 21:29:39,196 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [DB]
INFO   | jvm 1    | 2019/10/09 21:29:39 | /opt/ignition/jre-tmp/sqlite-3.20.1-6ac7adf3-5d2d-4b79-802f-42749b790879-libsqlitejdbc.so.lck (No such file or directory)
INFO   | jvm 1    | 2019/10/09 21:29:39 | Failed to instantiate [ch.qos.logback.classic.LoggerContext]
INFO   | jvm 1    | 2019/10/09 21:29:39 | Reported exception:
INFO   | jvm 1    | 2019/10/09 21:29:39 | java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open_utf8([BI)V
INFO   | jvm 1    | 2019/10/09 21:29:39 |       at org.sqlite.core.NativeDB._open_utf8(Native Method)

after creating the path and assigning the owner to the correct user gateway finally started. I think this is an installer bug.

Out of curiosity, why the installer uses an old init script while the zip file installs a systemd unit file?

I’ll have to look into the jre-tmp folder creation issue some more, our code for gateway startup should be handling the creation of that folder (edit: installer isn’t creating folder for some reason), but I was having a similar issue on my Ubuntu VM with the folder not existing.

As for the init stuff, that’s the way it was implemented in the installer many moons ago when systemd and the like didn’t exist. Once it was discovered that newer versions of Debian and Ubuntu use systemd-sysv-generator to handle these legacy init scripts, it was left alone. The zips require you to use the shell script to install, which is an entire different mechanism (and I believe, will use systemd in most cases).