Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-67655

Agent on Windows 11 can't connect to Jenkins due to encoding mismatch

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Blocker Blocker
    • remoting
    • None

      Using the following command in an admin command prompt, on either of the Windows 11 agent machines (default settings, nothing fancy):

      java -jar slave.jar -jnlpUrl http://myjenkins/computer/ing-al-02/slave-agent.jnlp -workDir "C:\J" -secret xxxxx

      Always getting the error below.

      Trying -Dfile.encoding=Cp1252 and -Dsun.jnu.encoding=Cp1252 (when connecting to master1)  does not change anything. The agent always tries to decode UTF-8 despite not being such (apparently).

      Jan. 22, 2022 6:18:03 P.M. org.jenkinsci.remoting.engine.WorkDirManager initializeWorkDir
      INFO: Using C:\J\remoting as a remoting work directory
      Jan. 22, 2022 6:18:03 P.M. org.jenkinsci.remoting.engine.WorkDirManager setupLogging
      INFO: Both error and output logs will be printed to C:\J\remoting
      [Fatal Error] :1:1: Invalid byte 2 of 2-byte UTF-8 sequence.
      Exception in thread "main" org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Invalid byte 2 of 2-byte UTF-8 sequence.
      at java.xml/com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:262)
      at java.xml/com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
      at java.xml/javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
      at hudson.remoting.Launcher.loadDom(Launcher.java:614)
      at hudson.remoting.Launcher.parseJnlpArguments(Launcher.java:553)
      at hudson.remoting.Launcher.run(Launcher.java:347)
      at hudson.remoting.Launcher.main(Launcher.java:298)
      Caused by: com.sun.org.apache.xerces.internal.impl.io.MalformedByteSequenceException: Invalid byte 2 of 2-byte UTF-8 sequence.
      at java.xml/com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.invalidByte(UTF8Reader.java:702)
      at java.xml/com.sun.org.apache.xerces.internal.impl.io.UTF8Reader.read(UTF8Reader.java:373)
      at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(XMLEntityScanner.java:1699)
      at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.arrangeCapacity(XMLEntityScanner.java:1565) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipString(XMLEntityScanner.java:1603)
      at java.xml/com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:158)
      at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:860)
      at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:824)
      at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
      at java.xml/com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:246)
      ... 6 more

            basil Basil Crow
            xanderlo Alexandre Loiseau
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: