Reporting Services 2005 for the DBA – Connectivity Issues

Reporting Services 2005 for the DBA – Connectivity Issues

報表服務之DBA系列關於連接 

http://sqlblogcasts.com/blogs/stevechowles/archive/2007/07/02/reporting-services-2005-for-the-dba-connectivity-issues.aspx

Author: Steve Chowles

After an Installation of Reporting Services with the configuration complete, there is no guarantee you will be able to connect to Reporting Services straight away. So this article will discuss issues connecting to Report Server and Report Manager and give you some advice on how to resolve these issues. 

在安裝和配置完成報表服務之後,我們並不能保證就可以直接連接報表服務了,所以這篇文章將討論關於報表服務器和報表管理器的連接問題並給出一些相應的解決方案.

 

The first sign of a connectivity issue is when a DBA first runs Report Manager from their browser. There are a whole host of errors which could return however; hopefully you will be able to resolve them with the help of this article.

 

 當一名DBA從他們的瀏覽器第一次運行報表管理器的時候就可以會有連接問題.返回的是整個站點不可以訪問,然而,希望你能夠通過這篇文章解決這些問題.

 

Check the Report Server Web Service is working correctly

檢查報表服務器的Web Service 是否正常運行

 

The Report Server Web Service is the heart of Reporting Services. There is a log file created for the Web Service however; it is only created if all the pieces required to get there are up and running, so first we need to check IIS.

 報表服務器的Web Service是整個報表服務的核心.並且有相應的日誌記錄來記錄所有啓動和運行Web Service的信息,我們首先需要檢查的是IIS.

 

I am going to provide a list of areas to check and it is worth ensuring you have read my previous blogs on IIS and IIS Security.

我將提供一個檢查列表來檢查這些.當然,我希望你已經閱讀過我之前的關於IISIIS安全的文章

 

Event Log

Check out the System and Application event logs, many IIS and Application Pool failures are written there. 

事件日誌

 檢查系統和應用程序事件日誌,大部分的IIS和應用程序錯誤都會寫入此日誌.

 

IIS Admin Service

Make sure the IIS Admin Service is running. You need this service in order to run web sites and configure IIS. 

III管理服務

確保IIS管理服務處於運行狀態.你需要使用這個服務來運行web站點和配置IIS.

 

Report Server Application Pool

報表服務器的應用程序緩存池

 

Using IIS Manager check the Application Pool whish is used by the Report Server is running. You can confirm the Application Pool used by Report Server by looking at the Properties of the ReportServer web site. It will be at the bottom of the Virtual Directory tab.

使用IIS管理器來檢查報表服務器所使用的應用程序緩存池.你可以通過查看報表服務器站點的屬性來檢查報表服務器所使用的應用程序緩存池.它應該在虛擬目錄的下方.

Once known click on the Application Pools link and verify the pool is running on the right hand pane.

 單擊應用程序緩存池並且在右側的窗口驗證所運行的報表服務器緩存池.

 

Report Server Website

報表服務器站點

Using IIS Manager click on the Web Sites link and verify the Reporting Services web site is running on the right hand pane.

 使用IIS管理器打開web站點的連接並在右側的區域驗證報表服務站點處於運行狀態.

 

Connection URL

連接URL

You need to understand what the Connection URL to the Report Server Web Service is. This is really important because an incorrect URL maybe the only issue.

 你必須理解什麼是報表服務連接的URL.這將非常重要,因爲不正確的URL連接將是的唯一問題.

 

From IIS Manager click on the Web Sites link and look at the right hand pane. There are various columns and the important ones are Host Header Value, IP Address, Port, and SSL Port. Depending on what values you have here will depend on the URL used to connect to the Report Server.

 IIS管理器點擊Web站點的連接,並在右側的窗口中查看.那裏面有很多欄位,最重要的一些欄位有主機表頭值,IP地址,端口,SSL端口.這些值都是連接報表服務器的URL所需要的.

 

There may be multiple entries with different values and in order to see all of them you need to look at the Properties of the web site and click on the Advanced button next to IP Address.

在這個窗口中可能有多個不同值存在,如果你需要查看這些值的信息,在站點屬性中點擊IP地址後面那個高級選項.

 

The different columns are used as follows:

不同的欄位值用於不同的目的:

         IP Address: This gives you the range of IP Addresses that are allowed to be used when connecting to Report Server. If set to All Unassigned then it is listening on any IP address.

e.g http://nnn.nnn.nnn.nnn/ReportServer or use the hostname for that IP Address.

 IP地址:這個地址範圍是用於允許連接報表服務器的有效地址.如果設置成未配置,那麼這個站點可以監聽任何IP地址.

: http://nnn.nnn.nnn.nnn/ReportServer或者是使用這個IP地址的主機名稱.

 

         Port: This is the Port number that the Web Site is listening on. By default HTTP listens on port 80 however; any value other than 80 needs to be specified in the URL string.

e.g http://server:880/ReportServer is using port number 880 instead of 80

 端口:這個端口是Web站點監聽的端口.默認的HTTP端口爲80.但是,設置任何一個非80的端口都必須顯式地在URL字符串中指定出來.

: http://server:880/ReportServer  是用880端口來代替80端口

 

         SSL Port: This column will only be populated if the web site is using the Secure Socket Layer. By default HTTPS listens on port 443 however; any value other than 443 needs to be specified in the URL string.

e.g https://server:555/ReportServer is using port number 555 instead of 443.

 SSL端口: 這一屬性只有在Web站點使用安全嵌套層時才使用到.默認的HTTPS端口爲443,但是,設置任何一個非443端口的都必須顯式的在URL字符串中指定出來.

: https://server:555/ReportServer 使用555端口來代替443端口.

 

         Host Header Value: Rather than connect to the web site using the server name, you might want to connect using a completely different name.  You see this all the time on the Internet with names such as www.microsoft.com. This DNS name will point to the server where the Report Server is running.

         e.g http://www.mydomain.com/ReportServer 

 主機表頭值: 相對於用服務器名稱連接web站點而言,你也許需要使用一個完全不同的名稱來連接你的web站點.你知道像www.microsoft.com網站一直都能訪問,這個DNS名稱將指向報表所在的服務器.

: http://www.mydomain.com/ReportServer

 

Reporting Services Databases

Reporting Services stores all its information in a SQL Server database and we need to ensure SQL Server is running with no problems, so check the SQL Server Errorlog and Event log on that server. As long as the installation was successful all the access for the SQL accounts will have been done however; you will see logon failures in the Reporting Services log files.

報表服務的數據庫

報表服務將所有的信息存放在一個SQL Server數據庫中.我們首先需要保證數據庫是正常運行的.爲此我們需要檢查服務器上SQL Server的錯誤日誌和事件日誌.即使是成功安裝並且SQL 賬戶能夠正常訪問,然而,你也可能在報表服務的日誌文件中看到登錄失敗的信息.

 

Local Connectivity Test to Report Server

We are ready to test we can connect but before we do that I want to quickly review the pieces of the Reporting Services puzzle. When you connect to Report Manager it will send SOAP requests to the Report Server Web Service to retrieve the information to display. So straight away we can see that if Report Server Web Service is not working, nor will Report Manager. The Reporting Services Windows Service does not play any part at this stage.Our first test needs to be done on the web server itself so logon to the web server where Reporting Services is installed and open Internet Explorer.

報表服務器本地連接測試

在我們開始測試之前,我想回顧一下報表服務的一些難點.當你連接報表管理器時,他將發送SOAP請求到報表服務器的Web服務以獲取相應的顯示信息.所以我們可以通過這種直接的方式查看報表服務器或者報表管理器是否正在運行.在這裏,報表服務的windows服務並沒有發揮作用.我們首先需要測試的是登錄到報表服務安裝的服務器上然後打開瀏覽器.

 

You now need to connect to the Report Server Web Service. The URL you use will depend on the information you discovered in the Connection URL section above so you may have to use HTTPS or add a port number.  Another point to bare in mind is that when you connect to a Web Service it has to read the WSDL file which basically means the first connection takes a little while so hang in there. As long as your keep your browser open the subsequent connections will be quick.

 現在連接到報表服務器的Web服務.你使用的URL依賴於你在上面連接URL小節所看到的信息.因此,你需要使用HTTPS或者是對應的端口.你應該清楚的一點是當你連接一個Web服務時,它將讀取它對應的WSDL文件,這個文件的讀取意味着第一次連接時需要花一點時間.保持當前瀏覽器爲開啓狀態將在使以後的訪問中更快捷.

Try the following connections

         Try connecting using localhost as the server name

         Try connecting using IP address 127.0.0.1

         Try connecting using the machine name

         Try connecting using the machines IP address

         Try connecting using the Fully Qualified Domain Name of the server

         Try connecting using a Host Header Name

 嘗試如下的一些連接:

      嘗試使用localhost做爲服務器名稱連接.

      嘗試使用IP地址 127.0.0.1連接.

      嘗試使用計算機名稱連接

      嘗試使用計算機的IP地址連接

      嘗試使用服務器的完全合格域名連接

      嘗試使用主機表頭值連接

 

Connection Fails

If any of the above tests fail you need to review the following. These are not all the same checks as above so please review them.

連接失敗

如果上述任何一個測試失敗,那麼需要檢查如下一些信息.這些和上面的檢查不一樣,所以請重新檢查.

 

         If localhost fails and 127.0.0.1 works it means the localhost entry needs to be added to the HOSTS file in C:/WINDOWS/System32/Drivers/etc

 如果 lolcahost連接失敗但是 127.0.0.1連接成功,這就意味着 localhost需要添加到C:/WINDOWS/System32/Drivers/etc HOSTS文件中

 

         Check if the C:/WINDOWS/System32/Drivers/etc/HOSTS file does not have incorrect entries

檢查C:/WINDOWS/System32/Drivers/etc/HOSTS 這個文件確保沒有不正確的信息.

 

         Using NSLOOKUP verify your DNS entries have the right IP Addresses for the server names and Host Header Values.

使用 NSLOOKUP 驗證你的DNS 能夠正確地解析服務器和主機表頭值的正確地址.

 

        Check the server has the correct domain name suffix added if you are not specifying it.

       如果你沒有指定域名後綴的話,檢查服務器是否使用了正確的域名後綴.

 

         Make sure that the URL you specify only hits one web site. For example one web site could be listening on localhost and port 80 and the other may be listening on any IP address and port 80. A quick way to check this is to Stop the other website and try again.

     確保你指定的URL只能連接到一個web站點,例如,一個web站點監聽localhost80端口,那麼其它的只能監聽到其它IP80端口.一個檢驗這個的快捷的方式是停止其它的web站點然後重試.

 

         Hopefully if the Application Pool has communicated with the Report Server there may be a Report Server log file to view since this file is only created when a connection is first established. If you installed using the default installation path which is a recommended thing to do because articles like mine make reference to them, your log files will be created in folder C:/Program Files/Microsoft SQL Server/MSSQL.1/Reporting Services/LogFiles. The file will be called ReportServer_<timestamp>.log and by default a new file is created every day at midnight and will be kept for 14 days.

希望當應用程序緩存池和報表服務交互時有相應的日誌文件可以查看,這個文件只有在一個連接第一次建立時創建.如果你使用的默認的安裝路徑的話,那建議你像我一樣把這些做個標記,日誌文件創建於C:/Program Files/Microsoft SQL Server/MSSQL.1/Reporting Services/LogFiles文件夾下,文件名稱應該是以ReportServer_<timestamp>.log命名,並且默認的新文件在0點創建,這些文件將保存14.

 

Take a look at this file and see if you can spot any errors. They are usually easy to spot because they always appear after a timestamp with the prefix of ERROR:

 看看這個文件看你能否找到任何錯誤信息.這些錯誤信息應該很容易被發現因爲他們通常是出現在一個帶ERROR前綴的時間幀後面.

 

         Another issue may be Security related and rather than repeat myself please refer to my previous blog on IIS Security which explains how Reporting Services is configured from an IIS perspective.

另外一個問題應該是和安全相關的.避免重複,請參考我前面一篇關於IIS安全的文章,那上面從IIS的角度解釋怎樣配置一個報表服務.

 

         If you are connecting using SSL then make sure you are not getting any Security Alert messages indicating there is an issue with a certificate. Any issues will need to be resolved with your local web team.

    如果你使用的是SSL連接,那麼確保你在連接的時候沒有關於證書的任何安全警示信息

Hopefully if you reach here then you have successfully connected to the Report Server. 如果是存在的話,那麼需要和服務器的管理員聯繫來一同解決這個問題

 

Remote Connectivity Test to Report Server

Unless the Local Connectivity test is successful the Remote Connectivity test will not succeed.

報表服務器的遠程連接測試

只有本地連接成功了,遠程連接纔可能成功.

 

So what we want to do now is perform a Remote Connectivity test on either your workstation or laptop or from another server. We can repeat all the tests except the localhost or 127.0.0.1 tests since these always refer to the machine where Internet Explorer is running.

 現在需要做的是從工作站或者筆記本或者其它服務器來遠程連接.我們將重複除了localhost 127.0.0.1之外的是所有連接,因爲這些涉及到該機器使用的瀏覽器.

Try the following connections

         Try connecting using the machine name

         Try connecting using the machines IP address

         Try connecting using the Fully Qualified Domain Name of the server

         Try connecting using a Host Header Name

 嘗試如下的一些連接:

      嘗試使用計算機名稱連接

      嘗試使用計算機的IP地址連接

      嘗試使用服務器的完全合格域名連接

      嘗試使用主機表頭值連接

 

Connection Fails

If any of the above tests fail you need to review the following:

連接失敗

如果上述任何連接失敗,那麼需要檢查如下一些細節:

 

 Check the C:/WINDOWS/System32/Drivers/etc/HOSTS file does not have incorrect entries

   檢查C:/WINDOWS/System32/Drivers/etc/HOSTS文件中是否存在不正確的信息.

 Using NSLOOKUP verify your DNS entries have the right IP Addresses for the server names and Host Header Values.

   使用 NSLOOKUP 驗證你的DNS 能夠正確地解析服務器和主機表頭值的正確地址.

 

 Check the server has the correct domain name suffix added if you are not specifying it.

如果你沒有指定域名後綴的話,檢查服務器是否使用了正確的域名後綴.

 

         Make sure that the URL you specify only hits one web site. For example one web site could be listening on localhost and port 80 and the other may be listening on any IP address and port 80. A quick way to check this is to Stop the other website and try again.

   確保你指定的URL只能連接到一個web站點,例如,一個web站點監聽localhost80端口,那麼其它的只能監聽到其它IP80端口.一個檢驗這個的快捷的方式是停止其它的web站點然後重試.

 

Hopefully if the Application Pool has communicated with the Report Server there may be a Report Server log file to view since this file is only created when a connection is first established. If you installed using the default installation path which is a recommended thing to do because articles like mine make reference to them, your log files will be created in folder C:/Program Files/Microsoft SQL Server/MSSQL.1/Reporting Services/LogFiles. The file will be called ReportServer_<timestamp>.log and by default a new file is created every day at midnight and will be kept for 14 days.

希望當應用程序緩存池和報表服務交互時有相應的日誌文件可以查看,這個文件只有在一個連接第一次建立時創建.如果你使用的默認的安裝路徑的話,那建議你像我一樣把這些做個標記,日誌文件創建於C:/Program Files/Microsoft SQL Server/MSSQL.1/Reporting Services/LogFiles文件夾下,文件名稱應該是以ReportServer_<timestamp>.log命名,並且默認的新文件在0點創建,這些文件將保存14.

 

Take a look at this file and see if you can spot any errors. They are usually easy to spot because they always appear after a timestamp with the prefix of ERROR:

 看看這個文件看你能否找到任何錯誤信息.這些錯誤信息應該很容易被發現因爲他們通常是出現在一個帶ERROR前綴的時間幀後面.

 

         Another issue may be Security related and rather than repeat myself please refer to my previous blog on IIS Security which explains how Reporting Services is configured from an IIS perspective.

     另外一個問題應該是和安全相關的.避免重複,請參考我前面一篇關於IIS安全的文章,那上面從IIS的角度解釋怎樣配置一個報表服務.

 

         We need to ensure there are no IP Address and Domain Name Restrictions. Using IIS Manager look at the properties of the Reporting Services web site and click on the Directory Security tab. Now click Edit next to the IP Address and Domain Name Restrictions. If there are any entries added then check to ensure your IP address is not one of them.

    確保沒有IP地址和域名限制.使用IIS管理器查看報表服務所在的web站點的屬性,點擊目錄安全性頁,然後點擊IP地址和域名限制後面的編輯按鈕,如果這個列表裏面有記錄,那麼檢查我們使用的IP地址是否包含在裏面.

 

Connectivity Tests to Report Manager

If Report Server is working it is now time to test Report Manager. Exactly the same tests are required and exactly the same connectivity failure checks can be performed. The Report Manager has its own log files in the same folder as the Report Server log files in the format ReportServerWebApp_<timestamp>.log

報表管理器的連接測試 

如果報表服務正常運行,那麼現在開始測試報表管理器.需要做相同的測試和連接失敗檢查.報表管理器擁有它自己的日誌文件,並且存放在和報表服務器日誌同一個文件夾下面,其格式爲ReportServerWebApp_<timestamp>.log

 

Before you being the tests you need to be aware of how Report Manager determines how to connect to Report Manager.

 在開始測試之前,需要注意報表管理器怎樣去連接報表管理器.

 

Within the Report Manager Virtual Directory is a file called RSWebApplication.config. Within this file is a section starting at <UI> are two parameters we are interested in:

         <ReportServerUrl>

         <ReportServerVirtualDirectory>

 在報表管理器的虛擬目錄下有一個叫RSWebApplication.config的文件,在這個文件中所需要關注的兩個在<UI>小節的參數是:

<ReportServerUrl>

         <ReportServerVirtualDirectory>

 

These two values are mutually exclusive which means we can only supply a parameter to one of them at any one time.

 這兩個參數是相互排斥的.這就意味着在同一時刻只能指定其中一個參數.

 

If the Report Server and Report Manager share the same website on the same machine then all you need to do is supply the Virtual Directory name to the <ReportServerVirtualDirectory> parameter and leave <ReportServerUrl> empty. 

E.G <ReportServerVirtualDirectory>ReportServer</ReportServerVirtualDirectory>

 如果報表服務器和報表管理器使用的是同一臺機器上的同一個web站點,那麼只需要在<ReportServerVirtualDirectory>下面指定虛擬目錄的名稱而讓<ReportServerUrl>保持空值.

例如: <ReportServerVirtualDirectory>ReportServer</ReportServerVirtualDirectory>

 

If the Report Server and Report Manager do not share the same website on the same machine then you need to supply a <ReportServerUrl> parameter and leave <ReportServerVirtualDirectory> empty. This would be the URL you use to successfully do a Remote connectivity test so it may include SSL or non default port numbers, etc. 

E.G <ReportServerUrl>http://WebServer.Mydomain.com/ReportServer</ReportServerUrl>

 如果 報表服務器和報表管理器使用的是同一臺機器上的不同web站點,那麼需要指定<ReportServerUrl>參數而讓<ReportServerVirtualDirectory>保持空值.這個值應該是你遠程連接成功的那個URL,所以,可能會包含SSL或者非默認的寬口等等.

 

A word of advice is to always specify a fully qualified domain name when not using Host Header Values. This will reduce the number of errors when doing non default installations.

 一個建議是使用完全合格域名而不是使用主機表頭值.這將在非默認安裝下降低錯誤的次數.

 

Report Manager is an ASP.NET application which needs access to the Report Server Virtual Directories and follows the same security issues as any regular user.  Refer to my previous blog on IIS Security for more information.

 報表管理器是一個ASP.NET應用程序,所以它和其它用戶一樣需要訪問報表服務器的虛擬目錄並且遵循相應的安全規則.請參看我前面關於IIS安全的文章.

 

So this brings me to the end of this article so look out for more. I have quiet a few planned on SSL, Double Hop Authentication, Encryption, to name a few. Also any feedback or emails are welcome.

到此結束,我還有一些關於SSL,雙躍認證,加密等的寫作計劃,只是列舉了一些.歡迎來信或者發表評論!

Posted 02 July 2007 19:24 by stevechowles | 6 comment(s)

發佈了11 篇原創文章 · 獲贊 4 · 訪問量 5萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章