Puppet exit code 6 - puppet

I am trying to install Microsoft C++ 2010 Runtime Components for a 32 bit windows 7 machine using puppet script.
The block of code I have is --
package {'Microsoft2010RuntimeComponents32' :
ensure => 'installed',
source => "${src}\\vc2010_redist\\vcredist_x86.exe",
install_options => ["/q","/log"=>"${log_5}"],
}
When I run puppet agent --test it is exiting with the error code 6 and I am receiving the error as
1;31mError: Could not set 'present' on ensure: Invalid argument - ruby_setenv at 13:/etc/puppet/modules/module_name/manifests/test.pp
Not aware of this ruby_setenv error. Can somebody pls help !!

Related

Puppet 7 + datadog module. Fatal error. no parameter named

We have:
Ubuntu 20.04 and Puppet 7.
We faced the issue with modules:
puppet-datadog-agent (both versions 3.1.0 and 3.15.0) and puppetlabs-concat (both versions 2.2.1 and 7.1.1) throw this error :
2022-07-05 11:15:56 +0000 Puppet (err): no parameter named 'target' (file: ../modules/concat/manifests/fragment.pp, line: 50) on Concat_fragment[datadog header] (file: ../modules/concat/manifests/fragment.pp, line: 50) on node [DNS](http://DNS)
We had a working puppet before updated datadog and concat modules, and now even rollback doesn't help us :(
Any ideas, dear experts?

autoload error when using puppetlabs/chocolatey module

I am not new to puppet, but I am new to using it on Windows. Trying to configure chocolatey using the puppetlabs/chocolatey module. Initial puppet run without the module worked just fine. Then I added include chocolatey to the manifest, and it downloaded and installed chocolatey. So far, so good. However, then I went to add a custom source like so:
chocolateysource { 'mysource':
ensure => present,
location => 'https://my.chocolatey.source',
priority => 10,
}
Now I get the following message when running puppet agent -t:
PS C:\Windows\system32> puppet agent -t
Error: Could not autoload puppet/provider/package/chocolatey: C:/ProgramData/PuppetLabs/puppet/cache/lib/puppet/provider/package/chocolatey.rb:280: syntax error, unexpected '.'
pin_output&.split("\n")&.each { |pin| pin...
^
C:/ProgramData/PuppetLabs/puppet/cache/lib/puppet/provider/package/chocolatey.rb:280: syntax error, unexpected '.'
... pin_output&.split("\n")&.each { |pin| pins << pin.spli...
... ^
Error: Facter: error while resolving custom facts in C:/ProgramData\PuppetLabs\puppet\cache\lib\facter\package_provider.rb: Could not autoload puppet/provider/package/chocolatey: C:/ProgramData/PuppetLabs/puppet/cache/lib/puppet/provider/package/chocolatey.rb:280: syntax error, unexpected '.'
pin_output&.split("\n")&.each { |pin| pin...
^
C:/ProgramData/PuppetLabs/puppet/cache/lib/puppet/provider/package/chocolatey.rb:280: syntax error, unexpected '.'
... pin_output&.split("\n")&.each { |pin| pins << pin.spli...
... ^
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Redefining package in Puppet::Type
Error: Could not autoload puppet/type/chocolateysource: C:/ProgramData/PuppetLabs/puppet/cache/lib/puppet/type/chocolateysource.rb:221: syntax error, unexpected '.'
parameter(:password)&.sensitive = true
^
Error: Could not retrieve catalog from remote server: Could not intern from text/pson: Could not autoload puppet/type/chocolateysource: C:/ProgramData/PuppetLabs/puppet/cache/lib/puppet/type/chocolateysource.rb:221: syntax error, unexpected '.'
parameter(:password)&.sensitive = true
^
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
As a non-Windows user, I feel like I'm missing something to make this work, but I'm not sure what it is. I have verified that .Net framework is installed, but not sure what else to check here. Thanks in advance for any help.
Turns out the version was the issue. I had mistakenly installed puppet 4 agent, while the server is puppet 7.

SAP Commerce Cloud with Spartacus installation error

I am with a local installation of Sap Commerce Cloud 2011 with Spartacus following the steps of https://sap.github.io/spartacus-docs/installing-sap-commerce-cloud-2011/
When i execute the sentence: install.bat -r cx-for-spa
BUILD FAILED
D:\CX\SCC\hybris\bin\platform\build.xml:9: The following error occurred while executing this line:
D:\CX\SCC\hybris\bin\platform\resources\ant\antmacros.xml:89: The following error occurred while executing this line:
D:\CX\SCC\hybris\bin\platform\resources\ant\mavenTasks.xml:440: Java returned: 1
Total time: 3 seconds
Task :recipes:cx-for-spa:createStoreFrontExt FAILED
FAILURE: Build failed with an exception.
Where:
Build file 'D:\CX\SCC\installer\recipes\cx-for-spa\build.gradle' line: 581
What went wrong:
Execution failed for task ':recipes:cx-for-spa:createStoreFrontExt'.
external process returned non-zero exit code, command: [cmd, /c, set "ANT_OPTS=-Xmx1024m -Dfile.encoding=UTF-8" & set "PLATFORM_HOME=D:\CX\SCC\hybris\bin\platform" & set "ANT_HOME=D:\CX\SCC\hybris\bin\platform\apache-ant" & set "PATH=D:\CX\SCC\hybris\bin\platform\apache-ant\bin;%PATH%" & ant createConfig -Dinput.template=develop]
I have executed those steps( sets and ant ) and repeat the install setence..but this error always appears.
Any help is welcome .. thank you very much in advance
I did the same installation last week (Sap Commerce 2011 for Spartacus).
Question to you:
Have you installed the jdk SapMachine 11 or 17? (17 makes trouble)
https://sap.github.io/SapMachine/
Have you updated the System Environment Variables of your system?
https://www.youtube.com/watch?v=E5wJXR63g1U
Have you comment out "Build Parallel = true" in the config file?
C:\SapCommerce2011\installer\customconfig
In file:"build.parallel=true" => "#build.parallel=true"
KR
Nathan

Puppet manifests file which is running fine on windows 7, returning error on windows server 2008

I am working on the puppet manifests file to install and upgrade few of the application on the windows machine.
The code I have made is doing exactly what I wanted on the windows 7 machine, but when the same code is running on the windows server 2008 machine, it is returning following error:
Error: Could not prefetch package provider 'windows': Type 0 is not supported.
Error: /Stage[main]/Main/Package[Apache Tomcat 7.0 Tomcat7 (remove only)]: Coul
not evaluate: Type 0 is not supported.
Error: /Stage[main]/Main/Package[Java 8 Update 92 (64-bit)]: Could not evaluate
Type 0 is not supported.
Error: /Stage[main]/Main/Package[Microsoft .NET Framework 4.5.1]: Could not eva
uate: Type 0 is not supported.
Here is the code I am running
package { 'Java 8 Update 92 (64-bit)' :
ensure => installed,
source => 'C:\ProgramData\PuppetLabs\temp\jdk-8u92-windows-x64.exe',
install_options => ['/s',{ 'INSTALLDIR' => 'C:\opt\java' }],
provider => windows
}

puppet-acl module on Windows throws transactionstore.yaml corrupt error

Trying out puppet-acl module on Windows Server 2016, Preview5. I'm getting the weirdest error on the second puppet run. If i remove the trnsactionstore.yaml file, and re-run the puppet agent, the behavior is repeatable. Im running puppet4 with latest agent version.
This is my codeblock
acl { "c:/temp":
permissions => [
{ identity => 'Administrator', rights => ['full'] },
{ identity => 'Users', rights => ['read','execute'] }
],
}
This is the output from the puppet-run.
PS C:\ProgramData\PuppetLabs\puppet\cache\state> puppet agent -t
Info: Using configured environment 'local'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for opslowebf02n02.local
Error: Transaction store file C:/ProgramData/PuppetLabs/puppet/cache/state/transactionstore.yaml is corrupt (wrong number of arguments (0 for 1..2)); replacing
Error: Transaction state file C:/ProgramData/PuppetLabs/puppet/cache/state/transactionstore.yaml is valid YAML but not returning a hash. Check the file for corruption, or remove it before continuing.
Info: Applying configuration version '1471436916'
Notice: /Stage[main]/platform_base_system::Role::Windows/Exec[check-powershell-exection-policy]/returns: executed successfully
Notice: /Stage[main]/configs_iis::Profile::Default/Exec[check-iis-global-anonymous-authentication]/returns: executed successfully
Notice: Applied catalog in 7.42 seconds
In the transactionstore.yaml file, this is the error section:
Acl[c:/temp]:
parameters:
permissions:
system_value:
- !ruby/hash:Puppet::Type::Acl::Ace {}
- !ruby/hash:Puppet::Type::Acl::Ace {}
inherit_parent_permissions:
system_value: :true
This has been resolved by dowwngrading the puppet agent to 4.5.3.
Behavior of the 4.6.0 version must have changed.
With 4.5.3 i still see the error in the logfile, but the puppetrun does not fail
I'll try to talk to the people at puppet about this.
Acl[c:/temp]:
parameters:
permissions:
system_value:
- !ruby/hash:Puppet::Type::Acl::Ace {}
- !ruby/hash:Puppet::Type::Acl::Ace {}
inherit_parent_permissions:
system_value: :true
This is being tracked as https://tickets.puppetlabs.com/browse/PUP-6629. It's almost coincidental that you created https://tickets.puppetlabs.com/browse/PUP-6630 right afterwards.

Resources