Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Centos 7 install #151

Closed
mszymo opened this issue May 31, 2017 · 2 comments
Closed

Centos 7 install #151

mszymo opened this issue May 31, 2017 · 2 comments

Comments

@mszymo
Copy link

mszymo commented May 31, 2017

Puppet version 3.8.7.
puppet-kafka 2.1.0.

I'm having trouble getting this to work on a centos 7 server. It seems as though it tries and fails to start the service. I've used this same code on our ubuntu 14 servers and it works perfectly. I've also tried using puppet-kafka 3.0.0 but it has the same result.

Heres the code I'm using:

# install zookeeper
	if($::osfamily == 'Debian'){
		class { 'zookeeper':
        install_java => false,
        servers => [
          "$::ipaddress"
        ]

		}
	}
	elsif($::osfamily == 'RedHat'){
	    class { 'zookeeper':
		repo => 'cloudera',
		cdhver => '5',
		initialize_datastore => true,
        require => Exec['remove-ai-folders'],
        install_java => false,
		service_provider => 'systemd',
        servers => [
          "$::ipaddress"
        ]

		}
	}

    #intall kafka
    class{ 'kafka':
        require => Class["zookeeper"],
        version => '0.10.1.0',
        install_java => false,
        scala_version => '2.11'
    }

    class {'kafka::broker':
        require => Class['kafka'],
        install_java => false,
        service_ensure => 'running',
        service_install => true,
		version => '0.10.1.0',
		scala_version => '2.11',
        config => {
            'broker.id' => '0',
            'zookeeper.connect' => "$::ipaddress:2181",
            'inter.broker.protocol.version' => '0.10.1.0',
			'log.retention.minutes' => 5,
        }
    }

As you can see I have to get zookeeper through cloudera first. I have checked and the zookeeper service is running. Here are the errors I'm getting.

2017-05-31 17:00:23 +0000 Puppet (notice): Compiled catalog for ip-10-1-1-30 in environment production in 0.80 seconds
2017-05-31 17:00:24 +0000 Puppet (err): Could not start Service[kafka]: Execution of '/bin/systemctl start kafka' returned 5: Failed to start kafka.service: Unit not found.
2017-05-31 17:00:24 +0000 /Stage[main]/Kafka::Broker::Service/Service[kafka]/ensure (err): change from stopped to running failed: Could not start Service[kafka]: Execution of '/bin/systemctl start kafka' returned 5: Failed to start kafka.service: Unit not found.

I've also tried setting mirror_url but it doesn't seem to have any effect. Does anyone have any insight in how to get this to work with Centos 7? Does it have anything to do with the fact that I installed zookeeper through the cloudera repo?

Thanks for any help

@iamshulya
Copy link

iamshulya commented Jun 28, 2017

@mszymo Hi, you solved this problem?

@mszymo
Copy link
Author

mszymo commented Jul 6, 2017

@shulyad Yeah. It was fixed in in 2.2.0 with issue #105 with the parameter 'kafka::broker':service_requires_zookeeper => false,

The problem was that in centos 7 the service is called zookeeper-server.service while in ubuntu 14 it is called zookeeper.service (I think this may be universal for systemd/init) and this kafka module is hardcoded to look for zookeeper.service. The above parameter is a workaround so that it doesn't look for zookeeper at all. Would be nice if this was added to the readme, or if the service name wasn't hardcoded like that.

@mszymo mszymo closed this as completed Jul 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants