ExLibrisGroup / alma-print-daemon

Application which listens for and prints letters from the Ex Libris Alma print queues.
BSD 3-Clause "New" or "Revised" License
11 stars 2 forks source link

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

Open JoeyEmbers opened 2 years ago

JoeyEmbers commented 2 years ago

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 commented 2 years ago

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 commented 1 year ago

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 commented 1 year ago

alma config

mgobat commented 1 year ago

@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 commented 1 year ago

@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 commented 1 year ago

I'm not seeing the .json file anywhere.

@.***

Joey Embers System & Network Administrator Linda Hall Library 816-926-8748 @.***

From: mgobat @.> Sent: Thursday, September 15, 2022 9:56 AM To: ExLibrisGroup/alma-print-daemon @.> Cc: Joey Embers @.>; Mention @.> Subject: Re: [ExLibrisGroup/alma-print-daemon] Running AlmaPrint Daemon as a service with version 2.0.0-beta-02 (Issue #59)

This message originated outside of LHL. Use caution when opening links or attachments.

@dregadhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdregad&data=05%7C01%7Cembersj%40lindahall.org%7C30978fa2e92f4c99c37908da972a6a64%7Cb1ef08800035404a9f3610ff75595c2d%7C0%7C0%7C637988505709825926%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C7000%7C%7C%7C&sdata=WruHsUCR8YXRvvpMVWrnfw6mM%2FJvoT8yhbjpOqsM3Tg%3D&reserved=0, 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.

- Reply to this email directly, view it on GitHubhttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FExLibrisGroup%2Falma-print-daemon%2Fissues%2F59%23issuecomment-1248218836&data=05%7C01%7Cembersj%40lindahall.org%7C30978fa2e92f4c99c37908da972a6a64%7Cb1ef08800035404a9f3610ff75595c2d%7C0%7C0%7C637988505709825926%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C7000%7C%7C%7C&sdata=7AemGKhkYuZXNokwzgtkpVrjObJWBMu%2B8AVhA2M2IWM%3D&reserved=0, or unsubscribehttps://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FA2TOL5VVR7VTBB6OZZJ3BW3V6M2ILANCNFSM57MUYI4Q&data=05%7C01%7Cembersj%40lindahall.org%7C30978fa2e92f4c99c37908da972a6a64%7Cb1ef08800035404a9f3610ff75595c2d%7C0%7C0%7C637988505709825926%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C7000%7C%7C%7C&sdata=y%2F4isoNma8c5n5cz7rQpIjQ6ofoXH87PhRf7dDxe5LA%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.**@.>>

mgobat commented 1 year ago

@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\\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 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago

@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 commented 1 year ago

From https://github.com/ExLibrisGroup/alma-print-daemon/issues/59#issuecomment-1297546473

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 https://github.com/ExLibrisGroup/alma-print-daemon/issues/59#issuecomment-1248218836

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

Not very intuitive or user-friendly...

mgobat commented 1 year ago

@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 commented 4 months ago

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 commented 4 months ago

@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 commented 4 months ago

@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

mgobat commented 4 months ago

@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 commented 4 months ago

Could be because it runs a as a different user?