1 Reply Latest reply on Nov 21, 2017 1:35 AM by Oliver Skorna

    Weblink connection problem: TLS close-notify

    Oliver Skorna

      Hi all,


      i have a problem which baffles me. A contact at zebra is already investigating this issue so far without success. Perhaps someone already had the same problem:

      I'm trying to connect a printer (ZQ520) via websocket to my embedded tomcat server. The TLS-handshake seems fine, but after the upgrade request, the printer terminates the connection with TLS close-notify message without apparent reason. Messages (Drucker is the printer):



      Upgrade-request from the printer:



      Response from the server:



      The printer log unfortunately doesn't give a reason:

      [11-15-2017 12:03:53.352][Info][00010038][conn1.11] Server certificate verify ok

      [11-15-2017 12:03:53.537][Info][00001012][conn1.11] HTTP/1.1 101

      [11-15-2017 12:03:53.539][Info][00010007][conn1.11] Content Length is 0

      [11-15-2017 12:03:53.544][Error][800C000E][conn1.11] Failed to connect (SP = 0, CU = 1, UW = 1, AC = 1, PC = 0)


      I also have logs where PC = 1.

      Connection with a javascript-websocket client with the tomcat server is working. Also the printer can connect successfully to a testserver of zebra.

      Any help would be very much appreciated.




        • Re: Weblink connection problem: TLS close-notify
          Oliver Skorna

          After some trial and error i managed to find the root of the problem. My tomcat server doesn't give a reason phrase for the status line:

          HTTP/1.1 101 Switching Protocols


          The http specification states that this is optional. The websocket implementation on the printer violates this specification. By adding the reason phrase "Switching Protocols" to the server response i could successfully connect the printer.


          Fortunately apache reversed their decision to scrap these reason phrases with version 8.5.13. They can still be added with the current tomcat version 8.5.x.

          (with embedded tomcat i use: ((Http11NioProtocol) tomcat.getConnector().getProtocolHandler()).setSendReasonPhrase(true);)


          Tomcat 9 won't have this option available. As of now tomcat 9 won't be compatible with weblink.


          Refer to 60362 – Missing reason phrase in response  for discussion on this topic.