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

Bugs in logviewer

    XMLWordPrintableJSON

    Details

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

      Description

      1. Incorrect url for prev,first,last,next buttons when viewing daemon logs via logviewer

      Example:

      http://storm.cluster.com:8000/log?file=nimbus.log&start=0&length=51200

      should be:

      http://storm.cluster.com:8000/daemonlog?file=nimbus.log&start=0&length=51200

      Function with bug:
      https://github.com/apache/storm/blob/master/storm-core/src/clj/org/apache/storm/daemon/logviewer.clj#L374

      2. Downloading daemon files causes exception to be thrown because of function download-log-file checks authorization via worker.yaml. Obviously daemon log root will not have this file.

      java.io.FileNotFoundException: /home/y/var/storm/workers-artifacts/supervisor.log/worker.yaml (No such file or directory)
      at java.io.FileInputStream.open0(Native Method)
      at java.io.FileInputStream.open(FileInputStream.java:195)
      at java.io.FileInputStream.<init>(FileInputStream.java:138)
      at java.io.FileReader.<init>(FileReader.java:72)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
      at clojure.lang.Reflector.invokeConstructor(Reflector.java:180)
      at backtype.storm.util$clojure_from_yaml_file.invoke(util.clj:1066)
      at backtype.storm.daemon.logviewer$get_log_user_group_whitelist.invoke(logviewer.clj:310)
      at backtype.storm.daemon.logviewer$authorized_log_user_QMARK_.invoke(logviewer.clj:326)
      at backtype.storm.daemon.logviewer$download_log_file.invoke(logviewer.clj:497)
      at backtype.storm.daemon.logviewer$fn__11528.invoke(logviewer.clj:1024)
      at org.apache.storm.shade.compojure.core$make_route$fn__6445.invoke(core.clj:93)
      at org.apache.storm.shade.compojure.core$if_route$fn__6433.invoke(core.clj:39)
      at org.apache.storm.shade.compojure.core$if_method$fn__6426.invoke(core.clj:24)
      at org.apache.storm.shade.compojure.core$routing$fn__6451.invoke(core.clj:106)
      at clojure.core$some.invoke(core.clj:2515)
      at org.apache.storm.shade.compojure.core$routing.doInvoke(core.clj:106)
      at clojure.lang.RestFn.applyTo(RestFn.java:139)
      at clojure.core$apply.invoke(core.clj:626)
      at org.apache.storm.shade.compojure.core$routes$fn__6455.invoke(core.clj:111)

      3. search-log-file should not check for authorized users in worker.yaml

      https://github.com/apache/storm/blob/master/storm-core/src/clj/org/apache/storm/daemon/logviewer.clj#L833

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jerrypeng Boyang Jerry Peng
                Reporter:
                jerrypeng Boyang Jerry Peng
              • 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 - 40m
                  40m