Skip to content

Loading…

/etc/init/hubot.conf example fails in CentOS 6 #372

Closed
parkr opened this Issue · 9 comments

3 participants

@parkr

On the wiki page Deploying onto UNIX (which should just be named "Deploying onto Ubuntu"), the hubot.conf init file doesn't work under CentOS.

After inputting my configuration, I ran start hubot, which produced:

hubot start/running, process 3520

Great, right? When I check on hubot using status hubot, I get:

hubot stop/waiting

Something's wrong.

When I try bash /etc/init/hubot.conf to see if I can manually run the program, I get an error:

/etc/init/hubot.conf: line 28: respawn: command not found
/etc/init/hubot.conf: line 29: respawn: command not found

Hm. Where does respawn lie in CentOS and how can I use it?

A couple searches on Google shows that it's a subcommand of /etc/inittab. Glorious! I'll just use bash /etc/inittab respawn:

/etc/inittab: line 26: id:3:initdefault:: command not found

Urgh! Now I have no idea how to fix this and know too little about inittab to be of any help to myself.

@parkr

Do I need to allow port 5555 in my iptables config?

@atmos

Sadly, these docs are horribly wrong in a lot of ways. I don't run CentOS so I'm not sure how to help but I'm not surprised that this is a frustrating experience for you. :unamused:

@parkr

Thanks for the moral support, @atmos. Hopefully this can be figured out.

@parkr

Looks like hubot uses port 443 to listen to streaming.campfirenow.com API.

My iptables config contains accepts 443 requests:

$ /etc/init.d/iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination         
1    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:5555 
2    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:555 
3    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:443 
4    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:80 
5    ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           udp dpt:25 
6    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:25 
7    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:443 
8    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:80 
9    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
10   ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
11   ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
12   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           state NEW tcp dpt:22 
13   REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 
14   ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:80 
15   ACCEPT     tcp  --  0.0.0.0/0            127.0.0.1           tcp spts:1024:65535 dpt:25 state NEW,ESTABLISHED 
16   ACCEPT     tcp  --  0.0.0.0/0            127.0.0.1           tcp spts:1024:65535 dpt:25 state NEW,ESTABLISHED 

Chain FORWARD (policy ACCEPT)
num  target     prot opt source               destination         
1    REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited 

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination         
1    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:5555 
2    ACCEPT     tcp  --  127.0.0.1            0.0.0.0/0           tcp spt:25 dpts:1024:65535 state ESTABLISHED 
3    ACCEPT     tcp  --  127.0.0.1            0.0.0.0/0           tcp spt:25 dpts:1024:65535 state ESTABLISHED 

Do I need to allow for outgoing connections on 443?

@parkr

I just tried that and it helped 0. Urgh.

@atmos

You definitely need outbound 443. The rest of your setup is pretty boned afaict. If you get iptables and firewalls you should be able to wrap your head around the process management required.

Running bash /etc/inittab makes absolutely no sense so I really don't know how to help you there.

We don't support any hubot.conf format afaik so you're on your own and perhaps you're getting :trollface: by the wiki page. Perhaps review the history of the authors of the wiki pages and email them directly.

@parkr

Thanks for the advice.

I can now run start hubot successfully and status hubot gives me the same thing, so that's great (and there are no errors in /var/log/hubot.log).

I enabled 443 (I think?) and my iptables config now looks like this:

Table: filter
Chain INPUT (policy ACCEPT)
num  target     prot opt source               destination         
3    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:443 

...

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination         
1    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:443 

That looks like it should allow incoming and outgoing connections through port 443.

Where I'm at right now is that when I type any hubot cmd into my campfire room, I get nothing. Considering that the basic scripts like ping and pug me are installed, hubot shouldn't be ignoring these (the default behaviour is to ignore rather than throw an error when the command is not understood).

Who setup hubot at Github? Maybe s/he could help.

@parkr

Update: got the exact same config working on heroku without any issues.

@tombell

Closing this as it's a specific OS setup issue unrelated to hubot.

@tombell tombell closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.