none
SSRS邮件订阅不成功 RRS feed

  • 问题

  • OS环境:Windows servers 2012 R2

    数据库环境:SQL Server 2014 Enterprise

    异常现象:SSRS的配置全都按要求配置了,所有账号为域账号. SMTP服务器也在域里面.现在订阅时提示:Failure sending mail.

    请朋友帮忙解答一下,谢谢!

    不好意思不让插入图片.

    2016年5月23日 14:21

答案

  • An attempt was made to access a socket in a way forbidden by its access permissions 123.125.50.134:25

    报表服务器无法连接到你的SMTP服务器,首先这是不是你们的邮件服务器地址,报表服务器能否ping通这个地址,其次你们的邮件服务器是否支持SMTP,然后检查本机的防火墙。

    如果你要用163,注意那个SMTP需要认证的,要输入用户名密码,并且设置SMTP需要认证。当然首先网络和防火墙要检查。


    想不想时已是想,不如不想都不想。

    2016年5月25日 10:09
    版主

全部回复

  • 在SQL Server的Reporting Services Manager中E-Mail Settings

    SMTP 服务和帐户配置,配置的SMTP帐户能否发送邮件,可用Foxmail或Outlook客户端配置一下看能否正常发送邮件


    专注于.NET ERP/CRM开发框架,C/S架构,SQL Server + ORM(LLBL Gen Pro) + Infragistics WinForms

    2016年5月23日 14:30
  • Hi Shuanghua,
        您好,SMTP账户和服务器上的SQL Server agent配置的是同一个账户,是有发送邮件权限的.

        另外:我也把SMTP Server设置为smtp.163.com,也发不成功.

        附上LOG:

    notification!WindowsService_0!304c!05/24/2016-07:56:07:: i INFO: Handling subscription bb9ae25c-ff49-4f83-a544-b8ac66f575ae to report Database_Statistcs_Report, owner: localhost\Administrator, delivery extension: Report Server Email.
    notification!WindowsService_0!3748!05/24/2016-07:56:07:: i INFO: Handling subscription 57c83735-1ebc-4280-842a-54f9924edaed to report Database_Statistcs_Report, owner: domain\sqladmin, delivery extension: Report Server Email.
    emailextension!WindowsService_0!3748!05/24/2016-07:56:08:: e ERROR: Error sending email. Exception: System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions 123.125.50.134:25
       at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
       --- End of inner exception stack trace ---
       at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout)
       at System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback)
       at System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback)
       at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
       at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)
       at System.Net.Mail.SmtpClient.Send(MailMessage message)
       --- End of inner exception stack trace ---
       at System.Net.Mail.SmtpClient.Send(MailMessage message)
       at Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification notification)
    emailextension!WindowsService_0!304c!05/24/2016-07:56:08:: e ERROR: Error sending email. Exception: System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions 123.125.50.134:25
       at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
       at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
       --- End of inner exception stack trace ---
       at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout)
       at System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback)
       at System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback)
       at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout)
       at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port)
       at System.Net.Mail.SmtpClient.Send(MailMessage message)
       --- End of inner exception stack trace ---
       at System.Net.Mail.SmtpClient.Send(MailMessage message)
       at Microsoft.ReportingServices.EmailDeliveryProvider.EmailProvider.Deliver(Notification notification)

    2016年5月24日 1:17
  • An attempt was made to access a socket in a way forbidden by its access permissions 123.125.50.134:25

    报表服务器无法连接到你的SMTP服务器,首先这是不是你们的邮件服务器地址,报表服务器能否ping通这个地址,其次你们的邮件服务器是否支持SMTP,然后检查本机的防火墙。

    如果你要用163,注意那个SMTP需要认证的,要输入用户名密码,并且设置SMTP需要认证。当然首先网络和防火墙要检查。


    想不想时已是想,不如不想都不想。

    2016年5月25日 10:09
    版主