daserver usage and systemd call is wrong

Environment

All?

Description

NOTE: This is affecting more versions I believe (I checked 8.2.24, 8.2.22, and couple others).

Starting daserver in daemon mode through either systemctl or manually (daserver --daemon something)  is NOT working.

According to daserver usage:

 

Yet the code parsing arguments doesn't seem to care (at least at one point) about <instanceName>.

Now when starting daserver in interactive mode, this is not an issue.

When starting daserver in daemon mode, adding the <instanceName> will cause the program to exit right away.

The dali@mydali.service ExecStart is defined as such:

For reference:

https://github.com/hpcc-systems/HPCC-Platform/blob/community_8.2.26-1/dali/server/daserver.cpp#L429

When parsing arguments there, it just skips the --daemon argument, and no <instanceName> is collected/swallowed.

So the next argument will be "mydali" and it will fall in https://github.com/hpcc-systems/HPCC-Platform/blob/community_8.2.26-1/dali/server/daserver.cpp#L437 and exit.

Since daemon(1,0) is used, any standard output is redirected to /dev/null (correct me if I'm wrong). So it's impossible to notice that in say syslog or anywhere else at the moment.

 

 

Conclusion

None

relates to

Activity

Show:

Michael Gardner October 29, 2021 at 3:22 PM
Edited

environment: Ubuntu 20.04 LTS 3, systemd, hpccsystems-platform-community_8.2.26-1

when running manually with `sudo /opt/HPCCSystems/bin/daserver --daemon` and no <instanceName> argument, the write_pid portion of jutil.cpp is writing out a .pid file to /var/run/HPCCSystems, and there's another mydali.pid file being written out as well. Hunting down the culprit.

Michael Gardner October 28, 2021 at 5:05 PM

Yeah I'll take a look at this.

Jacob Cobbett-Smith October 28, 2021 at 3:58 PM

- could you take a look at this/comment?

Luc Pezet October 27, 2021 at 9:58 PM

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Components

Assignee

Reporter

Priority

Fix versions

Pull Request URL

Affects versions

Created October 27, 2021 at 9:01 PM
Updated November 1, 2021 at 4:55 PM
Resolved November 1, 2021 at 4:55 PM