Login   Register 
Receive news via our XML/RSS feed
Home | Book | Contents | Preview | Articles | Tools | Newsletters | Premium | Ask | About

Home

Book

Contents

Preview

Articles

Tools

Newsletters

Premium

Ask

About

Most Popular Articles
  • Using Secure Sockets Layer (SSL) for SQL Server 2000 Reporting Services
    Creating an SSL Certificate to ensure your confidential reports remain confidential


  •  
    Beta V Corporation
     
     
    SQL Reporting Services - Answers to your questions
     
    Author Thread: Email delivery causes weird error (and fails)
    ianpro

    Email delivery causes weird error (and fails)
    Posted: Friday, July 23, 2004 9:51 PM (GST)

    Any subscribed report I attempt to deliver via email is failing with a strange error. The Report Manager Status indicator says:

    Failure sending mail: An internal error occurred on the report server. See the error log for more details.

    The error occurs when the email is triggered via snapshot execution. The following popup appears on the Report Server console:

    The procedure entry point I_RpcExceptionFilter could not be located in the dynamic link library RPCRT4.dll.

    This occurs for any report I attempt to deliver via email on our internal network (using Exchange 2000). I can provide the RS server error log, but it's rather long, so I'll hold off unless it's needed.

     

    Comments:  

    Author Thread:
    Peter
    Email delivery causes weird error (and fails)
    Posted: Friday, July 23, 2004 9:56 PM (GST)

    Are you running SP1? (If not might be v. good idea to install it)

     

    What version of RPCRT4.dll do you have? (its in c:\Windows\system32)

     

     

    Peter

     

    ianpro
    Email delivery causes weird error (and fails)
    Posted: Friday, July 23, 2004 9:59 PM (GST)

    Affirmative on SP1.  RPCRT4.dll is dated 3/11/2004 and 440kb.

     

    -- Ian

    Peter
    Email delivery causes weird error (and fails)
    Posted: Friday, July 23, 2004 10:03 PM (GST)

    Looking on one of my test systems.... (running XP)

     

    the File Version is : 5.1.2600.1361 (xpsp2.040109-1800)

    it is dated 06/03/04  and is 523KB

     

    Peter....  

     

     

    Peter
    Email delivery causes weird error (and fails)
    Posted: Friday, July 23, 2004 10:06 PM (GST)
    I had better clarify that date it is in UK format - so I guess it is 6 march 2004
    ianpro
    Email delivery causes weird error (and fails)
    Posted: Friday, July 23, 2004 10:09 PM (GST)

    Hmm...indeed!  This is on a Windows 2000 server (SP4); the file version is 5.0.2195.6904.  There are several references in the log file that read thusly:

     

    ReportingServicesService!emailextension!12a4!07/23/2004-13:20:59:: Error sending email. Microsoft.ReportingServices.Diagnostics.Utilities.RSException: An internal error occurred on the report server. See the error log for more details. ---> Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. ---> System.DllNotFoundException: Unable to load DLL (authz.dll).

     

    My authz.dll is version 5.1.2600.0.

     

    Any ideas on this one?

    ianpro
    Email delivery causes weird error (and fails)
    Posted: Friday, July 23, 2004 10:27 PM (GST)

    Now that I'm digging into this a little more deeply...

     

    What is the relationship between the IIS Virtual SMTP Server (in this case, my SQL/SRS/IIS server) and the Exchange server on my network?  I have specified the IP address of our Exchange server in the RSReportServer.Config file; I have also added the IP addresses of both the local SQL/SRS/IIS server the same Exchange server to the Access...Relay properties tab for the Virtual SMTP Server.  And yes, SQL Agent is running too.  Am I missing something obvious?

     

    -- Ian

    Peter
    Email delivery causes weird error (and fails)
    Posted: Friday, July 23, 2004 10:30 PM (GST)

    The link to the exchange server is nothing more than just Reporting SErvices talks to it over port 25...as it will talk to any SMTP mail server on port 25..

     

    I think the problems you have are related to authz.dll....

    From the Readme.htm

     

    1.4 Authz.dll prerequisite for Windows 2000 server with SP4

    Some installations of Windows 2000 and Service Pack (SP) 4 may not include the Authorization Framework (Authz.dll) file. If you upgraded to SP4 from a previous version (such as SP3), Authz.dll should be installed. If you installed Windows 2000 with SP4 included (i.e., "slipstream"), Authz.dll is probably missing. This can be corrected by installing SP4 separately or by installing a hotfix as described in Knowledge Base Article 320211. You can obtain the hotfix through Product Support Services (PSS) when you reference this KB article.

    Authz.dll is used by Reporting Services to perform authorization checks when the report server executes a scheduled process (such as a subscription or snapshot refresh). If the file is not installed on your computer, a warning is displayed during the prerequisite check in Setup.

     

    It might be an idea/ longshot to re-apply SP4 from the network install rather than Windows Update??

     

    Peter

    ianpro
    Email delivery causes weird error (and fails)
    Posted: Friday, July 23, 2004 11:21 PM (GST)

    Well the re-install was a good idea, but I still get the same error.  Thanks for trying tho...I'll see if I can't get some help from the MSFT newsgroup or <gasp> PSS.

     

    -- Ian

    ianpro
    Email delivery causes weird error (and fails)
    Posted: Saturday, July 24, 2004 12:00 AM (GST)

    Some progress...I discovered that despite the SP4 re-install, authz.dll was an older version.  I had a new test system I just built, and its version of authz.dll was 2 years newer.  I replaced the old version, but when I attempted to register it with regsvr32, I got an error message stating the file might be corrupt.   When I ran a snapshot delivery however, now I get a different error message:

    The pickup directory path is required and was not specified.

    I think I'm getting closer...

    Peter
    Email delivery causes weird error (and fails)
    Posted: Saturday, July 24, 2004 10:26 AM (GST)

    ok - look at the rsReportServer.config file - you've possible got that set to deliver via pickup folder (Which actually is better) if you have SMTPSVC running on the Server.

     

    Peter

    ianpro
    Email delivery causes weird error (and fails)
    Posted: Monday, July 26, 2004 6:32 PM (GST)

    Hi Peter,

     

    It is set to deliver to the default pickup folder location (C:\Inetpub\mailroot\pickup) but the mail isn't being delivered.  Report Manager..My Subscriptions says the mail is delivered successfully, but all the messages are in the \mail\Badmail directory.  The SMTP service is running on the server, and I have my Exchange server specified (by IP address) in the <SMTPServer> value in the config file.

    Peter
    Email delivery causes weird error (and fails)
    Posted: Monday, July 26, 2004 9:00 PM (GST)

    Ok - great.

     

    What you've got it configured for is for the SMTP Service on the local machine to perform the delivery.

     

    If the Report Manager is saying that it is delivered successfully - then it is putting it into the pickup folder of your local SMTP service.

     

    But you have a configuration issue on the SMTP service that you now need to resolve.

     

    What is going on is that the SMTP service is failing and transfering to the badmail directory after it has attempted the delivery.

     

    So narrow down your troubleshooting to the SMTP service - if you telnet over port 25 to that service then you can have a test conversation with the SMTP service - so at a command line if you type the following replacing the addresses as necessary then you may get a bit more useful information from your SMTP server - it may be that it is not permitting relay....

     

    telnet 127.0.0.1 25
    HELO mytest
    MAIL FROM:PeterTest@mydomain.net
    RCPT TO:Peter@mytestdomain.net
    DATA
    Hello this is a TEST
    .

     

     

    (Note that you cannot use backspace or delete when talking to the SMTP Service directly on port 25...)

     

    Happy troubleshooting....:-)

     

    Peter

     

     

     

    ianpro
    Email delivery causes weird error (and fails)
    Posted: Monday, July 26, 2004 9:56 PM (GST)

    Thanks Peter,

     

    Telnetting to my SQL/SRS/IIS server yielded the following result:

     

    Queued mail for delivery

     

    Except there are no items in the Badmail folder OR the Queued folder.  And no mail received of course.

     

    I did the same test on my Exchange server, and the message came right through.  I do have each box set up to allow relaying from the other by IP address....aaaarrrgh!  I appreciate your indulgence on this one.

     

    I've been trolling the MS newsgroups for useful info, and I see there are many other threads about similar problems.  Their solutions haven't helped me yet either.

    ianpro
    Email delivery causes weird error (and fails)
    Posted: Monday, July 26, 2004 10:19 PM (GST)
    I've opened up the delivery access to allow relaying from any machine in our domain, and the test messages sent via telnet and messages from SRS are remaining in the \Queued folder.  I even moved one directly into the \Pickup folder and it immediately placed it back in the \Queued folder.  As if it's wating for something to happen...<sigh>
    Peter
    Email delivery causes weird error (and fails)
    Posted: Monday, July 26, 2004 10:32 PM (GST)

    in the advanced delivery options - put the IP address of your Exchange Server

    in the smart host and then select Attempt direct delivery before sending to smart host.

     

    Dont check the perform reverse DNS look up on incoming messages.

     

    stop the SMTP services and restart it.

     

    and then lets see where we get to...

     

    Peter

     

     

    ianpro
    Email delivery causes weird error (and fails)
    Posted: Monday, July 26, 2004 11:06 PM (GST)

    Peter you beautiful bugger, that's it!

     

    Well almost...it only works with the "Attempt direct delivery" box UNchecked. 

     

    Doesn't it seem though that this configuration (single SQL/SRS/IIS server in the same domain as the Exchange server) should be simpler to set up?  There is nothing I can find in the SRS BOL indicating this level of configuration for the IIS SMTP virtual server, or that you need to configure the Exchange server to allow Relaying.

     

    Regardless, after 2 days of tinkering, it's working.  Thank you...next time you are in Seattle (on this side of the lake) I will buy you a pint!

     

    Cheers,

     

    -- Ian

    Peter
    Email delivery causes weird error (and fails)
    Posted: Tuesday, July 27, 2004 10:26 AM (GST)

    Hmmm - it was not the exchange server that you should set to relay - but the local SMTP service....

     

    The BOL and the standard set-up deals with the Report Server talking directly to the Exchange Server on Port 25. Our book gives a few more details on the alternative configuration.  I prefer using the local SMTP Service's pickup folder - because it means that the Reports are discharged from the Report Server on one try. Wheras otherwise if the Report Server can't connect to the Exchange Server then it must retry and you've little to no control over what is happening. Like for example you have already seen that you could see the mails in the badmail and queued mail folders....

     

    Now your local SMTP service possibly cant perform a direct delivery because of either DNS or firewall configruation.  You see in order for the SMTP service to deliver directly it looks at the email address and then queries DNS for the MX record for the domain.  If you want to see this in action... at the command prompt try:

     

    nslookup
    set type=MX
    mydomain.com

     

    replace the mydomain.com with the domain of the target email address.

     

    What this will return is the MX record from DNS for that target domain - i.e. the IP address of a mail server for that domain.

     

    So in the troubleshooting you might like to see if the DNS server that the machine is using is able to return MX records for the target domain(s).

     

    Given that you have a proper ip address - you may then find that you have firewall issues that prevent your SMTP service getting out on port 25.  This is quite usual to restrict which programs and hosts can send trafic on port 25 to prevent trojan virus etc sending out email....

     

     

    BTW:  Its not a great idea to have a publicly exposed exchange server in full open relay - so hopefully you have that locked down to just relay for machines in the domain - or for authenticated users?

     

     

    Peter.

     

     

     

     

     

     

    ianpro
    Email delivery causes weird error (and fails)
    Posted: Tuesday, July 27, 2004 6:01 PM (GST)

    Using your test, I see that the SMTP server is able to find the MX record for our Exchange server correctly.  I don't think our firewall is the cause, since these two servers are both in the same domain and don't need an Internet connection to communicate (do they?), but just to be safe I bypassed our firewall with a little applet we have that allows us to do so.  The delivery still failed (after I changed the Advanced Delivery properties for SMTP to attempt direct delivery first, then restarted the SMTP service) with the following text in the message from the \Badmail folder (I have removed my actual email address):

    Reporting-MTA: dns;JEGDR.jgh.org
    Received-From-MTA: dns;JEGDR.jgh.org
    Arrival-Date: Tue, 27 Jul 2004 09:37:59 -0700

    Final-Recipient: rfc822;<me>@mydomain.org
    Action: failed
    Status: 5.7.1
    Diagnostic-Code: smtp;550 5.7.1 Unable to relay for
    <me>@mydomain.org

     

    I've found some MS KB articles that refer to the SMTP 5.7.1 error, but we have everything configured the way their workaround solutions suggest.  So I'm at a bit of a loss, although the email delivery works as long as I don't attempt to do it directly via the SMTP service.  Which I think I can live with, although I would like to discover why it's not working the way it should.

     

    -- Ian

    rwankuba
    Email delivery causes weird error (and fails)
    Posted: Monday, September 20, 2004 4:58 PM (GST)

    I'm evaluating RS and this is a key feature for its adoption. No way of getting the reports sent via email.

    My environment is SQL Server 2k from a MS Small Business Server.

    Deployment of reports on 'localhost' works fine but subscription via email fails.

     

    Any help?

     

    Thanks.

     

    Jeam

    ianpro
    Email delivery causes weird error (and fails)
    Posted: Wednesday, September 22, 2004 7:28 PM (GST)

    Jeam,

     

    I think if you read through this thread it will give you a good start on troubleshooting this problem.  What error message are you receiving?  Can you find the corresponding entry in the SRS log files?  From there, determine if the mail is actually being sent, or if it's failing (you'll see the messages in the IIS log \Badmail folder on your server).  Peter's recommendations in this thread for testing your SMTP functionality via cmd line were very helpful to me in resolving my problems.

    rwankuba
    Email delivery causes weird error (and fails)
    Posted: Thursday, September 30, 2004 1:32 PM (GST)

    Hi Ian.

     

    Still having headache with this email subscription problem. I think I might need a clean RSReportServer.Config file. Do you mind showing me how yours look like? I can't even get the emails dropped in the Badmail folder of my IIS. FYI, I'm running a SQL Server 2k from an Small Business Server licence where I've installed the Reporting Services and applied SP1.

    I keep on trying Peter's recommendations.

    Thanks a million in advance.

     

    Jean-Marie

    Peter
    Email delivery causes weird error (and fails)
    Posted: Thursday, September 30, 2004 1:58 PM (GST)
    What are the precise details of the error you are seeing? What do the Service logs report is going wrong? When making changes to the config file - did you also restart the Report Server Windows Service? Is SMTPSVC running on your local machine? Did you read the sample chapter 2 that deals with installation?
    Peter
    rwankuba
    Email delivery causes weird error (and fails)
    Posted: Thursday, September 30, 2004 2:37 PM (GST)

    The status of the subscription reads: Failure sending mail: The Report Server has encountered a configuration error; more details in the log files.

    Checking the log files (Windows) there's no trace of RS triggered error. SMTPSVC is running on my local machine. I'm going to re-read the chapter 2, maybe I missed the obvious.

    For the sake of it, I've re-applied SP1 to deal with the KB article on the MS web site. Is there anything special I need put in the rsReportServer.config file since the actual SMTP server is at a remote location?

     

    Jean-Marie

    Peter
    Email delivery causes weird error (and fails)
    Posted: Thursday, September 30, 2004 3:30 PM (GST)

    are you looking in the logfiles in :

    C:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\LogFiles

    Peter

    rwankuba
    Email delivery causes weird error (and fails)
    Posted: Thursday, September 30, 2004 3:47 PM (GST)

    Yes. The files are not 'reader-friendly' but this is an extract of the line where the error occurs:

    e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The Report Server has encountered a configuration error; more details in the log files, AuthzInitializeContextFromSid: Win32 error: 5; possible reason - service account doesn't have rights to check domain user SIDs.;
     Info: Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The Report Server has encountered a configuration error; more details in the log files
    ReportingServicesService!library!c30!09/30/2004-15:30:08:: i INFO: Initializing EnableExecutionLogging to 'True'  as specified in Server system properties.
    ReportingServicesService!emailextension!c30!09/30/2004-15:30:08:: Error sending email. Microsoft.ReportingServices.Diagnostics.Utilities.RSException: The Report Server has encountered a configuration error; more details in the log files ---> Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException: The Report Server has encountered a configuration error; more details in the log files

     

    Any idea what's wrong in the Config file?

    Peter
    Email delivery causes weird error (and fails)
    Posted: Thursday, September 30, 2004 3:55 PM (GST)
    Right the area to concentrate on is "service account doesn't have rights to check domain user SIDs.;"

    So the Report Server Windows Service under which account are you running it?

    Did you follow the installation instructions in Chapter 2, when choosing acounts and installing?

    Peter
    rwankuba
    Email delivery causes weird error (and fails)
    Posted: Thursday, September 30, 2004 4:31 PM (GST)

    Can't recall the exact setting used with installation but the ReportServer service is started (and Automatic with Log On As: "Local System") and the in Processes (task manager) ReportingServicesService.exe is under User Name SYSTEM.

    I might be wrong but I think I used NT Authority when installing.

    The ReportServer database has my Domain\UserName as dbo in its users

     

    Jean-Marie

    Peter
    Email delivery causes weird error (and fails)
    Posted: Thursday, September 30, 2004 5:54 PM (GST)

    I guess you are using Windows 2000 Server? I've seen this problem before - its to do with AuthzInitializeContextFromSid on Windows 2000 Server. The Microsoft supported resolution of this issue is to reconfigure to use a domain account for the service and this involves creating a domain user account for the service, assigning that account to run the service under and ensuring that that account has rights to the ReportServer and ReportServerTempDB databases.

    There is a Microsoft Knowledge base article on this - its: KB842423 http://support.microsoft.com/default.aspx?scid=kb;;842423 "A call to the AuthzInitializeContextFromSid API function may fail during the delivery of an e-mail subscription."

    That said - I've seen this problem sporadically on Windows 2000 Servers and it seems to me that in the past I've made this problem go away, without having to make changes to the Report Server configuration. by re-applying the last Service Pack (SP4) from the complete network download of SP4 from  http://www.microsoft.com/windows2000/downloads/servicepacks/sp4/default.asp and reboot.

     

    The systems that I've seen this problem on had taken their SP4 from the slip-steam auto update.

    If you go down the route of reapplying SP4 from the network download kit - please let me know if it resolves the problem.

    (At this stage we should concentrate on resolving the Authz problems as logged to the service logs when the service is rebooted rather than make any changes to config file in relation to mail.)

    Peter

    ianpro
    Email delivery causes weird error (and fails)
    Posted: Thursday, September 30, 2004 10:44 PM (GST)

    I have to echo Peter's comments about re-applying SP4; specifically, re-installing (and re-registering) the authz.dll file.  That's what fixed it for me.

     

    If you go back and entries in this thread from July 23-24, you'll see what I mean...

     

    -- Ian

    rwankuba
    Email delivery causes weird error (and fails)
    Posted: Friday, October 01, 2004 8:54 AM (GST)

    Good news chaps!

    I'm on the KB article Peter sent me yesterday and by removing the flag to embed the report in the email (setting in the subscription).

    I'm taking it further to see if the recommendations will allow embedding the report.

    The idea is to allow report to be pushed to people outside the Report Manager server scope.

    I keep you posted.

     

    Thanks for input.

     

    Jean-Marie

    Si
    Email delivery causes weird error (and fails)
    Posted: Thursday, October 28, 2004 3:14 PM (GST)

    Hi,

     

    I'm afraid that i'm also getting this error now & can't for the life of me sort it out atm. Server is a web facing machine behind a firewall with the email setup to use our ISP's SMTP server rather than the localhost one.

     

    Just getting errors the same as Ian was - server details:

     

    Windows 2000 server with SP4 built into the CD

    Reapplied the network version of SP4 after all other s/w was installed.

    Authz.dll version is 5.1.2600.0 and dated 23rd May 2004 - 50k file

     

    I can post log snippets if it's any use but basically i'm getting the same errors as Ian was it seems. Tried registering authz.dll manually but loadlibrary fails.

     

    Ian, how exactly did you get around this problem?

     

    Cheers

     

    Si

    Peter
    Email delivery causes weird error (and fails)
    Posted: Thursday, October 28, 2004 4:36 PM (GST)

    Hello Si,

    its not an ActiveX dll - so it doesn't need and can't be registered.. The only other 'solution' is that that Microsoft offer - see
    http://support.microsoft.com/?kbid=842423

    Peter

    Si
    Email delivery causes weird error (and fails)
    Posted: Thursday, October 28, 2004 4:49 PM (GST)

    Hi Peter,

     

    Thanks for the reply. I didnt think it was a com dll but when Ian mentioned he tried registering it, thought it may be corrupt :)

     

    I'm purging my way through the KB article now, will let you know how I get on. Heres hoping!

     

    Si

    Si
    Email delivery causes weird error (and fails)
    Posted: Friday, October 29, 2004 8:20 AM (GST)

    Didnt work i'm afraid. Tried the 1st resolution i.e. new account to run the service, Got the error 'Schedule and Delivery Processor cannot connect to the report server database. '

     

    Then going through the other options would not work as i'm not on a domain controller so the relevant snapin/permissions are not available to me. This is a standalone Windows 2000 server which is going to be web facing hence the reason it's on it's own.

     

    Any other suggestions? Everything seems to work bar email subscriptions. I've even tried to install the local SMTP virtual server & although it's installed, I can't manage it from within IIS as it does not show up in the snapin!

     

    Si

    Si
    Email delivery causes weird error (and fails)
    Posted: Monday, November 01, 2004 10:37 AM (GST)

    Ok i've fixed it. Basically the problem was Authz.dll and the wrong version on the box. I had installed SP4 network patch on the box and the version was 5.1.2600, I went onto another box on our network and found another version (still patched up to sp4) which was 5.0.2195.6659. I copied this older dll over to the reporting services machine and hey presto it works!

     

    Crazy that i've gotta copy an older dll over the new one to make it work ok.

     

    Cheers

     

    Si

    IIG
    Email delivery causes weird error (and fails)
    Posted: Thursday, December 23, 2004 7:04 PM (GST)
    I am getting something similar. This error is generated when I attempt a subscription email. Application popup: ReportingServicesService.exe - Entry Point Not Found : The procedure entry point I_RpcExceptionFilter could not be located in the dynamic link library RPCRT4.dll. Any Ideas?
    preethapop
    Email delivery causes weird error (and fails)
    Posted: Thursday, February 02, 2006 3:06 PM (GST)

    When im trying to send mail to the username@domainname.tbl, im getting an error that says "The e-mail address of one or more client is invalid".but if im using the username@smtpservername then, it says the mail is delivered.

    any ideas? is it that the SMTPserver and the domain name registered on this smtp server should be the same?

    Please help!

    thank u

    preethapop
    Email delivery causes weird error (and fails)
    Posted: Thursday, February 09, 2006 11:00 AM (GST)

    i found it!!!!!!

    if the domain name and server name are different, then put the domain name in the <SMTPAccount>tag.....

    like <SMTPAccountName>domainname<\SMTPAccountName> in the RSReportServer config file

    far
    Email delivery causes weird error (and fails)
    Posted: Thursday, June 29, 2006 7:11 PM (GST)

    Mine did not have anything to do with domain.

    Symptom: email subscription on reporting server failed.

    Errors found in reporting log were about: AuthzintializeContextFromSid with errno: 1722 and errno: 5

     

    Errors in EventViewer in Application complained about lcoal activation permissions for com object with clsid.

     

    Things that I did that finally made email subscription or loading to a share work:

    1. on the web, people kept mentioning hotfix from microsoft. Windows 2003 sp1 already contains the hotfix.

    2. next was that you are running the reporting service as non-domain account. This was true. So we changed it to domain account - still same errors. Tried my domain account and it worked!

    applied Microsoft KB842423 - applied it - same errors

    3. Per Microsoft KB 899965 - found that Network Services was the was corresponded to the CLSID mentioned in the EventViewer log.

    Went Component Manager and tried to find "Network Services" - did not find it under DCOM which was under My computer. However there was "netman" - gave if launch and activation permissions.

     

    That's it. Now it all works.

    Hope this help prevent baldness

    -Far.

     
     
     
     
     
    Home | Book | Contents | Preview | Articles | Tools | Newsletters | Premium | Ask | About