Ask Your Question
0

Error in puppet : File[…] doesn't seem to be in the catalog

asked 2016-07-04 04:41:01 -0600

ruddhani gravatar image
 I want to add successive crons via puppet, first one to set as each 10 minutes, and the 2nd one to run in Sunday 7:00PM.

The first cron in puppet is working properly, but the 2nd one shows the below error: "Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid relationship: Cron[notifyinactivetargetweekly] { require => File[...notifyinactivetargetweekly.sh] }, because File[...notifyinactivetargetweekly.sh] doesn't seem to be in the catalog Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run"

Below are the manifest code.

cron { 'firstcronsync':
    command => "${scmdemophp::DocRootDir}/firstcronsync.sh ${scmdemophp::Environment} ${scmdemophp::DocRootDir}",
    require => File["${scmdemophp::DocRootDir}/firstcronsync.sh"],
    minute  => '*/10',
    environment=>["COMPOSER_HOME=${scmdemophp::DocRootDir}",
                    "SYMFONY_ENV=${scmdemophp::Environment}",
                    "SYMFONY_DEBUG=${scmdemophp::Debug}",
                    "PATH=/opt/rh/php55/root/usr/bin:/opt/rh/php55/root/usr/sbin:/usr/local/sbin:/usr/local/bin:/sbin/:/bin/:/usr/sbin/:/usr/bin/"
                ],

}->
cron { 'notifyinactivetargetweekly':
    command => "${scmdemophp::DocRootDir}/notifyinactivetargetweekly.sh ${scmdemophp::Environment} ${scmdemophp::DocRootDir}",
    require => File["${scmdemophp::DocRootDir}/notifyinactivetargetweekly.sh"],
    minute  => '00',
    hour  => '19',
    weekday  => 'Sunday',
    environment=>["COMPOSER_HOME=${scmdemophp::DocRootDir}",
                    "SYMFONY_ENV=${scmdemophp::Environment}",
                    "SYMFONY_DEBUG=${scmdemophp::Debug}",
                    "PATH=/opt/rh/php55/root/usr/bin:/opt/rh/php55/root/usr/sbin:/usr/local/sbin:/usr/local/bin:/sbin/:/bin/:/usr/sbin/:/usr/bin/"
                ],

}->

The hieradata consists the below classloading:

classes:
  - scmdemophp::edsconsoledeploy

the init.pp of edsconsoledeploy consists:

class scmdemophp {
    $DocRootDir = "/app/code"

and I checked that the file "/app/code/notifyinactivetargetweekly.sh" exists.

edit retag flag offensive close merge delete

Comments

You are requiring File["${scmdemophp::DocRootDir}/notifyinactivetargetweekly.sh"], but where in the manifest is this resource defined?

twstoll gravatar imagetwstoll ( 2016-07-05 09:25:26 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2016-07-05 20:53:19 -0600

This question was answered at Stack Overflow.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-07-04 04:41:01 -0600

Seen: 1,311 times

Last updated: Jul 05 '16