Vibe Streamer Forum Index Vibe Streamer
Vibe Streamer Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Vibe Streamer as a service in Windows XP.
Goto page Previous  1, 2, 3  Next
 
Post new topic   Reply to topic    Vibe Streamer Forum Index -> Support
View previous topic :: View next topic  
Author Message
kalobar



Joined: 01 Aug 2008
Posts: 4

PostPosted: Wed Aug 06, 2008 9:30 am    Post subject: playlists doent work under VS running as service Reply with quote

I have a problem with VS running as services: when it restarts (e.g. at server reboot) all users lose all their playlists. Playlists seem only to remain when VS is run as normal application and not as a service. Any solutions? Anything I am missing? thanks for your ideas...!

PS also posted a thread on this (http://www.vibestreamer.com/forum/viewtopic.php?t=592) but no solution there yet
Back to top
View user's profile Send private message
Pieter



Joined: 14 Oct 2009
Posts: 3

PostPosted: Wed Oct 14, 2009 11:10 am    Post subject: Re: playlists do not work under VS running as service Reply with quote

Running as a service doesn't shutdown the application gracefully, it just terminates it. VS only saves the playlists on a gracefull exit.

The way to solve this would be to change the playlist handling in VS.
Perhaps save the playlists on every change?
I suppose the programmer has a good reason to save the playlist in VS on exit only.

[quote="kalobar"]I have a problem with VS running as services: when it restarts (e.g. at server reboot) all users lose all their playlists. Playlists seem only to remain when VS is run as normal application and not as a service. Any solutions? Anything I am missing? thanks for your ideas...!
Back to top
View user's profile Send private message
siit
Vibe Streamer Author


Joined: 04 Jul 2006
Posts: 657
Location: Stockholm, Sweden

PostPosted: Wed Oct 14, 2009 11:24 am    Post subject: Reply with quote

Vibe Streamer 3 saves playlists whenever they are added, deleted or modified. Although other server settings and user data is saved at a regular time interval, so Vibe Streamer 3 should be able to be shutdown non-gracefully.. although as with any application I can't give any guarantees or recommendations to just terminate the application every time and expect it to handle it at 100% Razz
_________________
==============================================
FOLLOW ME AND VIBE ON TWITTER
http://www.twitter.com/versionstudio
==============================================
Back to top
View user's profile Send private message Visit poster's website
Pieter



Joined: 14 Oct 2009
Posts: 3

PostPosted: Wed Oct 14, 2009 11:37 am    Post subject: Run as service without moving VS files Reply with quote

When running VS 3 as a service, there is no need to move all the VS files to "C:\Windows\System32".

When using srvany.exe, the version in the Windows 2003 resourcekit, you can specify an AppDirectory in the srvany service. I just put srvany.exe in the VS directory "C:\Program Files\Vibe Streamer".

Used the following parameters:
Application="C:\Program Files\Vibe Streamer\vibestreamer.exe"
AppDirectory="C:\Program Files\Vibe Streamer"

To avoid problems, I also use a dedicated account to run the srvany service.

The account for srvany just needs limited user rights to run VS.
Execute rights on "C:\Program Files\Vibe Streamer" and below (any normal user account has this)
Write rights on settings, database and logging directories.
Read rights on your shared directories.
Back to top
View user's profile Send private message
Phil



Joined: 08 Jul 2006
Posts: 180
Location: Los Angeles, CA

PostPosted: Wed Oct 14, 2009 7:23 pm    Post subject: Re: Run as service without moving VS files Reply with quote

Pieter wrote:
When using srvany.exe, the version in the Windows 2003 resourcekit, you can specify an AppDirectory in the srvany service. I just put srvany.exe in the VS directory "C:\Program Files\Vibe Streamer".

Used the following parameters:
Application="C:\Program Files\Vibe Streamer\vibestreamer.exe"
AppDirectory="C:\Program Files\Vibe Streamer"


Can you please elaborate on this? Are you adding the AppDirectory string to the Parameters folder in the registry? Why does the srvany.exe need to placed in the VS installation directory?

I'm attempting to get this to work under Windows 7 Professional x64 RTM.
Back to top
View user's profile Send private message
Phil



Joined: 08 Jul 2006
Posts: 180
Location: Los Angeles, CA

PostPosted: Thu Oct 15, 2009 10:38 pm    Post subject: Reply with quote

OK, I give up. I'm able to get the service installed and start it, see it running in Process Explorer, but I'm unable to connect to it nor does it interact with the desktop although it is set to do so.

The VS logs show that it is running as well. I'm wondering if this has something to do with Windows permissions? I've already tried disabling the firewall and anti-virus without luck.

Code:
INFO   [2009-10-15 14:31:02] Core - Initializing server

INFO   [2009-10-15 14:31:02] MainWindow - Vibe Streamer 3.0.0

INFO   [2009-10-15 14:31:02] UpdateDialog - Checking for new updates

INFO   [2009-10-15 14:31:02] UpdateDialog - You are running the latest available version of Vibe Streamer

INFO   [2009-10-15 14:38:20] Core - Cleaning up server

INFO   [2009-10-15 14:39:22] Core - Initializing server

INFO   [2009-10-15 14:39:23] MainWindow - Vibe Streamer 3.0.0

INFO   [2009-10-15 14:39:23] UpdateDialog - Checking for new updates

INFO   [2009-10-15 14:39:24] UpdateDialog - You are running the latest available version of Vibe Streamer

INFO   [2009-10-15 15:03:21] Core - Initializing server

INFO   [2009-10-15 15:03:22] MainWindow - Vibe Streamer 3.0.0

INFO   [2009-10-15 15:03:22] UpdateDialog - Checking for new updates
Back to top
View user's profile Send private message
Pieter



Joined: 14 Oct 2009
Posts: 3

PostPosted: Fri Oct 16, 2009 5:45 pm    Post subject: Reply with quote

It doesn't make any difference where you put srvany.exe.
I just put it in the VS folder, because I only use it to run VS.

Yes, you add the AppDirectory string to the Parameters folder in the registry.
http://baza-winner.ru/dist/srvany.txt

I have VS as a service working under Windows 2008 standard X86.

I don't see the HTTP server starting in your log.
Have you enabled "Auto-start server at startup" in VS?

The best way is, to get it up and runnig as a normal program first.
You need to open a port for VS in the firewall.

If it is working, try running it as a service.

Phil wrote:
OK, I give up. I'm able to get the service installed and start it, see it running in Process Explorer, but I'm unable to connect to it nor does it interact with the desktop although it is set to do so.

The VS logs show that it is running as well. I'm wondering if this has something to do with Windows permissions? I've already tried disabling the firewall and anti-virus without luck.

Code:
INFO   [2009-10-15 14:31:02] Core - Initializing server

INFO   [2009-10-15 14:31:02] MainWindow - Vibe Streamer 3.0.0

INFO   [2009-10-15 14:31:02] UpdateDialog - Checking for new updates

INFO   [2009-10-15 14:31:02] UpdateDialog - You are running the latest available version of Vibe Streamer

INFO   [2009-10-15 14:38:20] Core - Cleaning up server

INFO   [2009-10-15 14:39:22] Core - Initializing server

INFO   [2009-10-15 14:39:23] MainWindow - Vibe Streamer 3.0.0

INFO   [2009-10-15 14:39:23] UpdateDialog - Checking for new updates

INFO   [2009-10-15 14:39:24] UpdateDialog - You are running the latest available version of Vibe Streamer

INFO   [2009-10-15 15:03:21] Core - Initializing server

INFO   [2009-10-15 15:03:22] MainWindow - Vibe Streamer 3.0.0

INFO   [2009-10-15 15:03:22] UpdateDialog - Checking for new updates
Back to top
View user's profile Send private message
Phil



Joined: 08 Jul 2006
Posts: 180
Location: Los Angeles, CA

PostPosted: Fri Oct 16, 2009 6:05 pm    Post subject: Reply with quote

Thanks for taking the time to reply Pieter. I have Vibe Streamer working fine both internally and externally when launched from the desktop. Auto-start is enabled as well (although I do not have a 'settings.xml' file mentioned in another thread). The log files look the same whether I launch VS from the desktop or restart the VS service. There is no mention of a HTTP server starting...

My guess at this point is that it has something to do with UAC and how the different windows accounts are communicating (or not communicating in this case). I could be wrong, but I don't know what else it could be.
Back to top
View user's profile Send private message
Phil



Joined: 08 Jul 2006
Posts: 180
Location: Los Angeles, CA

PostPosted: Fri Oct 16, 2009 8:56 pm    Post subject: Reply with quote

The planets have aligned!

I was finally able to get Vibe Streamer to run as a service. I'm not quite sure what the problem was, but this time when I started Vibe Streamer it had not been configured at all which means that it was associated with the service Vibe Streamer vs. the local install. Once configured it now starts up as a service at system boot. Thanks Peiter for the AppDirectory tip, worked well and thanks to the others who documented how to do this.
Back to top
View user's profile Send private message
anne



Joined: 17 Oct 2009
Posts: 23

PostPosted: Wed Nov 18, 2009 10:20 am    Post subject: Reply with quote

I don't know why, but the services i added did not start at all. When i am simply logged in as a administrator and tried to start it from services.msc i get the error message 1053, the service did not respond to the start or control request in a timely fashion.
I can simply start the program and stop it without problems, but is it so that this problem occurs only on my w2003 server?
Wha, never mind, if it is the cause of Windows...... i resign.

I still have not a good procedure for trying this well, can anyone set this procedure neatly in order? because i find it hard to add a service srvany instead of vibestreamer.exe and the last one is accepted, the first one i can't find.
I did this:
C:\Tools>instsrv "Vibestreamer" c:\tools\srvany.exe
and removed it because i cannot change the path to executable, it is greyd out.
C:\Tools>instsrv "Vibestreamer" c:\tools\srvany.exe C:\Program Files\Vibe Streamer\vibestreamer.exe
Gives the same result...
A service was created named Vibesteamer but it pointed to srvany.exe and not to vibestreamer.exe. When i delete an make another like this
C:\Tools>instsrv "Vibestreamer" C:\Program Files\Vibe Stream
er\vibestreamer.exe
It points to the program alright, but gives me the error.
So, does anyone has a how to...?
Back to top
View user's profile Send private message
mp3maniac



Joined: 23 Aug 2007
Posts: 28
Location: Ontario, Canada

PostPosted: Wed Nov 18, 2009 7:11 pm    Post subject: Vibe Streamer as a service for Windows XP or Server 2003. Reply with quote

I have put together instructions on the way I have set up my server and it works great. Follow these instuctions carefully and you should be good to go.
One point to remember, if you are in the habit of administering your server using Remote Desktop, make sure you start Remote Desktop with the /admin switch. i.e. %SystemRoot%\System32\mstsc.exe /admin. This will get you the console window and you will be able to manage the server more effectively.

Make sure you have admin rights to do this.

1 - Download the Windows 2003 Resource kit from here: http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en
Install the resource kit. The location will end up C:\Program Files\Windows Resource Kits\Tools. Copy srvany.exe and instsrv.exe to C:\windows\system32

2 - Go into start | run | type cmd or cmd.exe
In the command prompt type:
C:\windows\system32\INSTSRV.EXE VibeStreamer C:\windows\system32\srvany.exe

3 - Next open regedit.exe Start | run | regedit.exe
Navigate to this registry key.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VibeStreamer

From the Edit menu, click Add Key and name it Parameters thus giving you:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VibeStreamer\Parameters

4 - Next from the Edit menu, click Add String Value - add this information to the newly created String Value key.
Value Name: Application
Data Type : REG_SZ
Edit the string value and enter: "C:\Program Files\Vibe Streamer\vibestreamer.exe -service

5 - Now run VibeStreamer from the default location and configure it the way you want it. Make sure you do the following. In the Server Settings, first set the port under Server entry to what you want it to be, now under General you check all the boxes and save changes. The other settings are up to you, but make sure you save changes. Create your users, groups and set up your shares and index them and finally start the server. Now close VibeStreamer.


6 - Go to "C:\Program Files\Vibe Streamer" folder and copy all files to C:\Windows\System32 - Remember copy not move!

7 - Now go to Start | Control Panel | Admistrative Tools | Services |
Find VibeStreamer and Set your start up choice. Automatic is preferred.

8 - Click on the Log On tab, check the box - Allow service to interact with desktop. Apply and Start service. Close the service menu.

Note: Run the following from command prompt if you need to remove the service: C:\windows\system32\INSTSRV.EXE VibeStreamer REMOVE

To make the service truly independant, do the following:

1 - First as local administrator or equivalent user, after the service has been created and you have done as instructed, setting the Allow service to interact with desktop. Start the service. You should see the Vibe Streamer admin console should appear and VibeStreamer server should be running. Double check all your settings and make sure you save changes. Test Vibe Streamer from your browser to make sure all is good.

2 - Next edit the service, right click on the service and select Properties. In the Properties box select the Log On tab. Here you can select which account the service will run as. This is important because Vibe Streamer needs access to local resources, such as the hard drive, etc. Using the local system account works fine when you allow the service to interact with the desktop but I found this to be a bit of an issue when the user logged out.

3 - In the Log On properties section click on the radio button in front of This account. Type the name of a local account that the service can use to logon and access local resources. You can even create an account that has basic rights to the necessary resources. If you do this, make sure the account has been granted access to things like the folders that contain your files. I use the administrator account but you can use your own user account. It depends on the level of security you need.

4 - Once you have entered the username and password click OK. The service if running needs to be restarted. If it is not running start it. If the service starts then all is good. If it doesn't start you will need to check the username and password to make sure it is correct. And yes, the user object must have a password. Using this method you will not see the admin console on the desktop.

5 - Check your work by firing up your browser and hitting the vibestreamer server. It should work like a charm, mine does. Now no user needs to be logged in and Vibe Streamer will start when your Computer Starts with no user interaction needed.

Note: Only one drawback, if you ever need to change the Vibe Streamer settings you will have to change the service back to log on as local system account with interact with desktop set so you can make the changes then change the service back again.

Hope this helps.
Back to top
View user's profile Send private message
Phil



Joined: 08 Jul 2006
Posts: 180
Location: Los Angeles, CA

PostPosted: Wed Nov 18, 2009 7:17 pm    Post subject: Reply with quote

Thanks for putting everything into a single detailed write-up mp3maniac. Very nice!

I would like to suggest that in step 6 instead of copying the files to System32 directory that another registry key be added: AppDirectory="C:\Program Files\Vibe Streamer" where the app directory string is the location of the Vibe Streamer installation. I'm currently using this with my setup and it works great and eliminates the need to add additional files to the System32 directory.

I guess it would also be worth mentioning that this works on Windows XP, Server 2003 (most likely on 2008), Vista and 7 (I haven't tried on home editions however).
Back to top
View user's profile Send private message
mp3maniac



Joined: 23 Aug 2007
Posts: 28
Location: Ontario, Canada

PostPosted: Wed Nov 18, 2009 7:28 pm    Post subject: Reply with quote

Great idea Phil. Thanks

At step 6 instead of copy all files use regedit. Navigate to this registry key. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VibeStreamer\Parameters
From the Edit menu, click Add String Value - add this information to the newly created String Value key.
Value Name: AppDirectory
Data Type : REG_SZ
Edit the string value and enter: C:\Program Files\Vibe Streamer
Back to top
View user's profile Send private message
Phil



Joined: 08 Jul 2006
Posts: 180
Location: Los Angeles, CA

PostPosted: Wed Nov 18, 2009 7:30 pm    Post subject: Reply with quote

Credit goes to Pieter for suggesting the AppDirectory trick. Smile
Back to top
View user's profile Send private message
anne



Joined: 17 Oct 2009
Posts: 23

PostPosted: Tue Nov 24, 2009 8:22 am    Post subject: Reply with quote

Thanks guys, i'm sure going to try this step-by-step.
I hope it helps, and i hope future versions of VS have this option through installation, makes things so much easier....

I'll let you know if it worked for me...

Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Vibe Streamer Forum Index -> Support All times are GMT + 1 Hour
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group