Jira (PUP-11473) Error: Failed to apply catalog: undefined method `bytesize' for nil:NilClass on WinServer 2016

21 views
Skip to first unread message

Selvakumar Azhagarsami (Jira)

unread,
Mar 1, 2022, 11:30:03 PM3/1/22
to puppe...@googlegroups.com
Selvakumar Azhagarsami created an issue
 
Puppet / Bug PUP-11473
Error: Failed to apply catalog: undefined method `bytesize' for nil:NilClass on WinServer 2016
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2022/03/01 8:29 PM
Priority: Normal Normal
Reporter: Selvakumar Azhagarsami

Puppet Version: 6.22.1
Puppet Server Version: PE 2019.8.5
OS Name/Version:

Describe your issue in as much detail as possible…
Describe steps to reproduce…

Desired Behavior:

Actual Behavior:

Please take a moment and attach any relevant log output and/or manifests. This will help us immensely when troubleshooting the issue.

Examples:
Run puppet agent with --test --trace --debug

Relevant sections of /var/log/puppetlabs/puppetserver/puppetserver.log or any applicable logs from the same directory.

For more detailed information turn up the server logs by upping the log level in the server's logback.xml

Relevant sections of configurations files (puppet.conf, hiera.conf, Server's conf.d, defaults/sysconfig)

For memory issues with server heap dumps are also helpful.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.20.2#820002-sha1:829506d)
Atlassian logo

Selvakumar Azhagarsami (Jira)

unread,
Mar 2, 2022, 12:00:03 AM3/2/22
to puppe...@googlegroups.com
Selvakumar Azhagarsami updated an issue
Change By: Selvakumar Azhagarsami
*Puppet Version: 6.22.1*
*Puppet Server Version: PE 2019.8.5*
*OS Name/Version:
Windows Server 2016 *


Describe your issue in as much detail as possible…


Describe steps to reproduce…

*Desired Behavior:*

*Actual Behavior:*

Please take a moment Actual error message:
{code:java}
[0;36mDebug: Could not retrieve raw SID bytes from 'Administrator': Failed to convert string SID: Administrator:  The security ID structure is invalid. [0m
[0;36mDebug: Failed to call LookupAccountNameW with account: Administrator:  No mapping between account names
and attach any relevant log output security IDs was done. [0m
[0;36mDebug: Could not retrieve raw SID bytes from 'EC2AMAZ-NAUKKA2\Administrator': Failed to convert string SID: EC2AMAZ-NAUKKA2\Administrator:  The security ID structure is invalid. [0m
[0;36mDebug: Failed to call LookupAccountNameW with account: EC2AMAZ-NAUKKA2\Administrator:  No mapping between account names
and security IDs was done. [0m
[1;31mError: Could not send report: undefined method `bytesize' for nil:NilClass
C:
/ or manifests Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/api_types . This will help us immensely when troubleshooting the issue rb:125:in `from_wide_string'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/api_types
. rb:26:in `from_string_to_wide_string'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:184:in `string_to_sid_ptr'
Examples C : /Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/security.rb:431:in `add_access_allowed_ace'
Run C:/Program Files/Puppet Labs/Puppet/ puppet agent with --test --trace --debug /lib/ruby/vendor_ruby/puppet/util/windows/security.rb:659:in `block (7 levels) in set_security_descriptor'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/access_control_list.rb:28:in `block in each'
Relevant sections of {{ C: / var Program Files / log Puppet Labs / puppetlabs Puppet / puppetserver puppet / puppetserver lib/ruby/vendor_ruby/puppet/util/windows/access_control_list . log}} or any applicable logs from the same directory rb:28:in `each'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/access_control_list
. rb:28:in `each'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/security.rb:655:in `block (6 levels) in set_security_descriptor'
For more detailed information turn up the server logs by upping the log level C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:192: in the server `block (3 levels) in string_to_sid_ptr ' s logback
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/api_types
. xml rb:94:in `read_win32_local_pointer'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:191:in `block (2 levels) in string_to_sid_ptr'
Relevant sections of configurations files C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:185:in `initialize'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:185:in `new'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:185:in `block in string_to_sid_ptr'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/api_types.rb:129:in `from_wide_string'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/api_types.rb:26:in `from_string_to_wide_string'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:184:in `string_to_sid_ptr'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/security.rb:654:in `block
( 5 levels) in set_security_descriptor'
C:/Program Files/Puppet Labs/Puppet/
puppet /lib/ruby/vendor_ruby/puppet/util/windows/sid . conf, hiera rb:192:in `block (3 levels) in string_to_sid_ptr'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/api_types
. conf, Server rb:94:in `read_win32_local_pointer ' s conf
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid
. d, defaults rb:191:in `block (2 levels) in string_to_sid_ptr'
C:
/ sysconfig Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:185:in `initialize'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:185:in `new'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:185:in `block in string_to_sid_ptr'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/api_types.rb:129:in `from_wide_string'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/api_types.rb:26:in `from_string_to_wide_string'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:184:in `string_to_sid_ptr'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/security.rb:653:in `block (4 levels
) in set_security_descriptor'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/security.rb:526:in `open_file'
For memory issues with server heap dumps are also helpful C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/security . rb:652:in `block (3 levels) in set_security_descriptor'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/security.rb:538:in `with_privilege'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/security.rb:651:in `block (2 levels) in set_security_descriptor'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/security.rb:538:in `with_privilege'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/security.rb:650:in `block in set_security_descriptor'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/security.rb:641:in `initialize'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/security.rb:641:in `new'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/security.rb:641:in `set_security_descriptor'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/file_system/windows.rb:180:in `set_dacl'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/file_system/windows.rb:151:in `replace_file'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/file_system.rb:416:in `replace_file'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/indirector/report/yaml.rb:27:in `save'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:319:in `save'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:478:in `send_report'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:454:in `ensure in run_internal'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:455:in `run_internal'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:245:in `block (2 levels) in run'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet.rb:314:in `override'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:244:in `block in run'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet.rb:314:in `override'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:218:in `run'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:60:in `block (5 levels) in run'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/2.5.0/timeout.rb:93:in `block in timeout'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/2.5.0/timeout.rb:103:in `timeout'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:59:in `block (4 levels) in run'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/agent/locker.rb:21:in `lock'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:53:in `block (3 levels) in run'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:136:in `with_client'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:50:in `block (2 levels) in run'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:101:in `run_in_fork'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:49:in `block in run'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/application.rb:179:in `controlled_run'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/agent.rb:47:in `run'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:426:in `onetime'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:386:in `block in run_command'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/context.rb:62:in `override'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet.rb:314:in `override'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:382:in `run_command'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/application.rb:382:in `block in run'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util.rb:735:in `exit_on_fail'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/application.rb:382:in `run'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:143:in `run'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:77:in `execute'
C:/Program Files/Puppet Labs/Puppet/puppet/bin/puppet:4:in `<main>' {code}

Selvakumar Azhagarsami (Jira)

unread,
Mar 2, 2022, 12:06:06 AM3/2/22
to puppe...@googlegroups.com

Selvakumar Azhagarsami (Jira)

unread,
Mar 2, 2022, 12:08:02 AM3/2/22
to puppe...@googlegroups.com
Selvakumar Azhagarsami updated an issue
This is a follow-up ticket from https://tickets.puppetlabs.com/browse/PUP-10898


*Puppet Version: 6.22.1*
*Puppet Server Version: PE 2019.8.5*
*OS Name/Version: Windows Server 2016*

Windows Server 2016 failed to apply catalog, please refer to the error message below for details.

attached
is trace debug output from affected agent node [^puppetagent_trace_debug_47445-01-03-22.log]

{code:java} [0;36mDebug: Could not retrieve raw SID bytes from 'Administrator': Failed to convert string SID: Administrator:  The security ID structure is invalid. [0m
[0;36mDebug: Failed to call LookupAccountNameW with account: Administrator:  No mapping between account names and security IDs was done. [0m

[0;36mDebug: Could not retrieve raw SID bytes from 'EC2AMAZ-NAUKKA2\Administrator': Failed to convert string SID: EC2AMAZ-NAUKKA2\Administrator:  The security ID structure is invalid. [0m
[0;36mDebug: Failed to call LookupAccountNameW with account: EC2AMAZ-NAUKKA2\Administrator:  No mapping between account names and security IDs was done. [0m
[1;31mError: Could not send report: undefined method `bytesize' for nil:NilClass
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/api_types.rb:125:in `from_wide_string'

C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/api_types.rb:26:in `from_string_to_wide_string'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:184:in `string_to_sid_ptr'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/security.rb:431:in `add_access_allowed_ace'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/security.rb:659:in `block (7 levels) in set_security_descriptor'

C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/access_control_list.rb:28:in `block in each'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/access_control_list.rb:28:in `each'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/access_control_list.rb:28:in `each'

C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/security.rb:655:in `block (6 levels) in set_security_descriptor'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:192:in `block (3 levels) in string_to_sid_ptr'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/api_types.rb:94:in `read_win32_local_pointer'

C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:191:in `block (2 levels) in string_to_sid_ptr'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:185:in `initialize'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:185:in `new'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:185:in `block in string_to_sid_ptr'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/api_types.rb:129:in `from_wide_string'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/api_types.rb:26:in `from_string_to_wide_string'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:184:in `string_to_sid_ptr'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/security.rb:654:in `block (5 levels) in set_security_descriptor'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:192:in `block (3 levels) in string_to_sid_ptr'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/api_types.rb:94:in `read_win32_local_pointer'

C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:191:in `block (2 levels) in string_to_sid_ptr'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:185:in `initialize'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:185:in `new'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:185:in `block in string_to_sid_ptr'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/api_types.rb:129:in `from_wide_string'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/api_types.rb:26:in `from_string_to_wide_string'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/sid.rb:184:in `string_to_sid_ptr'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/security.rb:653:in `block (4 levels) in set_security_descriptor'

C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/security.rb:526:in `open_file'
C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/vendor_ruby/puppet/util/windows/security.rb:652:in `block (3 levels) in set_security_descriptor'

Selvakumar Azhagarsami (Jira)

unread,
Mar 2, 2022, 12:08:03 AM3/2/22
to puppe...@googlegroups.com

Selvakumar Azhagarsami (Jira)

unread,
Mar 2, 2022, 12:08:03 AM3/2/22
to puppe...@googlegroups.com
Selvakumar Azhagarsami updated an issue
This is a follow-up ticket from https://tickets.puppetlabs.com/browse/PUP-10898

*Puppet Version: 6.22.1*
*Puppet Server Version: PE 2019.8.5*
*OS Name/Version: Windows Server 2016*

Describe your issue in as much detail as possible…


Describe steps Windows Server 2016 failed to reproduce…


*Desired Behavior:*

*Actual Behavior:*

Actual apply catalog, please refer to the error message : below for details.

attached trace debug output from affected agent node [^puppetagent_trace_debug_47445-01-03-22.log]

Selvakumar Azhagarsami (Jira)

unread,
Mar 2, 2022, 12:10:02 AM3/2/22
to puppe...@googlegroups.com
Selvakumar Azhagarsami updated an issue
This is a follow-up ticket from https://tickets.puppetlabs.com/browse/PUP-10898

*Puppet Version: 6.22.1*
*Puppet Server Version: PE 2019.8.5*
*OS Name/Version: Windows Server 2016*

Windows Server 2016 failed to apply catalog, please refer to the error message below for details.

attached is trace debug output from
affected agent node the [^puppetagent_trace_debug_47445-01-03-22.log]
affected agent node

Selvakumar Azhagarsami (Jira)

unread,
Mar 2, 2022, 12:10:03 AM3/2/22
to puppe...@googlegroups.com

Selvakumar Azhagarsami (Jira)

unread,
Mar 2, 2022, 12:10:03 AM3/2/22
to puppe...@googlegroups.com

Josh Cooper (Jira)

unread,
Mar 28, 2022, 4:39:02 PM3/28/22
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-11473
 
Re: Error: Failed to apply catalog: undefined method `bytesize' for nil:NilClass on WinServer 2016

selvakumar.subburaj If the problem persists, please try running the following and attaching the output:

C:\> icacls C:\ProgramData\PuppetLabs\puppet\cache\state\last_run_report.yaml

Austin Boyd (Jira)

unread,
Mar 28, 2022, 8:12:01 PM3/28/22
to puppe...@googlegroups.com

Austin Boyd (Jira)

unread,
Mar 28, 2022, 8:12:02 PM3/28/22
to puppe...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages