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

ClassCastException when changing log level in Storm UI

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6.0
    • 2.6.1
    • storm-webapp
    • None

    Description

      A ClassCastException is raised in Storm UI when trying to change the log level for a topology (cf. attached screenshot and full error stack).

      • POST request payload sent to the logconfig web service:
      {"namedLoggerLevels":{"com.example":{"target_level":"DEBUG","reset_level":"INFO","timeout":30}}}
      • Error message received:
      "error": "500 Server Error",
      "errorMessage": "java.lang.ClassCastException: java.lang.Integer incompatible with java.lang.Long\n\tat org.apache.storm.daemon.ui.UIHelpers.putTopologyLogLevel(UIHelpers.java:2422)\n\tat org.apache.storm.daemon.ui.resources.StormApiResource.putTopologyLogconfig(StormApiResource.java:469)\n\tat
      [...]
      

      The timeout parameter seems to be parsed as an Integer whereas it is cast into a Long in the code, then raising a ClassCastException:

      cf. https://github.com/apache/storm/blob/ae3a96e762095553311d9e335f7505c0b351d810/storm-webapp/src/main/java/org/apache/storm/daemon/ui/UIHelpers.java#L2422C13-L2422C67

      This issue could be related to the recent change of the JSON parser having a different behavior when parsing numbers:

      cf. https://github.com/apache/storm/commit/1406f680c8d65de591c997066d2ca2cd80e56c4f#diff-67de3adeec3548f570568d351b76a4b3a936ee9ed0f3f59445ff3def0505f247

       
       
       

      Attachments

        1. error_stack.json
          6 kB
          mleger
        2. NimbusUI_error.png
          15 kB
          mleger

        Activity

          People

            rzo1 Richard Zowalla
            mleger mleger
            Votes:
            1 Vote for this issue
            Watchers:
            3 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 - 20m
                20m