百度首页 | 
百度搜藏
快照
(百度和http://www.gossamer-threads.com/lists/trac/users/30017的作者无关,不对其内容负责。百度快照谨为网络故障时之索引,不代表被搜索网站的即时页面。)

Running Trac as a windows service | Trac | Users
   Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Trac: Users

Running Trac as a windows service

 

 

Trac users RSS feed   Index | Next | Previous | Print Thread | View Threaded


dy20lqh02 at sneakemail

Apr 5, 2007, 6:25 AM

Post #1 of 10 (239 views)
Permalink
Running Trac as a windows service

I would like to run trac as a windows service.

I'm running
trac 0.10.3.1
tracd
windows 2k

I found an article about this at Trac-hacks.org (http://www.trac-hacks.org/wiki/WindowsServiceScript). I downloaded the script, and the patch to update the script to 0.10.

I can install the service and it shows up as a windows service. When I try to start the service, it fails, with this message in the event log:

The instance's SvcRun() method failed
File "C:\Program Files\Python24\Lib\site-packages\win32\lib\win32serviceutil.py", line 785, in SvcRun
self.SvcDoRun()
File "C:\Program Files\Python24\Scripts\tracservice.py", line 94, in SvcDoRun
self.httpd = self.trac_init()
File "C:\Program Files\Python24\Scripts\tracservice.py", line 143, in trac_init
wsgi_app = TracEnvironMiddleware(dispatch_request,
exceptions.NameError: global name 'dispatch_request' is not defined

Any ideas as to what this means?

Or any suggestions for other ways to do this?

Thanks,

Chris

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users[at]googlegroups.com
To unsubscribe from this group, send email to trac-users-unsubscribe[at]googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


jmt4b04d4v at gmail

Apr 5, 2007, 2:47 PM

Post #2 of 10 (224 views)
Permalink
Re: Running Trac as a windows service [In reply to]

Hi, no idea about http://www.trac-hacks.org/wiki/WindowsServiceScript,
(anxious for reading) but I used another tool for installing tracd as
service, NTWrapper (http://www.duodata.de/ntwrapper/), they have a
'''Lite''' dist ''{{{Freeware for noncommercial use}}}''.

I used it first, as I was using a subversion ''version'' prior to
1.4.x, also used with trac with minor effort (I'm migrating to linux
now).

If you're interesed, ask me.

Good luck ;-), jmt4b04d4v

On Apr 5, 9:25 am, Chris <dy20lq...@sneakemail.com> wrote:
> I would like to run trac as a windows service.
>
> I'm running
> trac 0.10.3.1
> tracd
> windows 2k
>
> I found an article about this at Trac-hacks.org (http://www.trac-hacks.org/wiki/WindowsServiceScript). I downloaded the script, and the patch to update the script to 0.10.
>
> I can install the service and it shows up as a windows service. When I try to start the service, it fails, with this message in the event log:
>
> The instance's SvcRun() method failed
> File "C:\Program Files\Python24\Lib\site-packages\win32\lib\win32serviceutil.py", line 785, in SvcRun
> self.SvcDoRun()
> File "C:\Program Files\Python24\Scripts\tracservice.py", line 94, in SvcDoRun
> self.httpd = self.trac_init()
> File "C:\Program Files\Python24\Scripts\tracservice.py", line 143, in trac_init
> wsgi_app = TracEnvironMiddleware(dispatch_request,
> exceptions.NameError: global name 'dispatch_request' is not defined
>
> Any ideas as to what this means?
>
> Or any suggestions for other ways to do this?
>
> Thanks,
>
> Chris


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users[at]googlegroups.com
To unsubscribe from this group, send email to trac-users-unsubscribe[at]googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


dy20lqh02 at sneakemail

Apr 6, 2007, 3:38 AM

Post #3 of 10 (222 views)
Permalink
Re: Running Trac as a windows service [In reply to]

Chris dy20lqh02-at-sneakemail.com |TracMailingList| wrote:
> I would like to run trac as a windows service.
>
> I'm running
> trac 0.10.3.1
> tracd
> windows 2k
>
> I found an article about this at Trac-hacks.org
> (http://www.trac-hacks.org/wiki/WindowsServiceScript). I downloaded
> the script, and the patch to update the script to 0.10.
>
> I can install the service and it shows up as a windows service. When
> I try to start the service, it fails, with this message in the event
> log:
>
> The instance's SvcRun() method failed
> File "C:\Program Files\Python24\Lib\site-packages\win32\lib\win32serviceutil.py", line 785, in SvcRun
> self.SvcDoRun()
> File "C:\Program Files\Python24\Scripts\tracservice.py", line 94, in SvcDoRun
> self.httpd = self.trac_init()
> File "C:\Program Files\Python24\Scripts\tracservice.py", line 143, in trac_init
> wsgi_app = TracEnvironMiddleware(dispatch_request,
> exceptions.NameError: global name 'dispatch_request' is not defined
>
> Any ideas as to what this means?
>
> Or any suggestions for other ways to do this?

This turned out to be an editing error on my part, when manually applying the patch. This script does work as advertised...

Chris

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users[at]googlegroups.com
To unsubscribe from this group, send email to trac-users-unsubscribe[at]googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


boskoma at gmail

Apr 10, 2007, 6:02 AM

Post #4 of 10 (219 views)
Permalink
Re: Running Trac as a windows service [In reply to]

Hi,
I found this Windows Service Script on track-hacks.org and applied
given patch. Everything looked OK till I tried to login. Error
message showed saying problem with authentication. When running same
environment with tracd with (almost) the same parameters I can log
in. Anybody experiencing something similar?
I also tried but could not find script writer.
Regards,


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users[at]googlegroups.com
To unsubscribe from this group, send email to trac-users-unsubscribe[at]googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


hyugaricdeau at gmail

Apr 10, 2007, 6:13 AM

Post #5 of 10 (218 views)
Permalink
Re: Running Trac as a windows service [In reply to]

Well what exactly does the error message say? How do you have
authentication configured? When you say "almost" the same parameters,
what parameters are different?

On 4/10/07, boskoma[at]gmail.com <boskoma[at]gmail.com> wrote:
>
> Hi,
> I found this Windows Service Script on track-hacks.org and applied
> given patch. Everything looked OK till I tried to login. Error
> message showed saying problem with authentication. When running same
> environment with tracd with (almost) the same parameters I can log
> in. Anybody experiencing something similar?
> I also tried but could not find script writer.
> Regards,
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users[at]googlegroups.com
To unsubscribe from this group, send email to trac-users-unsubscribe[at]googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


boskoma at gmail

Apr 10, 2007, 7:17 AM

Post #6 of 10 (219 views)
Permalink
Re: Running Trac as a windows service [In reply to]

Erik,
The error message says:

Internal Error
Authentication information not available. Please refer to the
installation documentation.

When I run Trac using tracd command line is:
tracd.py --port 8000 --auth *,f:\trac\users.htdigest,trac -e f:\trac



With tracservice.py :

PYTHON = r'C:\Python24\python.exe'
INSTANCE_HOME = r'f:\trac\eeg'
ENVIRONMENT_HOME = r'f:\trac'
REALM = 'trac'

# Trac options (see C:\Python24\Scripts\tracd)
OPTS = [.
#use auth for all projects, hence '*'
( '--auth', (r'*,%s\users.htdigest,%s' % (ENVIRONMENT_HOME,
REALM) ) ),
( '--port', '8000' ),
( '--env-parent-dir', ENVIRONMENT_HOME),
]

LOG_DIR = r'%s\log' % INSTANCE_HOME

# Trac instance(s)
ARGS = [ INSTANCE_HOME, ]


I made users.htdigest using script provided on trac's
wiki TracStandalone.

Thx in advance,


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users[at]googlegroups.com
To unsubscribe from this group, send email to trac-users-unsubscribe[at]googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


hyugaricdeau at gmail

Apr 11, 2007, 9:35 AM

Post #7 of 10 (209 views)
Permalink
Re: Running Trac as a windows service [In reply to]

Huh, well it seems that error gets raised if the req.remote_user
variable isn't set when logging in.

From trac/web/auth.py:
121 if not req.remote_user:
122 raise TracError(html("Authentication information not
available. "
123 "Please refer to the ",
124 html.a('installation documentation',
125 title="Configuring Authentication",
126 href=req.href.wiki('TracInstall') +
127
"#ConfiguringAuthentication"), "."))

Why it wouldn't be set I'm not sure.

On 4/10/07, boskoma[at]gmail.com <boskoma[at]gmail.com> wrote:
>
> Erik,
> The error message says:
>
> Internal Error
> Authentication information not available. Please refer to the
> installation documentation.
>
> When I run Trac using tracd command line is:
> tracd.py --port 8000 --auth *,f:\trac\users.htdigest,trac -e f:\trac
>
>
>
> With tracservice.py :
>
> PYTHON = r'C:\Python24\python.exe'
> INSTANCE_HOME = r'f:\trac\eeg'
> ENVIRONMENT_HOME = r'f:\trac'
> REALM = 'trac'
>
> # Trac options (see C:\Python24\Scripts\tracd)
> OPTS = [.
> #use auth for all projects, hence '*'
> ( '--auth', (r'*,%s\users.htdigest,%s' % (ENVIRONMENT_HOME,
> REALM) ) ),
> ( '--port', '8000' ),
> ( '--env-parent-dir', ENVIRONMENT_HOME),
> ]
>
> LOG_DIR = r'%s\log' % INSTANCE_HOME
>
> # Trac instance(s)
> ARGS = [ INSTANCE_HOME, ]
>
>
> I made users.htdigest using script provided on trac's
> wiki TracStandalone.
>
> Thx in advance,
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users[at]googlegroups.com
To unsubscribe from this group, send email to trac-users-unsubscribe[at]googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


boskoma at gmail

Apr 11, 2007, 10:07 AM

Post #8 of 10 (209 views)
Permalink
Re: Running Trac as a windows service [In reply to]

Erik,
Thank you for your time.
I looked also in code but had no clue way this happened i.e. why this
request req is bad. That's way I searched on trac-hacks.org for
author, assuming he could know something more. This script is "stolen"
from Turbo Gears or smth, I guess it needs more tinkering.

Anyway I installed Trac as service using Windows 2003 Resource Kits'
SrvAny.exe
and I can log in.

thanks again.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users[at]googlegroups.com
To unsubscribe from this group, send email to trac-users-unsubscribe[at]googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


hyugaricdeau at gmail

Apr 11, 2007, 10:19 AM

Post #9 of 10 (209 views)
Permalink
Re: Running Trac as a windows service [In reply to]

Yeah, I think it's most likely a bug in that script. It looks like it
actually reimplements a large part of tracd's main routine, so there
could be something it's not doing right. I was about to say you
should try to contact the author, but I guess you've already worked it
out ;)

On 4/11/07, boskoma[at]gmail.com <boskoma[at]gmail.com> wrote:
>
> Erik,
> Thank you for your time.
> I looked also in code but had no clue way this happened i.e. why this
> request req is bad. That's way I searched on trac-hacks.org for
> author, assuming he could know something more. This script is "stolen"
> from Turbo Gears or smth, I guess it needs more tinkering.
>
> Anyway I installed Trac as service using Windows 2003 Resource Kits'
> SrvAny.exe
> and I can log in.
>
> thanks again.
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users[at]googlegroups.com
To unsubscribe from this group, send email to trac-users-unsubscribe[at]googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


boskoma at gmail

May 28, 2007, 1:15 AM

Post #10 of 10 (112 views)
Permalink
Re: Running Trac as a windows service [In reply to]

Andrew said:
> I couldnt get trac to work using Windows 2003 Resource Kits'
> SrvAny.exe, can you tell me how you did it? I am running Win XP SP2, Python 2.4, tracd > 0.10

I also use Python 2.4, Trac 0.10 on Windows 2003 but it is the same
for XP.
What have I done to enable Trac as Windows service is following:

1. Install Windows 2003 Resource Kits.
* Refer to Help and follow directions for SrvAny.exe
2. Make Service:

c:\> "c:\Program Files\Windows Resource Kits\Tools\instsrv.exe" Trac
"c:\Program Files\Windows Resource Kits\Tools\srvany.exe"

3. Using regedit in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet
\Services\Trac make key Parameters with new String Value: Application
with value e.g. f:\trac\start-trac.bat
4. Start service using administration tools
5. For additional settings like working directory, parameters,
environment variables refer to Windows 2003 Resource Kit help.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users[at]googlegroups.com
To unsubscribe from this group, send email to trac-users-unsubscribe[at]googlegroups.com
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Trac users RSS feed   Index | Next | Previous | Print Thread | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.