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

Running AlmaPrint Daemon as a service with version 2.0.0-beta-02 #59

Open
JoeyEmbers opened this issue Aug 23, 2022 · 18 comments
Open

Running AlmaPrint Daemon as a service with version 2.0.0-beta-02 #59

JoeyEmbers opened this issue Aug 23, 2022 · 18 comments
Assignees
Labels
question Further information is requested

Comments

@JoeyEmbers
Copy link

I want to make sure I'm not missing something. Once nssm is installed and the daemon is running as a service there is no need to launch the GUI for the daemon unless you making configuration changes? I'm confused because when I do open the GUI is show the printing as being paused. Please advise.

Many Thank,
-Joey

@mgobat mgobat self-assigned this Aug 24, 2022
@mgobat mgobat added the question Further information is requested label Aug 24, 2022
@mgobat
Copy link
Contributor

mgobat commented Aug 24, 2022

Hi @JoeyEmbers. Yes, that is correct. If the application is being run as a service, the Alma Print Daemon GUI is only used for configuration changes. When run as a service, some of the configuration values are overridden "behind the scenes". It should ignore the fact that the configuration says printing is paused. If you are finding otherwise, please let us know.

@dregad
Copy link

dregad commented Sep 7, 2022

Thanks for this explanation @mgobat. I'm planning to test this later this week.

In the meanwhile, can you please clarify, what settings the service is using for the interval in minutes since the configuration appears to be user-specific (see #44).

@JoeyEmbers
Copy link
Author

alma config

@mgobat
Copy link
Contributor

mgobat commented Sep 14, 2022

@dregad, when running as a service, the alma-print-config.json in play should be the one owned by the logged in user....but you are using "Local System account" instead of a logged in user. Let me look into that for you.

@mgobat
Copy link
Contributor

mgobat commented Sep 15, 2022

@dregad, when running as the local system account, the alma-print-config.json should be in the C:\Windows\System32\config\systemprofile\AppData\Roaming\alma-print-daemon folder. This is also where the log will be written.

@JoeyEmbers
Copy link
Author

JoeyEmbers commented Sep 15, 2022 via email

@mgobat
Copy link
Contributor

mgobat commented Sep 15, 2022

@JoeyEmbers, what are the circumstances of your installation? Installed for all users, single user? Did you perform the configuration as a logged-in user? Is there a directory like C:\Users<logged-in-user>\AppData\Roaming\alma-print-daemon for the logged in user? The screenshot you provided earlier this week implies the file exists, if you had clicked the "Save and Continue Printing" button, of course. Thanks.

@JoeyEmbers
Copy link
Author

Sorry for the delay response I haven't been able to focus on this issue. I think I'm going to run through a fresh install. I just want to clarify the installation process. I need to log in as the user which will be running the Print Daemon service? I don't recall see the "Install for all users, single user" I'm assuming I want to choose all. I apricate the help and will report back.

@mgobat
Copy link
Contributor

mgobat commented Oct 31, 2022

@JoeyEmbers, installing for "all users" will have a single configuration file used by anyone logging into the workstation. If you install for a "single user", each user can have their own configuration file.

When running as a service, you need to specify the user who should be logged in to run the service.

@JoeyEmbers
Copy link
Author

I'm just now getting time to work on this again. We now have a specific user running the AlamPrint service. I'm still seeing the same behavior where print jobs don't render and print without having the Alma Print Daemon GUI open.
Alma Print GUI

@mgobat
Copy link
Contributor

mgobat commented Mar 21, 2023

@JoeyEmbers, is the log file being created when you run it as a service? Looking at your screenshots, the log file should be created in C:/users/aprint/AppData/Roaming/alma-print-daemon, and named log.alma-print-daemon. where is the current date.

@dregad
Copy link

dregad commented Jun 8, 2023

From #59 (comment)

installing for "all users" will have a single configuration file used by anyone logging into the workstation. If you install for a "single user", each user can have their own configuration file.

Sorry, but this is currently (2.0.0-beta.2) not the case - see #44

From #59 (comment)

when running as the local system account, the alma-print-config.json should be in the C:\Windows\System32\config\systemprofile\AppData\Roaming\alma-print-daemon folder. This is also where the log will be written.

Thanks for the info.

So what this means for me, is that I need to

  • login as my own user,
  • make changes to the configuration and save it,
  • copy %APPDATA%\alma-print-config.json to C:\Windows\System32\config\systemprofile\AppData\Roaming\alma-print-daemon\alma-print-config.json
  • restart the service

Not very intuitive or user-friendly...

@mgobat
Copy link
Contributor

mgobat commented Jul 6, 2023

@JoeyEmbers, just checking in. Have you had any luck with running as a service? You might want to look into the latest beta version, https://github.com/ExLibrisGroup/alma-print-daemon/releases/tag/v2.2.0-beta-03. It has a better implementation of a common configuration file that all logged in users may view/edit.

@dregad
Copy link

dregad commented Apr 22, 2024

FWIW, with #44 fixed we are now able to successrully run APD as a service.

It is somewhat confusing that when the service is running with the global configuration, it is still possible to pause/restart printing, shouldn't this option be disabled when the APD is already running ?

@mgobat
Copy link
Contributor

mgobat commented Apr 22, 2024

@dregad, do I understand that you are able to start a second instance of the Alma Print Daemon when it is already running as a service? Thanks.

@dregad
Copy link

dregad commented Apr 24, 2024

@mgobat thanks for the fast response.

you are able to start a second instance of the Alma Print Daemon when it is already running as a service?

I believe so. Please find below some screenshots to illustrate

  • Only APD service running
    image
  • Interactive session + APD service running
    image
  • Interactive session running + APD service stopped
    image

@mgobat
Copy link
Contributor

mgobat commented Apr 24, 2024

@dregad, thanks for the additional details. We do check for an existing instance and terminate the app if it finds one. So, there must be something different when the app is running as service. We'll take a look.

@dregad
Copy link

dregad commented Apr 24, 2024

Could be because it runs a as a different user?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants