运行Cruise Control .NET即服务 [英] Running Cruise Control .NET as a Service

查看:142
本文介绍了运行Cruise Control .NET即服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经配置和测试CCNet一段时间了,现在使用虚拟PC来托管它。一切都进行得很顺利,并决定将配置转移到服务器位置 - 这是可以预期的,以及。



问题是,我们现在需要运行CCNet作为一个服务,证明有问题。



我已经配置了一个与我拥有相同访问权限的域级用户(毕竟控制台应用程序已经以我的身份运行了大约3个月),并将服务配置为在该用户。



我开始服务,它挂了! [我不会介绍强制服务停止和关闭已打开的套接字的详细信息]。当我最终能够再次运行控制台时,我做了一个'运行为'并输入'cruisecontrol'用户详细信息,单击确定,看到通过https访问SVN时出现问题。我已经排序,通过运行IE作为'cruisecontrol,导航到存储库和接受/安装证书。
接下来当我将控制台应用程序作为cruisecontrol运行时,它会在以下行之后挂起:




2009-01 -15 16:55:50,994 [Pepsi Webservices:DEBUG]使用参数运行Subversion:log --xml --limit 1 https:// ash-dev-005。[path to trunk]



2009-01-15 16:55:51,478 [Pepsi Webservices:DEBUG ]认证领域: https:// ash-dev-005。[path to repository] ​​Subversion Repositories



超时后,我可以关闭控制台,像正常一样运行它,它运行正常。我尝试以cruisecontrol用户身份登录服务器,并尝试运行控制台,但结果相同。



现在,继续了:今天早上我登录服务器作为cruisecontrol用户并打开命令窗口。我导航到我的项目的中继,并键入svn更新,并提示输入密码。



这并不奇怪,但是该提示符之上的行是'Authentication realm:...'上面的行!查看日志文件,确保在进程被CCNet杀死后立即提示输入密码。 CCNet / SVN是否正在等待密码输入,然后超时?



我输入了密码,更新没有任何问题,因此cruisecontrol用户有权限从服务器访问存储库)。我再次输入命令,没有提示第二次,所以我试图打开一个新的命令窗口并重新运行命令 - 仍然没有提示输入密码,所以我退出并回来(作为cruisecontrol),然后再次尝试,但仍然没有提示。



好消息是,当我以cruisecontrol用户身份运行控制台应用程序(无论是以cruisecontrol登录还是仅使用运行方式),一切似乎都OK。 / p>

那么我的问题是什么?
那么,为什么CCNet不在配置文件中使用密码?
如何在命令提示符中输入密码解决了问题(并会持续存在)?



任何建议/洞察力。

解决方案

嗯 - 我可能在这里回答了我自己的问题(或者不,只有时间会告诉)。



由于某种原因,CCNet似乎没有使用配置文件中的凭据(不知道为什么)。当它调用SVN时,它等待输入密码,即使用户看不到它,然后在没有获得密码时超时。



通过访问SVN从命令行的密码提示是可见的,可以输入,此外密码缓存在%app_data%\Subversion\auth\svn.simple在该用户的加密文件内。这是为什么后续命令不提示输入密码,以及为什么控制台应用程序将没有任何问题运行的原因。



现在我将配置CCService,希望这将工作以及控制台应用程序现在。



如果您有任何类似的经历,请让我知道。在此期间,我可以提出与ThoughtWorks的问题。


I've been configuring and testing CCNet for a little while now using Virtual PC to host it. Everything went well and it was decided to transfer the configuration to a server location - which went as well as could be expected. A few tweaks and kicks and i had it running as before.

The problem is that we now need to run CCNet as a service which is proving problematic.

I have configured a domain level user with the same access rights as myself (after all, the console application has been running as me for about 3 months now) and configured the service to run under that user.

I started the service and it hung! [I'll not bore you with the details of forcing the service to stop and closing the sockets that were held open]. When I was eventually able to run the console again I did a 'Run As' and entered the 'cruisecontrol' user details, click OK and saw that there was a problem accessing SVN via https. I've sorted that by running IE as 'cruisecontrol', navigating to the repository and accepting/installing the certificate. Next when I ran the console application as 'cruisecontrol' it hangs after the following lines:

2009-01-15 16:55:50,994 [Pepsi Webservices:DEBUG] Running Subversion with arguments : log --xml --limit 1 https://ash-dev-005.[path to trunk]

2009-01-15 16:55:51,478 [Pepsi Webservices:DEBUG] Authentication realm: https://ash-dev-005.[path to repository] Subversion Repositories

After it times out I can close the console, run it as normal (i.e. as me) and it runs fine. I have tried logging into the server as the 'cruisecontrol' user and tried running the console but with the same result.

Now, heres the thing: This morning I logged into the server as the 'cruisecontrol' user and opened a command window. I navigated to the trunk of my project and typed 'svn update' and was prompted for a password.

This is not surprising but the line above that prompt was the 'Authentication realm:...' line above! Looking at the log file, sure enough right after the process is killed by CCNet there is a prompt for a password. Is CCNet/SVN waiting for a password entry and then timing out? If so, why it is not using the one in the config file?

I entered the password and the update proceeded without any problems (so the cruisecontrol user does have permissions to access the repository from the server). I entered the command again and was not prompted a second time so i tried opening a new command window and rerunning the command - still not prompted for a password so i logged out and back in (as cruisecontrol) and tried again but was still not prompted.

The good news is that when I run the console application as the cruisecontrol user (whether logged in as cruisecontrol or just using Run As) everything appears to be OK.

So what's my question? Well, why is CCNet not using the password in the config file? How has entering the password in the command prompt resolved the problem (and will it persist)?

Any suggestions/insight appreciated.

解决方案

Hmmm - I may have answered my own question here (or not, only time will tell).

For some reason CCNet does not appear to be using the credential in the config file (don't know why). When it calls SVN it waits for a password to be entered, even if the user cannot see it, and then times out when it doesn't get one.

By accessing SVN from the command line the password prompt is visible and can be entered, moreover the password is cached in %app_data%\Subversion\auth\svn.simple inside an encrypted file for that user. This is why subsequent commands do not prompt for a password and why the console application will run without any problems.

I'm going to configure the CCService now so hopefully this will work as well as the console application does now.

If you have had any similar experiences please let me know. In the meantime I may raise the issue with ThoughtWorks.

这篇关于运行Cruise Control .NET即服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆