1

I am trying to deploy the Pulse Web Application to an external Tomcat. I get this error when deploying. How should I fix this?

org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'org.springframework.security.authenticationManager' is defined: Did you forget to add a gobal element to your configuration (with child elements)? Alternatively you can use the authentication-manager-ref attribute on your and elements.

Jason
  • 2,006
  • 3
  • 21
  • 36

3 Answers3

2

OK. This is fixed. To everyone also experiencing this... you must set the Spring Profile "pulse.authentication.default" or it will not load the AuthenticationManager Bean.

The overall issue is with the RowStore's documentation, which says this is OPTIONAL, when in fact it is required.

http://rowstore.docs.snappydata.io/docs/manage_guide/pulse/quickstart.html#topic_795C97B46B9843528961A094EE520782

It says at Step 4.) that configuring security is Optional when in fact you have to pass a Spring Profile. Also, again in the section "Authenticating Pulse Users", it says this is not a requirement.

To fix the issue I had to pass the Spring Profile "pulse.authentication.default" to activate the Bean in spring-security.xml and deploy pulse.war properly.

A better way for SnappyData pulse.war to do this in the future might be to use "!pulse.authentication.custom", which would always load the default AuthenticationManager bean as long as a custom one was not configured.

Example change for future to make it truly optional:

<beans:beans profile="!pulse.authentication.custom" >
        <authentication-manager>
            <authentication-provider>
                <user-service>
                    <user name="admin" password="admin" authorities="ROLE_USER" />
                </user-service>
            </authentication-provider>
        </authentication-manager>
    </beans:beans>
Jason
  • 2,006
  • 3
  • 21
  • 36
  • spring.profiles.default is set in web.xml and set to pulse.authentication.default. This should have worked without specifying any authentication settings. It would be helpful if you can specify the TC version you are using . I will also try in that version and see if it creates an issue. – Rishitesh Mishra Jul 22 '16 at 06:57
1

Which version of Tomcat are you using? Here is another thread on the same issue with TC authentication.

Else, can you just try Pulse in the "embedded mode" ?

Community
  • 1
  • 1
jagsr
  • 535
  • 2
  • 6
  • pulse.war is a pre-built web app in the SnappyData-0.5 dist, so I don't have access to 'configure' security like the thread above. If the answer is to build pulse.war from scratch myself from the GitHub source with some other security configuration, then let me know. However, the RowStore docs at step 4.) say authentication is (Optional). If it is required, I will follow through with more set up, but I don't want to do that, unless necessary. – Jason Jul 21 '16 at 16:16
  • Hoping one of our team members will revert back on if this capability has been tested or there is a simple fix. For now, just try Pulse App running in the locator ("embedded mode"). – jagsr Jul 22 '16 at 03:21
0

Which version of SnappyData you are using ? You need to mention a pulse.properties file in the classpath . For details you can check http://rowstore.docs.snappydata.io/docs/manage_guide/pulse/quickstart.html#topic_795C97B46B9843528961A094EE520782.

Let us know if you any problems further.

  • I am using SnappyData-0.5. I find that the SnappyData online links go to different, old Gemfire docs. I will follow your "rowstore" link and it's directions. – Jason Jul 21 '16 at 14:33
  • This did not resolve the issue. I have put a pulse.properties into TOMCAT_HOME/lib as described in the documentation link you specified. The error remains. Also, I see a PULSE.log.0 file and upon opening it, it shows as well, that it cannot find the pulse properties file. – Jason Jul 21 '16 at 15:56