How to restart DamageControl
You have to get sudo karma to be able to do this.
sudo svc -d /service/damagecontrol sudo killall ruby sudo svc -u /service/damagecontrol
Look at the /home/services/dcontrol/damagecontrol.log file and check that it starts up properly:
tail -f /home/services/dcontrol/damagecontrol.log
The output should look something like this:
INFO DamageControl: #<DamageControl::SocketTrigger:0x4053a54c> listening on port 4711 INFO DamageControl: starting #<DamageControl::BuildHistoryRepository:0x40539fc0> [2004-04-26 06:23:50] INFO WEBrick 1.3.1 [2004-04-26 06:23:50] INFO ruby 1.8.1 (2003-12-25) [i686-linux] [2004-04-26 06:23:50] WARN TCPServer Error: Address family not supported by protocol - socket(2) [2004-04-26 06:23:50] INFO WEBrick::HTTPServer#start: pid=9554 port=4712 INFO DamageControl: starting #<DamageControl::BuildExecutor:0x406a1c4c> INFO DamageControl: starting #<DamageControl::BuildScheduler:0x406a1c60> INFO DamageControl: starting #<DamageControl::GraphPublisher:0x406a0298> INFO DamageControl: starting #<DamageControl::FilePublisher:0x406a0478> INFO DamageControl: starting #<DamageControl::IRCPublisher:0x4069fec4> INFO DamageControl: connecting to irc.codehaus.org INFO DamageControl: connected to irc.codehaus.org INFO DamageControl: joining channel INFO DamageControl: joined to #damagecontrol INFO DamageControl: starting #<DamageControl::EmailPublisher:0x4067587c> INFO DamageControl: starting #<DamageControl::SelfUpgrader:0x406755d4>
Sometimes sub-processes hangs on to opened sockets, so damagecontrol can't start up again, in that case you need to kill those sub-processes. Use netstat to check which processes are using which ports and kill those processes:
[tirsen@beaver dcontrol]$ sudo netstat -lp Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 *:cvspserver *:* LISTEN 25625/tcpserver tcp 0 0 *:5347 *:* LISTEN 13461/router tcp 0 0 *:5222 *:* LISTEN 13458/c2s tcp 0 0 *:4711 *:* LISTEN 9554/ruby tcp 0 0 *:4712 *:* LISTEN 9554/ruby tcp 0 0 *:4200 *:* LISTEN 8896/java tcp 0 0 *:4201 *:* LISTEN 8896/java tcp 0 0 *:3690 *:* LISTEN 30303/tcpserver tcp 0 0 *:4202 *:* LISTEN 8896/java tcp 0 0 *:mysql *:* LISTEN 4738/mysqld tcp 0 0 *:4203 *:* LISTEN 8896/java tcp 0 0 localhost.localdom:5005 *:* LISTEN 12149/java tcp 0 0 *:pop3 *:* LISTEN 24356/tcpserver tcp 0 0 *:23791 *:* LISTEN 10108/java tcp 0 0 *:http *:* LISTEN 13153/httpd tcp 0 0 *:5008 *:* LISTEN 12149/java tcp 0 0 localhost.localdo:61618 *:* LISTEN 3489/java tcp 0 0 *:8181 *:* LISTEN 10108/java tcp 0 0 *:5269 *:* LISTEN 13459/s2s tcp 0 0 localhost.locald:domain *:* LISTEN 20229/dnscache tcp 0 0 *:8182 *:* LISTEN 10108/java tcp 0 0 *:ssh *:* LISTEN 17240/sshd tcp 0 0 *:5080 *:* LISTEN 12149/java tcp 0 0 localhost.loca:postgres *:* LISTEN 8613/postmaster tcp 0 0 *:smtp *:* LISTEN 24345/tcpserver tcp 0 0 localhost.localdom:6011 *:* LISTEN 6141/sshd tcp 0 0 localhost.localdom:6012 *:* LISTEN 27913/sshd udp 0 0 *:5123 *:* 9701/java udp 0 0 beaver.codehaus.:domain *:* 20717/tinydns udp 0 0 localhost.locald:domain *:* 20229/dnscache udp 0 0 *:756 *:* 2700/xinetd udp 0 0 beaver.codehaus.org:ntp *:* 29637/ntpd udp 0 0 localhost.localdoma:ntp *:* 29637/ntpd udp 0 0 *:ntp *:* 29637/ntpd Active UNIX domain sockets (only servers) Proto RefCnt Flags Type State I-Node PID/Program name Path unix 2 [ ACC ] STREAM LISTENING 2717 2774/xfs /tmp/.font-unix/fs7100 unix 2 [ ACC ] STREAM LISTENING 8351507 28458/ssh-agent /tmp/ssh-XXSZNVRd/agent.28457 unix 2 [ ACC ] STREAM LISTENING 55278381 8613/postmaster /tmp/.s.PGSQL.5432 unix 2 [ ACC ] STREAM LISTENING 1680485 4738/mysqld /tmp/mysql.sock unix 2 [ ACC ] STREAM LISTENING 44048323 28530/ssh-agent /tmp/ssh-XXSllPc1/agent.28527 unix 2 [ ACC ] STREAM LISTENING 57871286 27913/sshd /tmp/ssh-XXVRLMMI/agent.27913 unix 2 [ ACC ] STREAM LISTENING 57678553 6141/sshd /tmp/ssh-XXCq6UCi/agent.6141
Damagecontrol opens port 4711 (for the SocketTrigger, soon to be deprecated) and 4712 (for the XMLRPC API and the http server), so the lines to look for are:
tcp 0 0 *:4711 *:* LISTEN 9554/ruby tcp 0 0 *:4712 *:* LISTEN 9554/ruby
If DamageControl can't start properly then these processes are the ones that needs to be killed, so in this case you would do:
sudo kill -KILL 9554
WARNING! Do this only if DamageControl doesn't start properly!
