当前位置:文档之家› Bugzilla安装,亲自安装成功,解决发邮件问题

Bugzilla安装,亲自安装成功,解决发邮件问题

Bugzilla安装与配置1.安装依赖yum install mysqlyum install mysql-develyum install perl2.解压bugzillatar xzf bugzilla-3.6.3.tar.gz利用checksetup.pl脚本检查所需perl模块是否齐全cd bugzilla-3.6.3./checksetup.pl --check-modules/usr/bin/perl install-module.pl --all如果在安装中出现YAML version is too low …的错误,解决办法如下:vi ./bugzilla-3.6.3/lib/CPAN.pm,在第59行之后加入“use YAML;”再执行安装。

3.创建mysql数据库/etc/init.d/mysqld start/usr/bin/mysqladmin -u root password '123456'mysql –uroot –pcreate database bugs;4.修改bugzilla配置文件Vi ./bugzilla-3.6.3/localconfig设置如下参数:$db_driver = 'mysql';$db_host = 'localhost';$db_name = 'bugs';$db_user = '';$db_pass = '********';5.执行安装,并设置管理员的登录邮箱、密码、用户名./checksetup.plEnter the e-mail address of the administrator: comebackdog@ Enter the real name of the administrator: renliangEnter a password for the administrator account:Please retype the password to verify:comebackdog@ is now set up as an administrator.Creating initial dummy product 'TestProduct'...Now that you have installed Bugzilla, you should visit the 'Parameters' page (linked in the footer of the Administrator account) to ensure it is set up as you wish - this includes setting the 'urlbase' option to the correct URL.6.http server服务器的配置1.mv ./bugzilla-3.6.3 /var/www/html/bugs2.httpd.conf配置文件,添加如下内容<Directory /var/www/html/bugs >AddHandler cgi-script .cgiOptions +Indexes +ExecCGIDirectoryIndex index.cgiAllowOverride Limit</Directory>改完之后重启Server7.邮件设置Administration→Parameters→email,进行如下设置:7.关于邮件发不出的定位方法:1、The new value for smtp_username is invalid: SMTP Authentication is not available. Run checksetup.pl for more details.这是我在Bugzilla中Create New Account的时候发验证邮件时产生的,这个的原因是Perl有个模块没有安装,安装下就可以了sudo perl install-module.pl Authen::SASL自己先可以通过$ ./checksetup.pl –check-modules查看下已经安装了哪些模块只要安装好,上述的这个问题就解决了2、提示邮件成功发送,但是实际邮件没有发送出去,因为我填的邮箱没有收到邮件在这里我原先是开启了use_mailer_queue这个功能于是我选择使用Test模式(Parameters -> Email -> mail_delivery_method -> SMTP)再发了一次,mailer.testfile木有邮件网络上有人和我是一样的问题,发不出去邮件,我参看这里/ever__love/blog/item/62473a9772800846d0135e2c.html的方法,把use_mailer_queue关闭(Parameters -> Email -> use_mailer_queue -> Off),再试着发送一次,果真mailer.testfile当中有邮件了这样就基本定位到问题use_mailer_queue没有正常工作于是又把use_mailer_queue开启执行下面的命令$ $BUGZILLA_HOME/jobqueue.pl checkConfiguration looks okayjobqueue.pl running – pid 53179 jobs in the queue.看起来似乎正常,但是提示9 jobs in the queue,并且这个数目一直没有减少,这说明邮件几乎都被堵塞在这里了,而并没有发出去于是又Debug发现$ $BUGZILLA_HOME/jobqueue.pl -f -d restart(实际中我执行了该指令后邮件就发出来了)Killing 9657Starting up…TheSchwartz::work_once found no jobsTheSchwartz::work_once found no jobs几乎神了,这里又说没有错误,那到底是哪里出问题了呢?目前无解,求解ING。

UPDATE 后来经过分析解决了此问题虽然debug jobqueue出来的信息开头几个没有发现什么异常,但是经过很多个“TheSchwartz::work_once found no jobs”之后出来一些错误信息,如下:……TheSchwartz::work_once found no jobsTheSchwartz::work_once found no jobsTheSchwartz::work_once found no jobs…….TheSchwartz::work_once found no jobsTheSchwartz::work_once found no jobsTheSchwartz::work_once found no jobsTheSchwartz::work_on ce got job of class ‘Bugzilla::Job::Mailer’Working on Bugzilla::Job::Mailer …Use of uninitialized value $hostname in concatenation (.) or string atBugzilla/Mailer.pm line 153.job failed. considering retry. is max_retries of 725 >= failures of 5? job fa iled: There was an error sending mail from ‘bugzilla_admin@’ to ‘xxxxx@’:Can’t call method “address” on an undefined value atlib/Email/Send/SMTP.pm line 25.TheSchwartz::work_once found no jobs……TheSchwartz::work_once found no jobsTheSchwartz::w ork_once got job of class ‘Bugzilla::Job::Mailer’Working on Bugzilla::Job::Mailer …Use of uninitialized value $hostname in concatenation (.) or string at Bugzilla/Mailer.pm line 153.job failed. considering retry. is max_retries of 725 >= failures of 5? job failed: There was an error sending mail from ‘bugzilla_admin@’ to ‘xxxxxx@’:Can’t call method “address” on an undefined valueat lib/Email/Send/SMTP.pm line 25.TheSchwartz::work_once found no jobs……TheSchwartz::work_once found no jobs……是我省略掉了很多这样相同的状态看起来这个jobqueue当中的任务不是立即就执行了的,它可能是经过某种算法才执行的否则不应该出现第一个就是“TheSchwartz::work_once found no jobs”,到后面才有任务执行的并且进一步发现这些任务队列都是放在数据库当中的一张表(ts_job)中的,任务成功一个就把它从这张表中删除不过此时问题还没有解决,认真看下错误,并且看了指出的错误地方的源代码,觉得应该是mailfrom填错了,可能我这里填的不完整又打开SMTP的调试开关(Parameters -> Email -> smtp_debug -> On),这样能看到更多的详细信息,基本觉得问题就在这了于是我填写了标准的邮件格式“username@”之后再试,邮件还不没有发出去,jobqueue的的数量又增加了一个,看来可能前面的这些包含错误信息的队列已经将后面的阻塞了,于是我试着将ts_job表当中的数据删除truncate table ts_job; // 反正我这里是直接truncate掉了的,我不知道这里delete和truncate有没有区别再次注册了一遍,看到后台输出通知邮件发送成功的信息,如下:TheSchwartz::work_once found no jobsTheSchwartz::work_once got job of class ‘Bugzilla::Job::Mailer’Working on Bugzilla::Job::Mailer …Net::SMTP>>> Net::SMTP(2.31)Net::SMTP>>> Net::Cmd(2.29)Net::SMTP>>> Exporter(5.63)Net::SMTP>>> IO::Socket::INET(1.31)Net::SMTP>>> IO::Socket(1.31)Net::SMTP>>> IO::Handle(1.28)Net::SMTP=GLOB(0xb79ce68)<<< 220 Esmtp QQ Mail Server Net::SMTP=GLOB(0xb79ce68)>>> EHLO localhost.localdomainNet::SMTP=GLOB(0xb79ce68)<<< Net::SMTP=GLOB(0xb79ce68)<<< 250-PIPELININGNet::SMTP=GLOB(0xb79ce68)<<< 250-SIZE 52428800Net::SMTP=GLOB(0xb79ce68)<<< 250-AUTH LOGIN PLAINNet::SMTP=GLOB(0xb79ce68)<<< 250-AUTH=LOGINNet::SMTP=GLOB(0xb79ce68)<<< 250 8BITMIMENet::SMTP=GLOB(0xb79ce68)>>> AUTH LOGIN……Net::SMTP=GLOB(0xb79ce68)<<< 235 Authentication successfulNet::SMTP=GLOB(0xb79ce68)>>> MAIL FROM:Net::SMTP=GLOB(0xb79ce68)<<< 250 OkNet::SMTP=GLOB(0xb79ce68)>>> RCPT TO:Net::SMTP=GLOB(0xb79ce68)<<< 250 OkNet::SMTP=GLOB(0xb79ce68)>>> DATANet::SMTP=GLOB(0xb79ce68)<<< 354 End data with .Net::SMTP=GLOB(0xb79ce68)>>> From: xxxxxx@Net::SMTP=GLOB(0xb79ce68)>>> To: xxxxxx@Net::SMTP=GLOB(0xb79ce68)>>> Subject: Bugzilla: confirm account creationNet::SMTP=GLOB(0xb79ce68)>>> X-Bugzilla-Type: adminNet::SMTP=GLOB(0xb79ce68)>>> X-Bugzilla-URL:Net::SMTP=GLOB(0xb79ce68)>>> Auto-Submitted: auto-generatedNet::SMTP=GLOB(0xb79ce68)>>> Content-Type: text/plain;charset=”UTF-8″Net::SMTP=GLOB(0xb79ce68)>>> MIME-Version: 1.0Net::SMTP=GLOB(0xb79ce68)>>> Date: Tue, 05 Apr 2011 16:05:23 +0800 Net::SMTP=GLOB(0xb79ce68)>>>Net::SMTP=GLOB(0xb79ce68)>>> Bugzilla has received a request to create a user accountNet::SMTP=GLOB(0xb79ce68)>>> using your email address(xxxxxx@).Net::SMTP=GLOB(0xb79ce68)>>>Net::SMTP=GLOB(0xb79ce68)>>> To continue creating an account using this email address, visit theNet::SMTP=GLOB(0xb79ce68)>>> following link by April 8, 2011 at 16:05 CST: Net::SMTP=GLOB(0xb79ce68)>>>Net::SMTP=GLOB(0xb79ce68)>>>token.cgi?t=FegLL6OpYM&a=request_new_accountNet::SMTP=GLOB(0xb79ce68)>>> PRIVACY NOTICE: Bugzilla is an open bug tracking system. Activity on mostNet::SMTP=GLOB(0xb79ce68)>>> bugs, including email addresses, will be visible to the public. We recommend……Net::SMTP=GLOB(0xb79ce68)>>> .Net::SMTP=GLOB(0xb79ce68)<<< 250 Ok: queued asNet::SMTP=GLOB(0xb79ce68)>>> QUITNet::SMTP=GLOB(0xb79ce68)<<< 221 Byejob completedTheSchwartz::work_once found no jobs到QQ Mail也看到发送成功的邮件,在Gmail也收到了邮件,到此才算基本成功。

相关主题