Page 1 of 2

MediaSharing as a service? [#11274]

Posted: Tue Aug 20, 2013 5:41 pm
by 68rustang
I am trying to run the latest beta on my WHS 2011 box to act as a media server. MM installs and runs fine. The UPnP/DLNA server is available if MM is running. I am able to install it as a service using the "Install as a service" button. The service is installed and looks to be running however the UPnP/DLNA does not show up as available on any devices unless I log into the server and start MM.

Any ideas?

Re: MediaSharing as a service?

Posted: Tue Aug 20, 2013 6:09 pm
by Peke
Are you Sure that Service is starting on System Level and not On Logon Level?

Re: MediaSharing as a service?

Posted: Tue Aug 20, 2013 7:19 pm
by 68rustang
How do I check that?

The Services windows shows "Local System" under "Log On As"

The "LogOn" tab has "Local System Account" checked.

When I installed it as a service I ran MM as an administrator and used the administrator password when asked by MM.

Re: MediaSharing as a service?

Posted: Tue Aug 20, 2013 11:12 pm
by Peke
Thx, that was exact info I needed to start tests.

Re: MediaSharing as a service?

Posted: Sat Sep 14, 2013 9:33 am
by smither
Hi, I'm having the same symptoms .. Installed build 1658 on Windows Server 2012 Essentials. Configured DLNA Server, used 'Install as Service', everything seems ok (service is running, processes appear in task manager etc), but the server only shows up on client devices when user is logged on and the MediaMonkey app is started. Have tried Portable/non-portable installs, different users with higher privileges, but always the same - server is not visible unless user is logged on and running the app.

Any clues?
Eric

Re: MediaSharing as a service?

Posted: Sat Sep 14, 2013 4:09 pm
by dtsig
68rustang wrote:I am trying to run the latest beta on my WHS 2011 box to act as a media server. MM installs and runs fine. The UPnP/DLNA server is available if MM is running. I am able to install it as a service using the "Install as a service" button. The service is installed and looks to be running however the UPnP/DLNA does not show up as available on any devices unless I log into the server and start MM.

Any ideas?
My guess is that your service is not starting at all. I have tried this several times and now finding that the service will never start. Why?? i am sure it is something about 'rights' although my user IS administrator rights and I enter my password AND mm says .. cool.

My user installed ftp server service, web server service etc and that all runs fine ... but MMW ... nope

Re: MediaSharing as a service?

Posted: Sat Sep 14, 2013 8:49 pm
by dtsig
So after working with one of the devs it turns out that MM may install the service but it appears to me not to set it up correctly. It can't ever start because of login rights/authorization.

Do the following at your own risk.
To fix this bring up task manager, go to services tab, click services bottom of window. Scroll down to MediaMonkey
Right-Click and bring up properties. The Logon Tab
Using radio button 'This Account' have '.\Administrator' (no quotes) Then enter the administrator password in both boxes. Then Apply and OK

When when back in services click the 'start' link on the right and it should start right up.

NOTE: I was told you should not run the service on the same box running MMW.

Hope this helps

Re: MediaSharing as a service?

Posted: Sat Sep 14, 2013 9:26 pm
by Peke
To Clarify:
If MMW is started as Service and than you start regular MMW than Service is Stopped while MMW is Started to avoid conflicts of having two MMW servers started with same settings.

Re: MediaSharing as a service?

Posted: Sun Sep 15, 2013 5:41 am
by jmcc
If you want to have the same settings (UPnP name for example) when running via a service as when you launch MMW manually, then you have to run the service as the user that you'd normally log in as because there are certain MMW settings that relate to the user. You may have to give that user "Logon as a service" permissions as well.

Re: MediaSharing as a service? [#11274]

Posted: Mon Sep 16, 2013 12:56 am
by smither
Thanks for all the replies, but the issue remains. I have given the Service an Admin user (which I don't want to do long term), and have checked that the Service is running, both in the Services Admin tool and the task manager processes list. I have changed the port number to 4000 and can see the server from Media Monkey when the app is running. When the app is not running, the DLNA server is not visible from any clients. When the app is running it is visible.

Is there any way to debug the service?
Eric

Re: MediaSharing as a service? [#11274]

Posted: Mon Sep 16, 2013 2:14 am
by jmcc
Hi Eric - can I just confirm that if you log into Windows as the admin user that you have used to launch the service, without the service running, and you launch MMW that you can see the UPnP server? Ta John

Re: MediaSharing as a service? [#11274]

Posted: Mon Sep 16, 2013 4:08 am
by Ludek
smither wrote:Thanks for all the replies, but the issue remains. I have given the Service an Admin user (which I don't want to do long term), and have checked that the Service is running, both in the Services Admin tool and the task manager processes list. I have changed the port number to 4000 and can see the server from Media Monkey when the app is running. When the app is not running, the DLNA server is not visible from any clients. When the app is running it is visible.

Is there any way to debug the service?
Eric
If you installed the service as admin then all MM settings is most probably taken from the admin account and not your user account, this causes that the server is not visible, you need either:
- Run MM from the admin account (or as Admin) and configure the server/sharing.
- Install the service for your user account
- Install MM as portable so that all MM settings is always within the portable folder for all accounts

HINT: In the debug log (generetated using DbgView) can bee seen from where MM takes its settings (MM.DB, MediaMonkey.ini)

Re: MediaSharing as a service? [#11274]

Posted: Tue Sep 17, 2013 4:27 pm
by smither
I have installed MediaMonkey several times in trying to work around this issue. The last one was a portable install, but all attempts to install MM as a service have failed the same way - the server is not visible unless the app is running. I have used different user ids, with different privileges, to start the service but to no avail. I have checked that the service is running in the Services Admin tool, and by watching the MediaMonkeyService.exe and the MediaMonkey.exe processes start when the service is started. These processes do not stop when the app is started, and the service keeps running - there is just one more MediaMonkey.exe process visible in the task manager, and the dlna server shows up in clients.

I have captured dbgview logs when starting the service and the app. The service log ends with

Code: Select all

[1120] Winamp simulation window received messsage 28
[1120] Forms: RestoreTopMost: Level: 1
[1120] Forms: RestoreTopMost: Starting
[1120] ========== RUN APPLICATION ======== (Main window is shown to user right now)
[1120] Win7Tools - Taskbar COM object initialized
There are no other entries from process 1120 - everything seems to stop here. The app log captured around the same area continues on with background task processing as shown below:

Code: Select all

[10868] Winamp simulation window received message 28
[10868] Forms: Received WM_ACTIVATEAPP
[10868] Forms: Accepted WM_ACTIVATEAPP +
[10868] Forms: RestoreTopMost: Level: 2
[10868] Forms: RestoreTopMost: Level: 1
[10868] Forms: RestoreTopMost: Starting
[10868] MainForm: NC Activate +
[10868] ========== RUN APPLICATION ======== (Main window is shown to user right now)
[10868] Win7Tools - Taskbar COM object initialized
[10868] WMDM: Notifications ok.
[10868] WMDM: Looking for device changes...
[10868] WMDM: Is Inserted: G:\, 0:0001!USB@\\?\wpdbusenumroot#umb#2&37c186b&0&storage#volume#_??_risd#disk&ven_ricoh&prod_sd#mmcstorage&rev_2.00#0001##{f33fdc04-d1ac-4e8e-9a30-19bbd4b108ae}$0, \\?\wpdbusenumroot#umb#2&37c186b&0&storage#volume#_??_risd#disk&ven_ricoh&prod_sd#mmcstorage&rev_2.00#0001##{f33fdc04-d1ac-4e8e-9a30-19bbd4b108ae}$0
[10868] WMDM: It's a new device - adding
[10868] WMDM: Profile still unknown, looking for Android folder
[10868] WMDM: GetStorageFromPath: Android
[10868] WMDM: GetStorageFromPath: Android was not found
[10868] WMDM: Querying device capabilities.
[10868] WMDM: GetStorageInfoFile
[10868] WMDM: GetStorageFromPath: \MediaMonkey\files\StorageInfo.xml
[10868] WMDM: GetStorageFromPath: MediaMonkey was not found
[10868] WMDM: StorageInfo.xml was not found on the device
[10868] BQ: Added new task. Currently 1 tasks in queue.
[10868] BQ: Starting a new task.
and after some stuff about devices the app goes on to:

Code: Select all

[10868] 5136 DB open SQL: SELECT MediaServers.* FROM MediaServers WHERE id = 1  
[10868] OpenQuery - Preparing query SELECT MediaServers.* FROM MediaServers WHERE id = 1  
[10868] 5136 DB lock finished, took 1160.
[10868] Going to check for a new version.
[10868] UPnP: Init
[10868] UPnP: Run server
So the big question is why MM running as a service even thinks that its displaying the Main window, and why it stops at that point. Does anyone else have a problem running MM build 1658 as a service, or is it just me?

Eric

Re: MediaSharing as a service? [#11274]

Posted: Mon Sep 23, 2013 4:29 am
by Ludek
Hi, in order to capture the Service's debug messages you need to start DbgView as administrator and enable in menu
Capture > Capture Global Win32
instead of just
Capture > Capture Win32 (that you should disable in this case)

Then try to find these lines that are important:

Code: Select all

[6644] Received command line: '"C:\MediaMonkey\MediaMonkey.exe" /SERVICE'
[6644] Going to read brand data.
[6644] Going to init Application.
[6644] Application was inicialized
[6644] Version: 4.1.0.1658
[6644] Splash screen was shown.
[6644] TFMainWindow.FormCreate started
[6644] User uses Gold version (registered user)
[6644] Creating main form.
[6644] Going to read ini settings.
[6644] DB path: C:\Users\Ludek-NB\AppData\Roaming\MediaMonkey\MM.DB , default:  , MyDir: C:\MediaMonkey\

Re: MediaSharing as a service? [#11274]

Posted: Mon Sep 23, 2013 4:45 am
by Ludek
Actually I re-tested it and the service really no longer starts server in recent builds!

To be fixed as http://www.ventismedia.com/mantis/view.php?id=11303 in build 1660.

Thank you for reporting!