#1 2020-05-14 09:15:58

bhutan
Member
Registered: 2020-05-07

ReportServer email issue

Hello,

I am able to send email via command line but the ReportServer application is not sending any mail.

When I try to do Lost Password I am getting the message:
Could not send new password: Mail could not be send Please contact a system administrator.

Also after creating a new user no email are being sent. Hence new users are not able to login.

How do I troubleshoot?

Thank you in advance.

Regards,
Bhu.

Last edited by bhutan (2020-05-14 09:16:52)

Offline

#2 2020-05-14 12:21:46

eduardo
Administrator
Registered: 2016-11-01
Website

Re: ReportServer email issue

Hi Bhu.,

did you configure your emal server?

https://reportserver.net/en/guides/conf … Scheduler/

Regards,
Eduardo

Offline

#3 2020-05-14 12:35:06

bhutan
Member
Registered: 2020-05-07

Re: ReportServer email issue

eduardo wrote:

Hi Bhu.,

did you configure your emal server?

https://reportserver.net/en/guides/conf … Scheduler/

Regards,
Eduardo

Yes I did configure and below is my config:

        <smtp>
                <host>smtp.gmail.com</host>
                <port>465</port>
                <ssl>true</ssl>
                <tls>
                        <enable>false</enable>
                        <require>false</require>
                </tls>
<username>xxxx@gmail.com</username>
<password>********</password>
        </smtp>
        <mail>
                <sender>xxxx@gmail.com</sender>
                <forceSender>false</forceSender>
                <encryptionPolicy>allow_mixed</encryptionPolicy>
        </mail>

Offline

#4 2020-05-14 13:02:41

eduardo
Administrator
Registered: 2016-11-01
Website

Re: ReportServer email issue

Hi bhutan,

ok, and did you reload your configuration, e.g. with "config reload" or did you restart your Tomcat after changes in this file ?

Please also check the tomcat logs for the complete error stack.

Regards,
Eduardo

Offline

#5 2020-05-14 14:35:49

bhutan
Member
Registered: 2020-05-07

Re: ReportServer email issue

eduardo wrote:

Hi bhutan,

ok, and did you reload your configuration, e.g. with "config reload" or did you restart your Tomcat after changes in this file ?

Please also check the tomcat logs for the complete error stack.

Regards,
Eduardo

Dear Eduardo,

I did restart tomcat and even rebooted the server. Nothing is coming in the tomcat logs (/opt/bitnami/apache2/logs) except for link access.


Regards,
Bhu

Offline

#6 2020-05-14 15:28:53

eduardo
Administrator
Registered: 2016-11-01
Website

Re: ReportServer email issue

Hi Bhu,

these are the apache2 logs. You need the tomcat logs. Please check in the tomcat directory.

Regards,
Eduardo

Offline

#7 2020-05-14 15:58:22

bhutan
Member
Registered: 2020-05-07

Re: ReportServer email issue

eduardo wrote:

Hi Bhu,

these are the apache2 logs. You need the tomcat logs. Please check in the tomcat directory.

Regards,
Eduardo

Dear Eduardo,

This is in tomcat...   Caused by: javax.mail.MessagingException: Could not connect to SMTP host: mail.host.net, port: 25;
Where to configure this setting?

14-May-2020 15:55:11.326 INFO [Catalina-utility-1] net.datenwerke.rs.core.service.i18ntools.RemoteMessageServiceImpl.<init> Available locales: de, hi, lo, pt, lt, hr, lv, hu, zh-CN, hy, uk, id, mk, mn, af, uz, ms, el, mt, en, is, it, my, es, et, eu, vi, ja, ne, ro, nl, no, be, fi, ru, bg, keys, bn, fr, jw, bs, ka, si, sk, sl, ga, gd, ca, sq, sr, kk, km, sv, ko, zh-TW, ta, cs, th, lb, tl, pl, da, tr
14-May-2020 15:55:13.420 INFO [Thread-10] net.datenwerke.gf.service.lateinit.LateInitStartup$1.run Startup completed
14-May-2020 15:55:17.112 INFO [ajp-nio-127.0.0.1-8009-exec-1] net.datenwerke.rs.passwordpolicy.service.BsiPasswordPolicyServiceImpl.getPolicy Password policy not active: Could not find config for security/passwordpolicy.cf
14-May-2020 15:55:33.816 WARNING [ajp-nio-127.0.0.1-8009-exec-9] net.datenwerke.rs.passwordpolicy.service.lostpassword.LostPasswordServiceImpl.requestNewPassword Could not send password.
    net.datenwerke.rs.core.service.mail.exceptions.MailerRuntimeException: Mail could not be send
        at net.datenwerke.rs.core.service.mail.MailServiceImpl$MailSupervisorImpl.handleException(MailServiceImpl.java:58)
        at net.datenwerke.rs.core.service.mail.MailServiceImpl.sendMailSync(MailServiceImpl.java:247)
        at net.datenwerke.rs.core.service.mail.MailServiceImpl.sendMailSync(MailServiceImpl.java:108)
        at net.datenwerke.rs.passwordpolicy.service.lostpassword.LostPasswordServiceImpl.requestNewPassword(LostPasswordServiceImpl.java:126)
        at net.datenwerke.rs.passwordpolicy.server.LostPasswordRpcServiceImpl.requestNewPassword(LostPasswordRpcServiceImpl.java:40)
        at net.datenwerke.rs.passwordpolicy.server.LostPasswordRpcServiceImpl$$EnhancerByGuice$$d706bd06.CGLIB$requestNewPassword$0(<generated>)
        at net.datenwerke.rs.passwordpolicy.server.LostPasswordRpcServiceImpl$$EnhancerByGuice$$d706bd06$$FastClassByGuice$$9cd6641c.invoke(<generated>)
        at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
        at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:66)
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
        at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:109)
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
        at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
        at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)
        at net.datenwerke.rs.passwordpolicy.server.LostPasswordRpcServiceImpl$$EnhancerByGuice$$d706bd06.requestNewPassword(<generated>)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:587)
        at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:333)
        at net.datenwerke.rs.passwordpolicy.server.LostPasswordRpcServiceImpl$$EnhancerByGuice$$d706bd06.CGLIB$processCall$4(<generated>)
        at net.datenwerke.rs.passwordpolicy.server.LostPasswordRpcServiceImpl$$EnhancerByGuice$$d706bd06$$FastClassByGuice$$9cd6641c.invoke(<generated>)
        at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
        at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:109)
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
        at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
        at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)
        at net.datenwerke.rs.passwordpolicy.server.LostPasswordRpcServiceImpl$$EnhancerByGuice$$d706bd06.processCall(<generated>)
        at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:303)
        at net.datenwerke.rs.passwordpolicy.server.LostPasswordRpcServiceImpl$$EnhancerByGuice$$d706bd06.CGLIB$processCall$3(<generated>)
        at net.datenwerke.rs.passwordpolicy.server.LostPasswordRpcServiceImpl$$EnhancerByGuice$$d706bd06$$FastClassByGuice$$9cd6641c.invoke(<generated>)
        at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
        at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:109)
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
        at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
        at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)
        at net.datenwerke.rs.passwordpolicy.server.LostPasswordRpcServiceImpl$$EnhancerByGuice$$d706bd06.processCall(<generated>)
        at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:373)
        at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
        at net.datenwerke.rs.passwordpolicy.server.LostPasswordRpcServiceImpl$$EnhancerByGuice$$d706bd06.CGLIB$service$24(<generated>)
        at net.datenwerke.rs.passwordpolicy.server.LostPasswordRpcServiceImpl$$EnhancerByGuice$$d706bd06$$FastClassByGuice$$9cd6641c.invoke(<generated>)
        at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228)
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
        at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:109)
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
        at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72)
        at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52)
        at net.datenwerke.rs.passwordpolicy.server.LostPasswordRpcServiceImpl$$EnhancerByGuice$$d706bd06.service(<generated>)
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263)
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178)
        at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62)
        at com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:89)
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168)
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
        at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118)
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
        at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:432)
        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590)
        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.base/java.lang.Thread.run(Thread.java:834)
    Caused by: javax.mail.MessagingException: Could not connect to SMTP host: mail.host.net, port: 25;
  nested exception is:
    java.net.NoRouteToHostException: No route to host (Host unreachable)
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1972)
        at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:642)
        at javax.mail.Service.connect(Service.java:295)
        at javax.mail.Service.connect(Service.java:176)
        at javax.mail.Service.connect(Service.java:125)
        at javax.mail.Transport.send0(Transport.java:194)
        at javax.mail.Transport.send(Transport.java:124)
        at net.datenwerke.rs.core.service.mail.MailServiceImpl.sendMailSync(MailServiceImpl.java:237)
        ... 88 more
    Caused by: java.net.NoRouteToHostException: No route to host (Host unreachable)
        at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)
        at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)
        at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)
        at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)
        at java.base/java.net.Socket.connect(Socket.java:609)
        at java.base/java.net.Socket.connect(Socket.java:558)
        at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:319)
        at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:233)
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1938)
        ... 95 more

Last edited by bhutan (2020-05-14 16:01:34)

Offline

#8 2020-05-15 07:11:10

eduardo
Administrator
Registered: 2016-11-01
Website

Re: ReportServer email issue

Hi Bhu,

"Could not connect to SMTP host: mail.host.net, port: 25"

Can you please double check your mail.cf file? this setting should be changed here:
<host>mail.yourmailserver.com</host>

After this, you have to restart your tomcat. Restarting apache2 is not enough. You can also reload config with "config reload".

You have the incorrect host: mail.host.net

Regards,
Eduardo

Offline

#9 2020-05-15 08:09:08

bhutan
Member
Registered: 2020-05-07

Re: ReportServer email issue

eduardo wrote:

Hi Bhu,

"Could not connect to SMTP host: mail.host.net, port: 25"

Can you please double check your mail.cf file? this setting should be changed here:
<host>mail.yourmailserver.com</host>

After this, you have to restart your tomcat. Restarting apache2 is not enough. You can also reload config with "config reload".

You have the incorrect host: mail.host.net

Regards,
Eduardo

Dear Aduardo, I checked the path /etc/mail/mail.cf and my mail settings are as follows:

        <smtp>
                <host>smtp.gmail.com</host>
                <port>465</port>
                <ssl>true</ssl>
                <tls>
                        <enable>false</enable>
                        <require>false</require>
                </tls>
<username>XXXX@gmail.com</username>
<password>XXXX</password>
        </smtp>
        <mail>
                <sender>XXXX@gmail.com</sender>
                <forceSender>false</forceSender>
                <encryptionPolicy>allow_mixed</encryptionPolicy>
        </mail>

Offline

#10 2020-05-15 08:53:08

eduardo
Administrator
Registered: 2016-11-01
Website

Re: ReportServer email issue

Hi Bhu,

the default configuration in mail.cf is:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
   <smtp>
      <host>mail.host.net</host>
      <port>25</port>
      <!--<username>rs@host.net</username>
      <password></password>
      -->
      <ssl>false</ssl>
      <tls>
         <enable>false</enable>
         <require>false</require>
      </tls>
   </smtp>
   <mail>
      <sender>rs@host.net</sender>
      <senderName>ReportServer</senderName>
      <forceSender>false</forceSender>
      <encryptionPolicy>allow_mixed</encryptionPolicy>
   </mail>
</configuration>

As you see, you have "mail.host.net" here. Which is the same as in your error message: "Could not connect to SMTP host: mail.host.net, port: 25"

So the configuration you changed is not being loaded. Did you restart your Tomcat ? Again, only restarting your apache2 server is not enough, please make sure you restart your Tomcat after you saved your changes in mail.cf and check the name of "mail.cf" for no spaces/etc. It has to be named exactly like this "mail.cf" in order to load this correctly.

Regards,
Eduardo

Offline

#11 2020-05-15 09:25:05

bhutan
Member
Registered: 2020-05-07

Re: ReportServer email issue

eduardo wrote:

Hi Bhu,

the default configuration in mail.cf is:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
   <smtp>
      <host>mail.host.net</host>
      <port>25</port>
      <!--<username>rs@host.net</username>
      <password></password>
      -->
      <ssl>false</ssl>
      <tls>
         <enable>false</enable>
         <require>false</require>
      </tls>
   </smtp>
   <mail>
      <sender>rs@host.net</sender>
      <senderName>ReportServer</senderName>
      <forceSender>false</forceSender>
      <encryptionPolicy>allow_mixed</encryptionPolicy>
   </mail>
</configuration>

As you see, you have "mail.host.net" here. Which is the same as in your error message: "Could not connect to SMTP host: mail.host.net, port: 25"

So the configuration you changed is not being loaded. Did you restart your Tomcat ? Again, only restarting your apache2 server is not enough, please make sure you restart your Tomcat after you saved your changes in mail.cf and check the name of "mail.cf" for no spaces/etc. It has to be named exactly like this "mail.cf" in order to load this correctly.

Regards,
Eduardo

Dear Eduardo, I am trying to find out where to look for mail.host.net as I haven't given this setting in mail.cf
I have restarted the services and server also. I think ReportServer is taking the mail configuration from different file...

My .cf path is /etc/mail/mail.cf
Is it correct?

Last edited by bhutan (2020-05-15 09:35:46)

Offline

#12 2020-05-15 10:45:16

eduardo
Administrator
Registered: 2016-11-01
Website

Re: ReportServer email issue

Hi bhutan,

we are talking about the internal reportserver file system, correct? *Not* about the Linux file system.
Can you please send me a screenshot of your configuration ? you can use http://imgbb.com for this.

Regards,
Eduardo

Offline

#13 2020-05-15 17:14:05

eduardo
Administrator
Registered: 2016-11-01
Website

Re: ReportServer email issue

Hi bhutan,

thanks for the screenshot.
The configuration file you sent me seems to be located in your Linux system. ReportServer uses an internal file system, where the configuration files are located. Please check details here: https://reportserver.net/en/guides/conf … iguration/ and https://reportserver.net/en/guides/admi … le-System/

All configuration files in ReportServer can be found in ReportServer's internal filesystem. You can access the internal filesystem using the administration module (administration/ file system).

Regards,
Eduardo

Offline

#14 2020-05-16 03:10:05

bhutan
Member
Registered: 2020-05-07

Re: ReportServer email issue

Dear Eduardo,

Thank you. Finally emails are working after following your help.
I am able to get new user creation and forgot password emails but when I login with the new users correct password received from email I am getting the message "Login attempt failed."
Any solution for this.

Thanks,
Bhu.

Offline

#15 2020-05-18 11:36:13

eduardo
Administrator
Registered: 2016-11-01
Website

Re: ReportServer email issue

Hi bhutan,

each time, a new password is being generated and the previous password sent is invalidated. Please make sure you only send one password and use exactly this one when trying to log in. If you use a previously sent password, you get the error message you posted: "Login attempt failed."

Regards,
Eduardo

Offline

#16 2020-05-28 06:57:28

eduardo
Administrator
Registered: 2016-11-01
Website

Re: ReportServer email issue

Hi bhutan,

the administrator can also change passwords of all users by the administration -> user management tab.

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB