Able to do the custom ldap authentication for external db authorities. But when I am trying to test wrong password the authentication failure URL is not showing instead my browser prints the exception details.Below is my securitycontext.xml and exception given:
<http auto-config="false" access-decision-manager-ref="accessDecisionManager" access-denied-page="/accessDenied.jsp">
<!-- Restrict access to ALL other pages -->
<intercept-url pattern="/index.jsp" filters="none" />
<!-- Don't set any role restrictions on login.jsp -->
<intercept-url pattern="/**" access="IS_AUTHENTICATED_ANONYMOUSLY" />
<intercept-url pattern="/service/**" access="PRIV_Report User, PRIV_305" />
<logout logout-success-url="/index.jsp" />
<form-login authentication-failure-url="/index.jsp?error=1" default-target-url="/home.jsp" />
<anonymous/>
</http>
<b:bean id="accessDecisionManager" class="org.springframework.security.vote.AffirmativeBased">
<b:property name="decisionVoters">
<b:list>
<b:ref bean="roleVoter" />
<b:ref bean="authenticatedVoter" />
</b:list>
</b:property>
</b:bean>
<b:bean id="roleVoter" class="org.springframework.security.vote.RoleVoter">
<b:property name="rolePrefix" value="PRIV_" />
</b:bean>
<b:bean id="authenticatedVoter" class="org.springframework.security.vote.AuthenticatedVoter">
</b:bean>
<b:bean id="contextSource" class="org.springframework.security.ldap.DefaultSpringSecurityContextSource">
<b:constructor-arg value="ldap://mydomain:389" />
</b:bean>
<b:bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate">
<b:constructor-arg ref="contextSource" />
</b:bean>
<b:bean id="ldapAuthenticationProvider"
class="com.zo.sas.gwt.security.login.server.SASLdapAuthenticationProvider">
<b:property name="authenticator" ref="ldapAuthenticator" />
<custom-authentication-provider />
</b:bean>
<b:bean id="ldapAuthenticator"
class="com.zo.sas.gwt.security.login.server.SASAuthenticator">
<b:property name="contextSource" ref="contextSource" />
<b:property name="userDnPatterns">
<b:value>uid={0},OU=People</b:value>
</b:property>
</b:bean>
And my exception logs:
org.springframework.ldap.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]; nested exception is javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid Credentials]
org.springframework.ldap.support.LdapUtils.convertLdapException(LdapUtils.java:180)
org.springframework.ldap.core.support.AbstractContextSource.createContext(AbstractContextSource.java:266)
org.springframework.ldap.core.support.AbstractContextSource.getContext(AbstractContextSource.java:106)
com.zo.sas.gwt.security.login.server.SASAuthenticator.authenticate(SASAuthenticator.java:55)
com.zo.sas.gwt.security.login.server.SASLdapAuthenticationProvider.authenticate(SASLdapAuthenticationProvider.java:45)
org.springframework.security.providers.ProviderManager.doAuthentication(ProviderManager.java:188)
org.springframework.security.AbstractAuthenticationManager.authenticate(AbstractAuthenticationManager.java:46)
org.springframework.security.ui.webapp.AuthenticationProcessingFilter.attemptAuthentication(AuthenticationProcessingFilter.java:82)
org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:258)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:183)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138)
This is my index.jsp
<html>
<script type="text/javascript" language="javascript">
var dictionary = {
loginErr: "${SPRING_SECURITY_LAST_EXCEPTION.message}",
error: "${param.error}"
};
</script>
<head>
</head>
<body >
<iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>
<script type="text/javascript" language="javascript" src="com.zo.sas.gwt.sasworkflow.home.Home.nocache.js"></script>
</body>
</html>
that log doesn't say much. You should put org.springframework to log at DEBUG level and see what is going on.
Look for this messages: "Updated SecurityContextHolder to contain null Authentication" and "Authentication request failed: ", after that there must be a redirect to index.jsp.
What is the code of index.jsp?
This is the correct error message, LDAP: error code 49 - Invalid Credentials, maybe not the format that you wanted though.
The LDAP server should pass a subcode for the reason, Active Directory has a list:
AD LDAP 49 codes and eDirectory will send usually a 669 error for bad password of 601 for bad DN. Though I think that changed in the last couple of versions, and they all show up as 669 errors on eDirectory, so as not to help attackers determine real user names.
Related
I have a VB.Net 4.7.2 desktop application that is throwing an exception occasionally. The exception is usually, "Root element is missing".
When this happens, I am able to view the file after the fact and the root element is there.
The file is written to the share by a remote Linux system and is accessed by this application using an SMB share.
I thought there might be a timing issue with the file being written to the share, so I implemented a retry and I still get the same exception after trying 3 times, 10 seconds apart.
The xmlPath is passed in as a parameter.
' xmlPath is the UNC path to a local network share.
Dim xmlDoc As New XmlDocument()
xmlDoc.Load(xmlPath)
When I view the XML file at the file location, here's what I see.
<reportrequest Version="1.0">
<report ReportGUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ReportCode="LENDPG_1" ABSReportCode="" Title="Lender Portal Collateral Screen Basic" Description="CS Basic Report" Price="0">
<account AccountNumber="6551198" Address="000 Main St" City="Spokane" State="WA" ZipCode="99201" />
<contact FirstName="Person" LastName="Ordering" Email="person#domain.com" Phone="000-000-0000" />
<outputtypecoll>
<outputtype Type="XML" FileName="" />
</outputtypecoll>
<featurecoll>
<feature Name="CSRDISTANCE" Value="false" />
<feature Name="CSRDBSTATUS" Value="false" />
<feature Name="CSRELEVATION" Value="false" />
<feature Name="FINDTP" Value="TRUE" />
<feature Name="DETAILS" Value="TRUE" />
</featurecoll>
<targetpropertycoll>
<targetproperty SiteIndex="0" PropertyGUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ExternalPropertyGUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" MonitoringGUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" PortfolioGUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" OrderGUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" PropertyName="My Property" Address="1 Wherever Ave" City="Sometown" State="CA" ZipCode="99999" Latitude="30.111111" Longitude="-110.88888">
<georeferenced Address="My Property" City="Sometown" State="CA" ZipCode="99999" Latitude="30.111111" Longitude="-110.88888" Fips="" County="" PostalCity="" />
<searchdistancecoll SetID="0000" SetName="LendPort Collateral" MaxDistance="5280" />
<edrdatacoll>
<edrdata Name="REPORTCOST" Value="0.00" />
<edrdata Name="BORROWER" Value="" />
<edrdata Name="LOANTYPE" Value="Other" />
<edrdata Name="LOANNUMBER" Value="" />
<edrdata Name="PROPERTYTYPE" Value="" />
<edrdata Name="DESTHOST" Value="www.xxxxxxxxxxx.com" />
</edrdatacoll>
</targetproperty>
</targetpropertycoll>
</report>
</reportrequest>
This certainly has a root element.
What can be causing this seemingly bogus exception?
Try adding this as the first line of the file
<?xml version="1.0" encoding="UTF-8"?>
EDIT:
Change this
Dim xmlDoc As New XmlDocument()
xmlDoc.Load(xmlPath)
to this
Dim xmlDoc As New XmlDocument()
Try
xmlDoc.Load(xmlPath)
Catch ex As Exception
Dim xe As XElement
xe = XElement.Load(xmlPath)
Stop
End Try
I am running apache 2.4.7 on an oraclelinux 8.5 compute instance.
I have the mod_auth_mellon 0.14 module installed and configured per all the documentation.
I have succeeded in performing an sp-initiated sso login to my application, but when I attempt to logout of the sso session using the following url:
https://example.com/mellon/logout/?ReturnTo=/logout.html
I get a 404 page not found error.
After enabling mellon diagnostics I see the following error message at the end of the request diagnostics for this GET request:
[APLOG_ERR auth_mellon_handler.c:3551] Endpoint "logout/" not handled by mod_auth_mellon
My sp_metadata.xml file is as follows:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<EntityDescriptor
entityID="https://example.com/mellon/metadata"
xmlns="urn:oasis:names:tc:SAML:2.0:metadata">
<SPSSODescriptor
AuthnRequestsSigned="true"
WantAssertionsSigned="true"
protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
<KeyDescriptor use="signing">
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509Data>
<ds:X509Certificate>MIICvDCCAaQCCQDRIF/j7C1rITANBgkqhkiG9w0BAQsFADAgMR4wHAYDVQQDDBVh
Y3JkZXYub3JhY2xlY29ycC5jb20wHhcNMjIwNjIyMjIyNjA5WhcNMzIwNjIxMjIy
NjA5WjAgMR4wHAYDVQQDDBVhY3JkZXYub3JhY2xlY29ycC5jb20wggEiMA0GCSqG
SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDKGLl90UeL+CSb8+7KtlxSUBy87RIlQ2l8
jtzftHsOOOX+L2gZFPPxmj5fP8R2pWJq4rjt06BES8lV2bP7Cn9H+Xu8cqKxsnYl
ArMqZu0StHYSdATx0WDF8Ay3NFdmytOYOK8tYjWt5ZP/zb5FGqKbjh4JdxwZL62C
FsnGYVOubpsu+A7WBZ2lKhZws1kdWmKY+tsFg9veSb4P0L6eprQ1GmVoB4RFSzfM
A1QgnTqbK0cqzNKOFEtQXbSjFkCAtQIHb1wvcByCTjbhT5/RW8y2Vqs+d9pmcN45
9FZ5rX8Jz5iCuA/R1OJeVgeDBC+XKEtQTNLteg/eMsumWde7XVFNAgMBAAEwDQYJ
KoZIhvcNAQELBQADggEBAATelS0+K50iIzj3LB0U/3zU+ASfVEZmGKE9C0LqrQph
8nqmb6MkbnrwcYfY6qsgDlmukWzv5p6K9FgD/CzN78wnoGazFpjFo2t1HszUJPj8
PEcoS8ry92MWkA4WV+R2lZ2y0fDrlqHBY9I27d30I+WokiLoVcfaMfOnC6sdovV8
+zkvyEzqFwSxZ66EDKR0Zg2ksVrrl+QSeAAacUNRKl8ePYHmraBwYIdFzTdZtz/u
TGKeRlNCO7Fqpx343h007ynzkTq0ZePiJVT2jAMkWqx66JeUno08omCrcAq4mZxw
cqN27U4MmNcNITE0C2l9rJDP7lAXcla/DN2V/mH5iD4=</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</KeyDescriptor>
<KeyDescriptor use="encryption">
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:X509Data>
<ds:X509Certificate>MIICvDCCAaQCCQDRIF/j7C1rITANBgkqhkiG9w0BAQsFADAgMR4wHAYDVQQDDBVh
Y3JkZXYub3JhY2xlY29ycC5jb20wHhcNMjIwNjIyMjIyNjA5WhcNMzIwNjIxMjIy
NjA5WjAgMR4wHAYDVQQDDBVhY3JkZXYub3JhY2xlY29ycC5jb20wggEiMA0GCSqG
SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDKGLl90UeL+CSb8+7KtlxSUBy87RIlQ2l8
jtzftHsOOOX+L2gZFPPxmj5fP8R2pWJq4rjt06BES8lV2bP7Cn9H+Xu8cqKxsnYl
ArMqZu0StHYSdATx0WDF8Ay3NFdmytOYOK8tYjWt5ZP/zb5FGqKbjh4JdxwZL62C
FsnGYVOubpsu+A7WBZ2lKhZws1kdWmKY+tsFg9veSb4P0L6eprQ1GmVoB4RFSzfM
A1QgnTqbK0cqzNKOFEtQXbSjFkCAtQIHb1wvcByCTjbhT5/RW8y2Vqs+d9pmcN45
9FZ5rX8Jz5iCuA/R1OJeVgeDBC+XKEtQTNLteg/eMsumWde7XVFNAgMBAAEwDQYJ
KoZIhvcNAQELBQADggEBAATelS0+K50iIzj3LB0U/3zU+ASfVEZmGKE9C0LqrQph
8nqmb6MkbnrwcYfY6qsgDlmukWzv5p6K9FgD/CzN78wnoGazFpjFo2t1HszUJPj8
PEcoS8ry92MWkA4WV+R2lZ2y0fDrlqHBY9I27d30I+WokiLoVcfaMfOnC6sdovV8
+zkvyEzqFwSxZ66EDKR0Zg2ksVrrl+QSeAAacUNRKl8ePYHmraBwYIdFzTdZtz/u
TGKeRlNCO7Fqpx343h007ynzkTq0ZePiJVT2jAMkWqx66JeUno08omCrcAq4mZxw
cqN27U4MmNcNITE0C2l9rJDP7lAXcla/DN2V/mH5iD4=</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo>
</KeyDescriptor>
<SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"
Location="https://example.com/mellon/logout" />
<SingleLogoutService
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"
Location="https://example.com/mellon/logout" />
<NameIDFormat>urn:oasis:names:tc:SAML:2.0:nameid-format:transient</NameIDFormat>
<AssertionConsumerService
index="0"
isDefault="true"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"
Location="https://example.com/mellon/postResponse" />
<AssertionConsumerService
index="1"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"
Location="https://example.com/mellon/artifactResponse" />
<AssertionConsumerService
index="2"
Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS"
Location="https://example.com/mellon/paosResponse" />
</SPSSODescriptor>
</EntityDescriptor>
According to the documentation here:
https://github.com/latchset/mod_auth_mellon#logging-out
Your syntax is incorrect.
It should be:
https://example.com/mellon/logout?ReturnTo=/logout.html
(notice the removed slash after logout)
I'm working with spring security 3.2, JSF2 , Hibernate4.
I'have done 3/4 of the work :) but my authentication system doesn't work yet.
I have a UserService who implements UserDetailsService, a domain Class User who implements UserDetails.
THe login system never stop user to access secured pages, i tried user name and password who doesn't exist in my database...
Thanks for the help.
I have a loginBean who is trying to authenticate the user when he connects via login form :
public String login() {
try {
Authentication request = new UsernamePasswordAuthenticationToken(this.getUsername(), this.getPassword());
Authentication result = authenticationManager.authenticate(request);
SecurityContextHolder.getContext().setAuthentication(result);
} catch (AuthenticationException e) { e.printStackTrace();}
return "secured";
}
My spring security looks like this :
`<security:global-method-security jsr250-annotations="enabled" pre-post-annotations="enabled" secured-annotations="enabled" />
<security:http auto-config="true" use-expressions="true">
<security:intercept-url pattern="/Admin" access="isAuthenticated()" />
<security:form-login login-page="/login.xhtml" authentication-failure-url="/" > </security:form-login>
</security:http>
<!-- User Data Access Object -->
<beans:bean id="userDao" class="com.clb.genomic.lyon.dao.UserDaoImpl" >
<beans:property name="sessionFactory" ref="sessionFactory"></beans:property>
</beans:bean>
<!-- User Business Object -->
<beans:bean id="userBo" class="com.clb.genomic.lyon.bo.UserBoImpl" >
<beans:property name="userDao" ref="userDao" />
</beans:bean>
<beans:bean id="login" class="com.clb.genomic.lyon.beans.LoginBean" scope ="request">
<beans:property name="authenticationManager" ref="authenticationManager" />
</beans:bean>
<beans:bean id="standardPasswordEncoder" class="org.springframework.security.crypto.password.StandardPasswordEncoder"/>
<security:authentication-manager alias="authenticationManager">
<security:authentication-provider user-service-ref="userBo" >
<security:password-encoder ref="standardPasswordEncoder"/>
</security:authentication-provider>
</security:authentication-manager>`
This is the error who show up...
org.springframework.security.authentication.AuthenticationServiceException: 1
at org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:109)
at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:132)
at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:156)
at com.clb.genomic.lyon.beans.LoginBean.login(LoginBean.java:47).....
Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
at com.clb.genomic.lyon.dao.UserDaoImpl.loadUserByUsername(UserDaoImpl.java:59)
at com.clb.genomic.lyon.bo.UserBoImpl.loadUserByUsername(UserBoImpl.java:68)
at com.clb.genomic.lyon.bo.UserBoImpl$$FastClassByCGLIB$$9ea98abf.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204).....
The exception from stack trace shows you are getting ArrayIndexOutOfBoundsException and it seems that you are reading from an empty array.
You should also check what value is being passed to loadUserByUsername() method, and if that user exists.
I trying a spring amqp application to send JSON data as messages to a consumer (written in Ruby).
I get connection reset errors with any setting that I try
NOTE: I deleted the default guest user and added admin with the same privileges over default virtual host.
Here's the configuration:
<beans:bean id="cachingConnectionFactory"
class="org.springframework.amqp.rabbit.connection.CachingConnectionFactory">
<beans:property name="channelCacheSize" value="5" />
<beans:property name="username" value="admin" />
<beans:property name="password" value="admin" />
</beans:bean>
<rabbit:queue id='analytics.persistence.queue' name='analytics.persistence.queue' />
<rabbit:direct-exchange name="amq.direct">
<rabbit:bindings>
<rabbit:binding queue="analytics.persistence.queue">
</rabbit:binding>
</rabbit:bindings>
</rabbit:direct-exchange>
<rabbit:connection-factory id="cachingConnectionFactory" />
<rabbit:admin connection-factory="cachingConnectionFactory" />
<beans:bean id="rabbitTemplate"
class="org.springframework.amqp.rabbit.core.RabbitTemplate">
<beans:property name="connectionFactory" ref="cachingConnectionFactory" />
<beans:property name="exchange" value="amq.direct" />
<beans:property name="routingKey" value="analytics.persistence.queue"/>
</beans:bean>
<beans:bean id="analyticsMessageProducer"
class="hoodibaba.analytics.publish.AnalyticsPersistenceMessageProducer">
<beans:property name="rabbitTemplate" ref="rabbitTemplate" />
</beans:bean>
And in my producer class
public class AnalyticsPersistenceMessageProducer extends RabbitGatewaySupport implements
AnalyticsPersistenceMessageGateway {
private static final Logger logger = LoggerFactory.getLogger(AnalyticsPersistenceMessageProducer.class);
#Override
public void sendAnalyticsMessage(String jsonData) {
try {
getRabbitTemplate().convertAndSend("analytics.persistence.queue",jsonData);
} catch (AmqpException e) {
logger.error(e.getMessage());
logger.error("Exception Stacktrace",e);
logger.error("flushing JSON data to logs: " + jsonData);
}
}
}
I get a
com.rabbitmq.client.PossibleAuthenticationFailureException: Possibly
caused by authentication failure exception
the stack trace shows connection reset
Caused by: com.rabbitmq.client.PossibleAuthenticationFailureException: Possibly caused by authentication failure
at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:348)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:516)
at com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:545)
at org.springframework.amqp.rabbit.connection.AbstractConnectionFactory.createBareConnection(AbstractConnectionFactory.java:160)
... 43 more
Caused by: com.rabbitmq.client.ShutdownSignalException: connection error; reason: java.net.SocketException: Connection reset
at com.rabbitmq.utility.ValueOrException.getValue(ValueOrException.java:67)
at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:33)
at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:343)
at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:216)
at com.rabbitmq.client.impl.AMQChannel.rpc(AMQChannel.java:202)
at com.rabbitmq.client.impl.AMQConnection.start(AMQConnection.java:340)
... 46 more
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:189)
at java.net.SocketInputStream.read(SocketInputStream.java:121)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
at java.io.DataInputStream.readUnsignedByte(DataInputStream.java:288)
at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:95)
at com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:131)
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:508)
The message consumer is as follows
#!/usr/bin/env ruby
# encoding: UTF-8
require 'bunny'
conn = Bunny.new("amqp://admin:admin#localhost:5672")
conn.start
ch = conn.create_channel
puts 'channel created'
q = ch.queue("analytics.persistence.queue",:exclusive => false, :auto_delete => false)
x = ch.direct("amq.direct")
q.bind(x)
q.subscribe(:block => true, :ack => true) do |delivery_info, properties, payload|
puts "Received #{payload}, message properties are #{properties.inspect}"
end
ch.close
con.close
Update: it seems the updated username and password settings are not propagated, rabbit logs show my application still uses guest
=ERROR REPORT==== 19-Mar-2013::00:16:12 ===
closing AMQP connection <0.13815.0> (127.0.0.1:44736 -> 127.0.0.1:5672):
{handshake_error,starting,0,
{amqp_error,access_refused,
"PLAIN login refused: user 'guest' - invalid credentials",
'connection.start_ok'}}
(The OP edited the answer in the post. See Question with no answers, but issue solved in the comments (or extended in chat) )
The OP wrote:
The problem is in my configuration; caching connection factory is defined using both the beans namespace and rabbit namespcace, latter using the defaults. Changed to configuration to following and I do not get connection reset errors anymore
<rabbit:queue id='analytics.persistence.queue' name='analytics.persistence.queue' />
<rabbit:direct-exchange name="amq.direct">
<rabbit:bindings>
<rabbit:binding queue="analytics.persistence.queue">
</rabbit:binding>
</rabbit:bindings>
</rabbit:direct-exchange>
<rabbit:connection-factory id="cachingConnectionFactory"
username="analytics" password="analytics" channel-cache-size="5"
virtual-host="analytics" />
<rabbit:admin connection-factory="cachingConnectionFactory" />
<beans:bean id="rabbitTemplate"
class="org.springframework.amqp.rabbit.core.RabbitTemplate">
<beans:property name="connectionFactory" ref="cachingConnectionFactory" />
<beans:property name="exchange" value="amq.direct" />
<beans:property name="queue" value="analytics.persistence.queue" />
<beans:property name="routingKey" value="save.analytics"></beans:property>
</beans:bean>
<beans:bean id="analyticsMessageProducer"
class="hoodibaba.analytics.publish.AnalyticsPersistenceMessageProducer"
autowire="byName" />
im using struts 1.2 and trying to create a link in jsp page with code
<html:link href="AdminModule/UserCreation.jsp" >
Create User </html:link> `
so that the link will move to page UserCreation in which the code like this is present
<html:form action="/adminUserCreation">
AdminName : <html:text property="username"/><html:errors property="username"/><br/>
Password : <html:password property="password"/><html:errors property="password"/><br/>
<html:submit/>
</html:form>
the struts-config file contain code like this
<form-beans>
<form-bean name="adminUserCreationForm" type="Admin.Form.AdminUserCreationForm" />
</form-beans>
<action-mappings>
<action
attribute="adminUserCreationForm"
input="/AdminModule/AdminHomePage.jsp"
name="adminUserCreationForm"
path="/adminUserCreation"
scope="request"
type="Admin.Action.AdminUserCreationAction"
validate="false">
<set-property property="cancellable" value="true" />
<forward name="failure" path="/AdminModule/AdminErrorPage.jsp" />
<forward name="success" path="/AdminSuccessPage.jsp" />
</action>
</action-mappings>
im getng exception
An exception occurred processing JSP page /AdminModule/UserCreation.jsp at line 30
30: <html:form action="/adminUserCreation">
31: AdminName : <html:text property="username"/><html:errors property="username"/><br/>
32: Password : <html:password property="password"/><html:errors property="password"/><br/>
33: <html:submit/>
root cause is
javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot retrieve mapping for action /adminUserCreation
How to open one jsp from another through struts
This helped me to solve it..
Maybe it will be helpful for anyone else who has the same problem.