Reputation: 632
I am trying to setup Archiva on windows machine. Below is the error i get while trying to create a admin user.
Problem accessing /archiva/security/register.action. Reason:
Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
nested exception is: java.net.ConnectException: Connection refused: connect Caused by:
org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused: connect at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:419) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:342) at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:338) at org.codehaus.redback.integration.mail.MailerImpl.sendMessage(MailerImpl.java:131) at org.codehaus.redback.integration.mail.MailerImpl.sendAccountValidationEmail(MailerImpl.java:73) at org.codehaus.plexus.redback.struts2.action.RegisterAction.register(RegisterAction.java:154) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404) at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:88) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
Did anyone faced this issue ?
Upvotes: 0
Views: 690
Reputation: 14649
One solution - define smtp server:
In jetty.xml:
<Resource name="mail/Session" type="javax.mail.Session" auth="Container"
mail.smtp.host="localhost"
mail.smtp.auth="true"
mail.user="USERNAME"
mail.password="PASSWORD"
mail.port="25"
mail.transport.protocol="smtp"
mail.debug="true"/>
Or install smtp server on windows. Now I do not know if you can disable mail configuration.
Upvotes: 1