Post Reply 
Updating to 2.2 from 2.1 that is a Windows Service doesn't work
15-01-2023, 04:21
Post: #1
Updating to 2.2 from 2.1 that is a Windows Service doesn't work
I am running mininserver as a Windows Service on Windows 10. When I tried to update to version 2.2 using the update link on the configuration website, http://192.168.0.4:9790/, it failed with an error I forgot to capture.

I then stopped the service and ran minimserver directly in my windows user account. Once it was running, I went to the configuration page again from the windows tray icon for minimserver (instead of minimwatch), clicked on the update button, and the update completed successfully.

I then killed the user process version of minimserver, and restarted the windows service. After restart, the windows service (as documented by minimwatch) was correctly running version 2.2 of minimserver.

Hence I have a workaround. I just wanted to report the bug.
Find all posts by this user
Quote this message in a reply
15-01-2023, 10:26
Post: #2
RE: Updating to 2.2 from 2.1 that is a Windows Service doesn't work
Thanks for reporting this. Please describe how you have configured MinimServer to run as a Windows service so that I can investigate the cause of this error.
Find all posts by this user
Quote this message in a reply
03-02-2023, 03:27
Post: #3
RE: Updating to 2.2 from 2.1 that is a Windows Service doesn't work
(15-01-2023 10:26)simoncn Wrote:  Thanks for reporting this. Please describe how you have configured MinimServer to run as a Windows service so that I can investigate the cause of this error.

I installed minimserver as a service following the directions of "skeptic Mike" in this post.

https://forum.minimserver.com/showthread...e=threaded
Find all posts by this user
Quote this message in a reply
18-02-2023, 17:51 (This post was last modified: 18-02-2023 18:09 by alleeiv.)
Post: #4
RE: Updating to 2.2 from 2.1 that is a Windows Service doesn't work
(15-01-2023 10:26)simoncn Wrote:  Thanks for reporting this. Please describe how you have configured MinimServer to run as a Windows service so that I can investigate the cause of this error.

For random reasons, I was thinking about this bug as I was walking around my neighborhood, and remembered the Windows Service runs under a special account with limited access, "NT Service\MinimService". This account didn't have write access to the directory where MinimServer is stored, "C:\Program Files\MinimServer"

Strangely, it also didn't appear to have read and execute privileges for this folder either, based on the "effective access" tab in the Properties>security>advanced tab for the folder, though the service ran fine. "All application packages" and "All Restricted Application Packages" also had read and execute authorization to the folder, so maybe that is why the service ran.

Anyway, I suspect the reason the 2.2 update didn't work was because the service didn't have authorization to write to the directory where minimserver is stored.

My usually login account has admin privileges, so that is likely why running minimserver in that account and upgrading worked. I have added the minimservice account to the list of accounts with write privileges (actually, full privileges) for that directory and the minimwatch directory, so hopefully upgrades using the service will work in the future.
Find all posts by this user
Quote this message in a reply
18-02-2023, 18:51 (This post was last modified: 18-02-2023 18:52 by simoncn.)
Post: #5
RE: Updating to 2.2 from 2.1 that is a Windows Service doesn't work
I thought of this but it doesn't explain why the Install button update failed. This button should not write anything to the C:\Program Files\MinimServer folder. It should write files into the C:\Users\your-user-name\AppData\Roaming\MinimServer folder.

Perhaps the problem is that your-user-name has a different value when running MinimServer as a Windows service.
Find all posts by this user
Quote this message in a reply
19-02-2023, 05:11
Post: #6
RE: Updating to 2.2 from 2.1 that is a Windows Service doesn't work
(18-02-2023 18:51)simoncn Wrote:  I thought of this but it doesn't explain why the Install button update failed. This button should not write anything to the C:\Program Files\MinimServer folder. It should write files into the C:\Users\your-user-name\AppData\Roaming\MinimServer folder.

Perhaps the problem is that your-user-name has a different value when running MinimServer as a Windows service.

I am not sure how AppData folders work for services, but it is definitely the case that the NT Service\MinimService account, under which Minimserver runs, does not have access to my personal AppData folder, which is under the account of media10\al lee.

I looked at where the links point in an admin account and my Al Lee account, and they both point to "C:\Program Files\MinimServer\lib\mserver.jar", but that looks like an old file...

...I am mystified. What is the name of the file that contains version 2.2?
Find all posts by this user
Quote this message in a reply
19-02-2023, 10:37
Post: #7
RE: Updating to 2.2 from 2.1 that is a Windows Service doesn't work
The executable files for 2.2 are in the folder C:\Users\your-user-name\AppData\Roaming\MinimServer\libext.

I will set this up on a test machine some time in the next few days and investigate what is causing the error.
Find all posts by this user
Quote this message in a reply
20-02-2023, 08:16 (This post was last modified: 20-02-2023 08:18 by alleeiv.)
Post: #8
RE: Updating to 2.2 from 2.1 that is a Windows Service doesn't work
(19-02-2023 10:37)simoncn Wrote:  The executable files for 2.2 are in the folder C:\Users\your-user-name\AppData\Roaming\MinimServer\libext.

I will set this up on a test machine some time in the next few days and investigate what is causing the error.

I found where my service gets its files:

C:\Windows\ServiceProfiles\MinimService\AppData\Roaming\MinimServer\libext

This is the AppData folder for the NT Service\MinimService account. The MinimService account has full control over the C:\Windows\ServiceProfiles\MinimService\ folder and all subfolders. This AppData directory does have the 2.2 versions of MinimServer jar files and others. In particular it has minimserver-update-238.jmpkg, which is the version of MinimServer running in the service (2.2 update 238).

This makes me think the update worked on the config page when the service was running, and just produced an error at the end spuriously. Otherwise, I don't know how this directory could have gotten populated. When I ran minimserver in my account, that would have updated my user account (Users\al lee) AppData, not the service account one.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)