ZooKeeper
  1. ZooKeeper
  2. ZOOKEEPER-805

four letter words fail with latest ubuntu nc.openbsd

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.3.1, 3.4.0
    • Fix Version/s: 3.4.6
    • Component/s: documentation, server
    • Labels:
      None

      Description

      In both 3.3 branch and trunk "echo stat|nc localhost 2181" fails against the ZK server on Ubuntu Lucid Lynx.

      I noticed this after upgrading to lucid lynx - which is now shipping openbsd nc as the default:

      OpenBSD netcat (Debian patchlevel 1.89-3ubuntu2)

      vs nc traditional

      [v1.10-38]

      which works fine. Not sure if this is a bug in us or nc.openbsd, but it's currently not working for me. Ugh.

        Issue Links

          Activity

          Patrick Hunt created issue -
          Hide
          akovi added a comment -

          Hi, I'm new to Zookeeper but stumbled upon this bug too. The solution is to add the -q1 parameter to nc.

          The reason is that by default nc closes the connection as soon as the stdin closes. With -q1 you can override this behavior.

          Hope this helps.

          Show
          akovi added a comment - Hi, I'm new to Zookeeper but stumbled upon this bug too. The solution is to add the -q1 parameter to nc. The reason is that by default nc closes the connection as soon as the stdin closes. With -q1 you can override this behavior. Hope this helps.
          Patrick Hunt made changes -
          Field Original Value New Value
          Link This issue is related to ZOOKEEPER-737 [ ZOOKEEPER-737 ]
          Hide
          Patrick Hunt added a comment -

          Linking to ZOOKEEPER-737, which is similar to this, the diff being that 737 was found/fixed against the legacy "nc", while this issue seems related to the new (bsd ported) version of nc

          Show
          Patrick Hunt added a comment - Linking to ZOOKEEPER-737 , which is similar to this, the diff being that 737 was found/fixed against the legacy "nc", while this issue seems related to the new (bsd ported) version of nc
          Hide
          Patrick Hunt added a comment -

          Thanks for pointing out that option, I wasn't aware of it. I linked to ZOOKEEPER-737 which we fixed recently. The "old" version of nc had this same behavior, but we fixed it. I'm not sure what's diff about the old/new version of nc that's causing this.

          btw, we should updated the "nc" related ZK docs to point out this option. Is this option available in all nc versions? we may need to note that in the docs as well.

          Show
          Patrick Hunt added a comment - Thanks for pointing out that option, I wasn't aware of it. I linked to ZOOKEEPER-737 which we fixed recently. The "old" version of nc had this same behavior, but we fixed it. I'm not sure what's diff about the old/new version of nc that's causing this. btw, we should updated the "nc" related ZK docs to point out this option. Is this option available in all nc versions? we may need to note that in the docs as well.
          Patrick Hunt made changes -
          Component/s documentation [ 12312422 ]
          Hide
          Mahadev konar added a comment -

          Pat,
          You think this should go into 3.3.2?

          Show
          Mahadev konar added a comment - Pat, You think this should go into 3.3.2?
          Hide
          Patrick Hunt added a comment -

          Hi Mahadev, I don't think that's necessary given you can fallback to "traditional" nc, or you can use the -q option as suggested by akovi.

          On my ubuntu system (lucid/maverick) I have two executables; nc.openbsd and nc.traditional. "nc" links to openbsd version by default.

          Honestly I'm not sure why this is no longer working, given that we addressed the "nc closes input first" in ZOOKEEPER-737

          Show
          Patrick Hunt added a comment - Hi Mahadev, I don't think that's necessary given you can fallback to "traditional" nc, or you can use the -q option as suggested by akovi. On my ubuntu system (lucid/maverick) I have two executables; nc.openbsd and nc.traditional. "nc" links to openbsd version by default. Honestly I'm not sure why this is no longer working, given that we addressed the "nc closes input first" in ZOOKEEPER-737
          Hide
          Mahadev konar added a comment -

          sure, do you want to add some documentation to zookeeper admin guide to make it clearer on using -q and the issue with openbsd?

          Show
          Mahadev konar added a comment - sure, do you want to add some documentation to zookeeper admin guide to make it clearer on using -q and the issue with openbsd?
          Hide
          Patrick Hunt added a comment -

          Not a blocker, pushing to 3.3.3/3.4.0

          Show
          Patrick Hunt added a comment - Not a blocker, pushing to 3.3.3/3.4.0
          Patrick Hunt made changes -
          Fix Version/s 3.3.3 [ 12315482 ]
          Fix Version/s 3.3.2 [ 12315108 ]
          Benjamin Reed made changes -
          Fix Version/s 3.3.3 [ 12315482 ]
          Hide
          Mahadev konar added a comment -

          not a blocker. Moving it out of 3.4 release.

          Show
          Mahadev konar added a comment - not a blocker. Moving it out of 3.4 release.
          Mahadev konar made changes -
          Fix Version/s 3.5.0 [ 12316644 ]
          Fix Version/s 3.4.0 [ 12314469 ]
          Patrick Hunt made changes -
          Link This issue is related to ZOOKEEPER-1197 [ ZOOKEEPER-1197 ]
          Hide
          Patrick Hunt added a comment -

          Possibly related to ZOOKEEPER-1197 ?

          Show
          Patrick Hunt added a comment - Possibly related to ZOOKEEPER-1197 ?
          Hide
          Michi Mutsuzaki added a comment -

          I verified that this has already been fixed. The 4 letter command works with both nc.traditional (v1.10-39) and nc.openbsd (Debian patchlevel 1.89-4ubuntu1).

          Show
          Michi Mutsuzaki added a comment - I verified that this has already been fixed. The 4 letter command works with both nc.traditional (v1.10-39) and nc.openbsd (Debian patchlevel 1.89-4ubuntu1).
          Michi Mutsuzaki made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 3.4.6 [ 12323310 ]
          Fix Version/s 3.5.0 [ 12316644 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Patrick Hunt
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development