构建机器人主配置错误
我安装了 buildbot,这是我的 master.cfg:
c = BuildmasterConfig = {}
from buildbot.buildslave import BuildSlave
c['slaves'] = [BuildSlave("windows", "windows32")]
c['slavePortnum'] = 9989
from buildbot.scheduler import Scheduler
c['schedulers'] = []
c['schedulers'].append(Scheduler(
name="start_scheduler",
branch=None,
treeStableTimer=None,
builderNames=["win32"]
))
from buildbot.process.factory import BuildFactory
from buildbot.steps.shell import ShellCommand
win32 = BuildFactory()
win32.addStep(ShellCommand(command=["touch", "dummfile"]))
from buildbot.config import BuilderConfig
c['builders'] = []
c['builders'].append(BuilderConfig(
name="win32", # also default name for builddir
slavenames=["windows"],
factory=win32
))
当我使用“buildbot start”启动 buildbot 时。我收到此错误消息:
buildmaster@builder:~/master$ buildbot start .
Following twistd.log until startup finished..
[-] Log opened.
[-] twistd 10.1.0 (/usr/bin/python 2.6.6) starting up.
[-] reactor class: twisted.internet.selectreactor.SelectReactor.
[-] Creating BuildMaster -- buildbot.version: 0.8.3p1
[-] loading configuration from /home/buildmaster/master/master.cfg
[-] error while parsing config file
[-] error during loadConfig
[-] Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/twisted/scripts/_twistd_unix.py",
line 317, in startApplication
app.startApplication(application, not self.config['no_save'])
File "/usr/lib/python2.6/dist-packages/twisted/application/app.py",
line 648, in startApplication
service.IService(application).startService()
File "/usr/lib/python2.6/dist-packages/twisted/application/service.py",
line 278, in startService
service.startService()
File "/usr/local/lib/python2.6/dist-packages/buildbot/master.py",
line 670, in startService
self.loadTheConfigFile()
--- <exception caught here> ---
File "/usr/local/lib/python2.6/dist-packages/buildbot/master.py",
line 703, in loadTheConfigFile
d = self.loadConfig((F))
File "/usr/local/lib/python2.6/dist-packages/buildbot/master.py",
line 727, in loadConfig
exec f in localDict
File "/home/buildmaster/master/master.cfg", line 17, in <module>
from buildbot.buildslave import BuildSlave
File "/usr/local/lib/python2.6/dist-packages/buildbot/buildslave.py",
line 27, in <module>
from buildbot.status.mail import MailNotifier
File "/usr/local/lib/python2.6/dist-packages/buildbot/status/mail.py",
line 28, in <module>
from twisted.mail.smtp import ESMTPSenderFactory
exceptions.ImportError: No module named mail.smtp
[-] The new config file is unusable, so I'll ignore it.
[-] I will keep using the previous config file instead.
The buildmaster appears to have encountered an error in the master.cfg config
file during startup. It is probably running with an empty configuration right
now. Please inspect and fix master.cfg, then restart the buildmaster.
谁能告诉我错误出在哪里?谢谢。
I installed buildbot and this is my master.cfg:
c = BuildmasterConfig = {}
from buildbot.buildslave import BuildSlave
c['slaves'] = [BuildSlave("windows", "windows32")]
c['slavePortnum'] = 9989
from buildbot.scheduler import Scheduler
c['schedulers'] = []
c['schedulers'].append(Scheduler(
name="start_scheduler",
branch=None,
treeStableTimer=None,
builderNames=["win32"]
))
from buildbot.process.factory import BuildFactory
from buildbot.steps.shell import ShellCommand
win32 = BuildFactory()
win32.addStep(ShellCommand(command=["touch", "dummfile"]))
from buildbot.config import BuilderConfig
c['builders'] = []
c['builders'].append(BuilderConfig(
name="win32", # also default name for builddir
slavenames=["windows"],
factory=win32
))
When I start buildbot with "buildbot start ." i get this error message:
buildmaster@builder:~/master$ buildbot start .
Following twistd.log until startup finished..
[-] Log opened.
[-] twistd 10.1.0 (/usr/bin/python 2.6.6) starting up.
[-] reactor class: twisted.internet.selectreactor.SelectReactor.
[-] Creating BuildMaster -- buildbot.version: 0.8.3p1
[-] loading configuration from /home/buildmaster/master/master.cfg
[-] error while parsing config file
[-] error during loadConfig
[-] Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python2.6/dist-packages/twisted/scripts/_twistd_unix.py",
line 317, in startApplication
app.startApplication(application, not self.config['no_save'])
File "/usr/lib/python2.6/dist-packages/twisted/application/app.py",
line 648, in startApplication
service.IService(application).startService()
File "/usr/lib/python2.6/dist-packages/twisted/application/service.py",
line 278, in startService
service.startService()
File "/usr/local/lib/python2.6/dist-packages/buildbot/master.py",
line 670, in startService
self.loadTheConfigFile()
--- <exception caught here> ---
File "/usr/local/lib/python2.6/dist-packages/buildbot/master.py",
line 703, in loadTheConfigFile
d = self.loadConfig((F))
File "/usr/local/lib/python2.6/dist-packages/buildbot/master.py",
line 727, in loadConfig
exec f in localDict
File "/home/buildmaster/master/master.cfg", line 17, in <module>
from buildbot.buildslave import BuildSlave
File "/usr/local/lib/python2.6/dist-packages/buildbot/buildslave.py",
line 27, in <module>
from buildbot.status.mail import MailNotifier
File "/usr/local/lib/python2.6/dist-packages/buildbot/status/mail.py",
line 28, in <module>
from twisted.mail.smtp import ESMTPSenderFactory
exceptions.ImportError: No module named mail.smtp
[-] The new config file is unusable, so I'll ignore it.
[-] I will keep using the previous config file instead.
The buildmaster appears to have encountered an error in the master.cfg config
file during startup. It is probably running with an empty configuration right
now. Please inspect and fix master.cfg, then restart the buildmaster.
Can anyone please tell me where the error is? Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您似乎没有安装
twisted.mail
。Looks like you don't have
twisted.mail
installed.您忘记将状态类中的邮件子类添加到 buildbot
添加此内容,它应该可以工作;顺便说一句,你的配置文件缺少很多东西;通常如果你保留buildbot自带的默认值并修改它就不会出现问题;而如果你在不知道它们在做什么的情况下开始切断它们,那就有点危险了。
您是否安装了 buildbot 并在 buildbot 站点上执行该过程?通常它附带了所有已安装的组件,但是如果您安装在 Windows 上,则无法使用twisted 或其他基本组件来运行它,因此它将无法正常工作。
希望这有帮助!
You forgot to add the mail subclass from the status class to buildbot
Add this and it should work; btw your config file is missing a lot of stuff; usually if you keep the default one that comes with buildbot and modify it you will have no problems; while if you start to cut off things without knowing what they do, is kinda dangerous.
Did you installed the buildbot doing the procedure on the buildbot site? Usually it comes with everything installed, but if you install on windows for example, you could not have either twisted or other basic components to run it, so it will not work correctly.
Hope that this helps!