On Fri, Aug 27, 2010 at 2:51 PM, Michael Pearce <[email protected]>wrote:
> > > On Fri, Aug 27, 2010 at 1:38 PM, Wesley Dyk <[email protected]> wrote: > >> On Thu, Aug 26, 2010 at 6:57 PM, Michael Pearce <[email protected]> >> wrote: >> > >> > >> > On Fri, Jul 30, 2010 at 4:53 AM, Wesley Dyk <[email protected]> wrote: >> >> >> >> On Wed, Jul 28, 2010 at 5:14 PM, Michael Pearce <[email protected]> >> >> wrote: >> >> > I'm trying to run my TG2 app as a windows service so that I don't >> need >> >> > to >> >> > stay logged on to the server. There is a script (service.py) on the >> >> > TG1.0 >> >> > website that provides instructions on this. However, I am unable to >> get >> >> > it >> >> > working with TG2. Has anyone been able to achieve this. If so, what >> >> > changes >> >> > do I need to make to service.py to make it work with TG2. >> >> > >> >> > Thanks, Michael >> >> > >> >> > >> >> > -- >> >> > You received this message because you are subscribed to the Google >> >> > Groups >> >> > "TurboGears" group. >> >> > To post to this group, send email to [email protected]. >> >> > To unsubscribe from this group, send email to >> >> > [email protected]<turbogears%[email protected]> >> . >> >> > For more options, visit this group at >> >> > http://groups.google.com/group/turbogears?hl=en. >> >> > >> >> >> >> Michael, >> >> I have my turbogears environment running as a windows service with >> >> wsgisvc. You need to have the win32 extensions installed. Install >> >> wsgisvc with: >> >> >> >> easy_install.exe wsgisvc >> >> >> >> Add a winservice section to your ini file: >> >> [winservice] >> >> # windows service name >> >> svc_name = <application shortname - for NET START|STOP shortname> >> >> svc_display_name = <application long name> >> >> svc_description = <description of your app> >> >> log_file = <path to your logfile> >> >> virtual_env = <path to your virtual env> >> >> >> >> Then install the service by using: >> >> wsgisvc -c <ini file> install >> >> >> >> Wes >> >> >> >> -- >> >> You received this message because you are subscribed to the Google >> Groups >> >> "TurboGears" group. >> >> To post to this group, send email to [email protected]. >> >> To unsubscribe from this group, send email to >> >> [email protected]<turbogears%[email protected]> >> . >> >> For more options, visit this group at >> >> http://groups.google.com/group/turbogears?hl=en. >> >> >> > Wes, >> > >> > Thanks for that. I'm having difficulties getting this to work. I have >> added >> > the following to my development.ini file: >> > >> > # Add a winservice section to your ini file: >> > [winservice] >> > # windows service name >> > svc_name = projects >> > svc_display_name = Project Tracking >> > svc_description = Qantas Property Development Projects >> > log_file = C:\\tg2env\\Scripts\\projects\\logs >> > virtual_env = C:\\tg2env\\Scripts\\projects >> > >> > however, I get an error when trying to start the service. Do you see >> > anything wrong with my setup? My application has been developed in TG2. >> > >> > Thanks, Michael >> > >> > >> > >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups >> > "TurboGears" group. >> > To post to this group, send email to [email protected]. >> > To unsubscribe from this group, send email to >> > [email protected]<turbogears%[email protected]> >> . >> > For more options, visit this group at >> > http://groups.google.com/group/turbogears?hl=en. >> > >> >> I'm not sure what to recommend as I don't know what error you've >> received. Also, is it an error on the service installation command >> with wsgisvc or an error when starting the service after a successful >> installation? >> >> I have noticed that your log_file parameter looks like you've >> specified a directory. I have the full path to a regular file in this >> parameter. I am also not sure if the path arguments should be entered >> with / instead of \\. My configuration uses /. >> >> You could try these out or see if you can post more detail about the >> error and what command you ran to get it. >> >> Wes >> >> -- >> You received this message because you are subscribed to the Google Groups >> "TurboGears" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]<turbogears%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/turbogears?hl=en. >> >> Wes, > > I have changed the configuration as you have recommended and get the same > error ("The Project Tracking service on Local Computer started and stopped. > Some services stop automatically if they have no work to do, for example, > the Performance Logs and Alerts service"). A log file (log.txt) is created, > however it is empty. Any idea what's going on? > > Thanks, Michael > > > Further to my previous post (above). The following error is displayed in the application log: The instance's SvcRun() method failed Traceback (most recent call last): File "C:\Python26\lib\site-packages\win32\lib\win32serviceutil.py", line 806, in SvcRun self.SvcDoRun() File "C:\Python26\lib\site-packages\wsgisvc-0.8.2.0-py2.6.egg\wsgisvc.py", line 138, in SvcDoRun s.run([ self.ss.getCfgFileName() , '--log-file='+self.ss.getStdOutFileName() ] ) # --log-file redirects both stdout and stderr File "C:\Python26\lib\site-packages\pastescript-1.7.3-py2.6.egg\paste\script\command.py", line 218, in run result = self.command() File "C:\Python26\lib\site-packages\pastescript-1.7.3-py2.6.egg\paste\script\serve.py", line 276, in command relative_to=base, global_conf=vars) File "C:\Python26\lib\site-packages\pastescript-1.7.3-py2.6.egg\paste\script\serve.py", line 313, in loadapp **kw) File "C:\Python26\lib\site-packages\pastedeploy-1.3.3-py2.6.egg\paste\deploy\loadwsgi.py", line 204, in loadapp return loadobj(APP, uri, name=name, **kw) File "C:\Python26\lib\site-packages\pastedeploy-1.3.3-py2.6.egg\paste\deploy\loadwsgi.py", line 224, in loadobj global_conf=global_conf) File "C:\Python26\lib\site-packages\pastedeploy-1.3.3-py2.6.egg\paste\deploy\loadwsgi.py", line 248, in loadcontext global_conf=global_conf) File "C:\Python26\lib\site-packages\pastedeploy-1.3.3-py2.6.egg\paste\deploy\loadwsgi.py", line 278, in _loadconfig return loader.get_context(object_type, name, global_conf) File "C:\Python26\lib\site-packages\pastedeploy-1.3.3-py2.6.egg\paste\deploy\loadwsgi.py", line 409, in get_context section) File "C:\Python26\lib\site-packages\pastedeploy-1.3.3-py2.6.egg\paste\deploy\loadwsgi.py", line 431, in _context_from_use object_type, name=use, global_conf=global_conf) File "C:\Python26\lib\site-packages\pastedeploy-1.3.3-py2.6.egg\paste\deploy\loadwsgi.py", line 361, in get_context global_conf=global_conf) File "C:\Python26\lib\site-packages\pastedeploy-1.3.3-py2.6.egg\paste\deploy\loadwsgi.py", line 248, in loadcontext global_conf=global_conf) File "C:\Python26\lib\site-packages\pastedeploy-1.3.3-py2.6.egg\paste\deploy\loadwsgi.py", line 285, in _loadegg return loader.get_context(object_type, name, global_conf) File "C:\Python26\lib\site-packages\pastedeploy-1.3.3-py2.6.egg\paste\deploy\loadwsgi.py", line 561, in get_context object_type, name=name) File "C:\Python26\lib\site-packages\pastedeploy-1.3.3-py2.6.egg\paste\deploy\loadwsgi.py", line 581, in find_egg_entry_point pkg_resources.require(self.spec) File "C:\Python26\lib\site-packages\setuptools-0.6c9-py2.6.egg\pkg_resources.py", line 626, in require needed = self.resolve(parse_requirements(requirements)) File "C:\Python26\lib\site-packages\setuptools-0.6c9-py2.6.egg\pkg_resources.py", line 524, in resolve raise DistributionNotFound(req) # XXX put more info here DistributionNotFound: projects Rgds, Michael -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.

