Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-6329

puppet apply fails with "Error: Could not set 'file' on ensure: invalid byte sequence in US-ASCII" with non-ASCII filename

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Duplicate
    • Affects Version/s: PUP 4.9.4
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      I created a file named /tmp/foo/fo©.txt with some text in it. Then I wrote the following manifest and invoked it with puppet apply:

      file { '/Users/glarkin/tmp':
        source => '/private/tmp/foo',
        ensure => directory,
        recurse => true,
      }
      

      puppet apply failed with the following error message:

      Error: Could not set 'file' on ensure: invalid byte sequence in US-ASCII
      Error: Could not set 'file' on ensure: invalid byte sequence in US-ASCII
      Wrapped exception:
      invalid byte sequence in US-ASCII
      Error: /Stage[main]/Main/File[/Users/glarkin/tmp/fo©.txt]/ensure: change from absent to file failed: Could not set 'file' on ensure: invalid byte sequence in US-ASCII
      

      It appears that this might be solvable when running puppet agent against a master by starting puppetserver with "JAVA_ARGS=-Dfile.encoding=UTF-8", but I haven't found a way to resolve the issue when running standalone puppet apply on a development machine.

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  greg.larkin Greg Larkin
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: