ServiceMix
  1. ServiceMix
  2. SM-2267

Provide working configuration for activemq-web-console

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.0
    • Fix Version/s: 5.0.1, 5.1.0, 6.0.0.M1, 6.0.0
    • Component/s: assemblies
    • Labels:
      None

      Description

      We should provide a working default configuration for the activemq-web-console (JMX and JMS connection credentials) - this defaults to karaf/karaf at the moment in the ActiveMQ codebase and we only have smx/smx in the etc/users.properties

      I tried updating the etc/org.apache.activemq.webconsole.cfg file, but it seems there's a timing issue there - when restarting the container, it first grabs a connection factory using the default credentials and only after that it gets the updated configuration from the OSGi ConfigAdmin.

      Cfr. http://servicemix.396122.n5.nabble.com/schedule-for-next-version-of-servicemix-4-5-3-tp5719539p5719610.html for more information and a log file

        Activity

        Hide
        Wim Verreydt added a comment -

        I found a possible solution providing a preconfigured org.apache.activemq.webconsole.cfg file.
        You can find a pull-request for this at https://github.com/apache/servicemix/pull/4

        Show
        Wim Verreydt added a comment - I found a possible solution providing a preconfigured org.apache.activemq.webconsole.cfg file. You can find a pull-request for this at https://github.com/apache/servicemix/pull/4
        Hide
        Krzysztof Sobkowiak added a comment -

        Thanks Wim for the patch. Have you tested, whether the configuration still works after the restart of the ServiceMix?

        Show
        Krzysztof Sobkowiak added a comment - Thanks Wim for the patch. Have you tested, whether the configuration still works after the restart of the ServiceMix?
        Hide
        Wim Verreydt added a comment -

        The webconsole is reachable but after your comment I thoroughly tested this and some functions indeed do not work anymore after a restart.
        I'll close the request.

        Show
        Wim Verreydt added a comment - The webconsole is reachable but after your comment I thoroughly tested this and some functions indeed do not work anymore after a restart. I'll close the request.
        Hide
        Krzysztof Sobkowiak added a comment - - edited

        You solution was very good. The configuration of the web console should look exactly like your solution. There is another problem and after the restart the configuration parameter from the file provided by the ConfigAdmin are ignored by the web console.

        I think, this is probably a problem wit a web console. Even if you change something in the web console pid org.apache.activemq.webconsole using the ConfigAdmin and perform config:update the console configuration should be refreshed (I think so), but it isn't.

        I have found this (AMQ-4949) issue, but I don't know if it is connected with this problem.

        Show
        Krzysztof Sobkowiak added a comment - - edited You solution was very good. The configuration of the web console should look exactly like your solution. There is another problem and after the restart the configuration parameter from the file provided by the ConfigAdmin are ignored by the web console. I think, this is probably a problem wit a web console. Even if you change something in the web console pid org.apache.activemq.webconsole using the ConfigAdmin and perform config:update the console configuration should be refreshed (I think so), but it isn't. I have found this ( AMQ-4949 ) issue, but I don't know if it is connected with this problem.
        Show
        Krzysztof Sobkowiak added a comment - It seems to be something similar to http://stackoverflow.com/questions/22832610/configuration-files-are-ignored-after-migrating-to-servicemix-5/22858306#22858306
        Hide
        Wim Verreydt added a comment -

        I did some digging and found a possible source of this problem in the webconsole module of ActiveMQ. The configuration is passed by value on creation, preventing the new values to be used after an update. I explained this issue on their mailinglist: http://activemq.2283324.n4.nabble.com/Web-console-config-not-updating-in-ServiceMix-Karaf-td4681067.html

        Show
        Wim Verreydt added a comment - I did some digging and found a possible source of this problem in the webconsole module of ActiveMQ. The configuration is passed by value on creation, preventing the new values to be used after an update. I explained this issue on their mailinglist: http://activemq.2283324.n4.nabble.com/Web-console-config-not-updating-in-ServiceMix-Karaf-td4681067.html
        Hide
        Gert Vanthienen added a comment -

        How about we just add karaf=karaf,admin to the etc/users.properties again until the ActiveMQ webconsole module is fixed to support dynamic updates?

        The alternative solution would be to document somewhere that this feature need the extra credentials as a workaround.

        Show
        Gert Vanthienen added a comment - How about we just add karaf=karaf,admin to the etc/users.properties again until the ActiveMQ webconsole module is fixed to support dynamic updates? The alternative solution would be to document somewhere that this feature need the extra credentials as a workaround.
        Show
        Gert Vanthienen added a comment - Fixed by applying Wim's original pull request, but adding the karaf=karaf,admin to etc/users.properties https://git-wip-us.apache.org/repos/asf?p=servicemix.git;a=commit;h=7c5207d25c275b7f0fb262842f948539f8e7e5d9 for servicemix-5.0.x I messed up a bit on other two branches, so there are two commits for every branch there :s https://git-wip-us.apache.org/repos/asf?p=servicemix.git;a=commit;h=9297055f3bcd841aba5060cc833693657a7c9f52 and https://git-wip-us.apache.org/repos/asf?p=servicemix.git;a=commit;h=c9dd91785f4149e6127a83bb1aafae10f635bda2 for master https://git-wip-us.apache.org/repos/asf?p=servicemix.git;a=commit;h=dea9db00452b0b6cbfceed7cee03725100f39103 and https://git-wip-us.apache.org/repos/asf?p=servicemix.git;a=commit;h=214ceabbeb72ed72e0a2e248675acacf9081751e for servicemix-5.1.x Thanks for the pull request, Wim!

          People

          • Assignee:
            Gert Vanthienen
            Reporter:
            Gert Vanthienen
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development