Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-3110

Supervisor does not kill all worker processes in secure mode in case of user mismatch

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0, 1.2.3
    • Component/s: None

      Description

      While running in secure mode, supervisor sets the worker user (in workers local state) as the user that launched the topology.

       

      SET worker-user 4d67a6be-4c80-4622-96af-f94706d58553 foo
      

       

      However the worker OS process does not actually run as the user "foo" (instead runs as storm user) unless supervisor.run.worker.as.user is also set.

      If the supervisor's assignment changes, the supervisor in some cases checks if all processes are dead by matching the "pid+user". Here if the worker is running as a different user (say storm) the supervisor wrongly assumes that the worker process is dead.

      Later when supervisor tries to launch a worker at that same port, it throws a bind exception

      o.a.s.m.n.Server main [INFO] Create Netty Server Netty-server-localhost-6700, buffer_size: 5242880, maxWorkers: 1
      o.a.s.d.worker main [ERROR] Error on initialization of server mk-worker
      org.apache.storm.shade.org.jboss.netty.channel.ChannelException: Failed to bind to: 0.0.0.0/0.0.0.0:6700
      at org.apache.storm.shade.org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272) ~[storm-core-1.2.0.3.1.0.0-501.jar:1.2.0.3.1.0.0-501]
       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                arunmahadevan Arun Mahadevan
                Reporter:
                arunmahadevan Arun Mahadevan
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 50m
                  1h 50m