Failed to generate additional resources using 'eval_generate': Cannot manage files of type socket

asked 2016-06-28 08:40:48 -0500

rbhanot4739 gravatar image

updated 2016-06-28 08:44:51 -0500

Hello,

I am very new to puppet and in learning and novice phase so please spare if my questions are noob !! So let me explain the issue i am facing. I am trying to create a basic nginx module and some part of it runs just fine then i start getting this error.

Failed to generate additional resources using 'eval_generate': Cannot manage files of type socket

I have searched the internet quite a bit but could not find a solution to this. I am running open puppet 3.7 on CentOS 6.7. Below is how my configuration looks.

[root@puppet nginx]# ls -R files/ manifests/
files/:
etc  var

files/etc:
sites-enabled

files/etc/sites-enabled:
cat-picture.conf

files/var:
www

files/var/www:
cat-pictures

files/var/www/cat-pictures:
index.html

manifests/:
config.pp  init.pp  install.pp  service.pp
[root@puppet nginx]#

Here are the contents of manifest files.

[root@puppet nginx]# cat manifests/install.pp
class nginx::install {
  package { 'nginx':
    ensure        => present,
  }

}
[root@puppet nginx]# cat manifests/config.pp
class nginx::config {
  file { 'default':
    mode    => '0644',
    owner   => 'root',
    group   => 'root',
    path     => '/etc/nginx/',
    ensure   => present,
    recurse  => true,
    source   => 'puppet:///modules/nginx/etc',
    notify   => Class['nginx::service'],
  }

  file { 'index.html':
    mode    => '0644',
    owner   => 'root',
    group   => 'root' ,
    path    => '/var',
    source  => 'puppet:///modules/nginx/var',
    ensure  =>  present,
    recurse => true,
    notify  =>  Class['nginx::service'],
  }
}

During my troubleshooting what i have figure out is that this error starts to come after the file { 'index.html':} in config.pp, if i remove this resource declaration then the catalog run executes fine without any error. Any help would be highly appreciated.

edit retag flag offensive close merge delete

Comments

Another observation which i noticed is that this issue is occurring only for /var filesystem.

rbhanot4739 gravatar imagerbhanot4739 ( 2016-06-30 06:29:36 -0500 )edit