2010年2月8日 星期一

Windows 2k3 crash auto memorydump setting-2

Server Hang or Server Crash

以下為Debug 此類問題的處理方式, 其中包含 Server Hang or Server Crash Debug 設定步驟及判讀方法,請參考. 謝謝

 問題發生前的設定: 

 

1.設定系統失敗.不要自動重新開機
[我的電腦]右鍵 [內容] 請在系統內容視窗下 ,點選 [進階]\[啟動及修復]\[設定]
 
取消 "系統失敗" "自動重新啟動"

2.設定Force Memory  Dump

A.如何選取記憶體傾印選項
可以產生的記憶體傾印選項有三種類型。在手動觸發傾印之前,請先選擇一個適當的
類型。

 1. 用滑鼠右鍵按一下 [我的電腦],再按一下 [內容]
2.
按一下 [進階] 索引標籤,然後按  [啟動及修復] 的按鈕。
3.
按一下 [撰寫偵錯資訊],然後按一下以選取 [完整的記憶體傾印]

PS:Memory.dmp 檔案會儲存再%SystemRoot%\MEMORY.DMP

 

B.設定Force dump 機碼值

警告  不當使用「登錄編輯程式」可能會導致嚴重的問題,甚至必須重新安裝作業系統。Microsoft  並不保證可以解決您不當使用「登錄編輯程式」所導致的問題。請自行承擔使用「登錄編輯程式」的一切風險。
此功能預設為停用。  如果要啟用這個功能,您必須依照下列指示編輯登錄,然後重新啟動電腦。重新啟動電腦之後,按住右邊的 CTRL 鍵,然後按兩次 SCROLL LOCK鍵,就會產生  Memory.dmp 檔案。

 

注意 請務必使用空格鍵右邊的 CTRL  鍵。

 

請注意,下列步驟不適用於 Legacy Free 電腦 (例如使用 USB 鍵盤的電腦)。此機碼組合必須由  i8042prt.sys (標準 101/102-Key 鍵盤或 Microsoft Natural PS/2
盤的驅動程式加以接收及處理,電腦才會停止回應。同樣地,這也不適用於Virtual PC 工作階段,因為 VM Additions 會以 Vpc_8042.sys (VM  Additions PC/AT Enhanced PS/2 鍵盤 [101/102-Key] 的驅動程式) 取代這個驅動程式。在這些電腦中,您必須加上偵錯工具:

 

1. 開啟「登錄編輯程式」(Regedt32.exe)
2. 
在登錄中找出下列機碼:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters
3.
[編輯] 功能表上,按一下  [新增值],然後新增下列登錄值:
數值名稱:CrashOnCtrlScroll
資料類型:REG_DWORD
值:1
4. 
結束「登錄編輯程式」。

注意 您必須重新啟動電腦,才能使這些變更生效。
參考資訊:

244139 Windows feature allows a Memory.dmp file to be  generated with the
http://support.microsoft.com/?id=244139

         請注意,下列步驟適用於windows 2003 SP2, 且使用 USB 鍵盤的電腦。

        1. 開啟「登錄編輯程式」(Regedt32.exe)
        2. 
在登錄中找出下列機碼:
       
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\kbdhid\Parameters
        3.
[編輯] 功能表上,按一下  [新增值],然後新增下列登錄值:
       
數值名稱:CrashOnCtrlScroll
       
資料類型:REG_DWORD
       
值:1
        4. 
結束「登錄編輯程式」。

        注意 您必須重新啟動電腦,才能使這些變更生效。

   
PS:
在此提供此機碼設定的 reg 檔案..請將附件 2k3crashsetting.txt 儲存.並修改附檔名為 .reg .雙擊匯入此機碼即可.
 

 3.請您此問題server 收集mpsrpt tool log   

請收集 MPSRPT Tools log 
        MPS Report工具(Setup Prefrence)
        http://download.microsoft.com/download/b/b/1/bb139fcb-4aac-4fe5-a579-30b0bd915706/MPSRPT_SETUPPerf.EXE

     執行方法: 
        a.
下載後,執行此程式,此時它會蒐集目前您系統的訊息,需要一段時間(如果有詢問您是否要建立或收及檔案,請按"y"再按"Enter") 
        b.
執行完畢後,會在C:\Windows\MPSReports\Setup\Reports\Cab產生出一個名稱為[ComputerName(此為您的電腦名稱)]_MPSReports.CAB」的檔案。 
        c.
將此檔寄回以供我們分析。

問題發生時:

1.研判系統狀態.
  A. 請從 client  ping 一下此 Server or telnet 相關服務的 port 看是否有反應
  B.
嘗試使用 \\computername 方式存取. 看是否可以正確存取此伺服器的分享

  C.請您到Server 前面.檢查伺服器畫面.
     a.
如果畫面為 藍底白字(BlueScreen) 且上面顯示 Stop Code 0x.......等等狀況.亦表示為 Server Crash,請參考 Server Crash 處理步驟
     b.
如果顯示螢幕變黑.或是畫面停滯不動.且滑鼠鍵盤沒反應.此亦表示為 Server Hang.參考 Server Hang 處理步驟

2. Server Hang 處理步驟
   A. 您請按住右邊的 CTRL 鍵,然後按兩次 SCROLL LOCK,系統就會產生 BlueScreen 並進行 Dump 產生.請等待畫面 Dump 產生的計數到 100% 完成後.在進行重新開機.
  
B.重新開機登入系統後.請檢查 C:\winnt\  是否存在memory.dmp 檔案,請先壓縮再提供此檔案分析
   C.請收集 MPSRPT Tools log 
        MPS Report工具(Setup Prefrence)
        http://download.microsoft.com/download/b/b/1/bb139fcb-4aac-4fe5-a579-30b0bd915706/MPSRPT_SETUPPerf.EXE

3.Server Crash 處理步驟
    A.產生Blue Screen .請等待記億體傾印完成,計數完成後.亦可以重新開機
    B.重新開機登入系統後.請檢查 C:\winnt\  是否存在memory.dmp 檔案,請先壓縮再提供此檔案分析
    C.請收集 MPSRPT Tools log 
    MPS Report工具(Setup Prefrence)
    http://download.microsoft.com/download/b/b/1/bb139fcb-4aac-4fe5-a579-30b0bd915706/MPSRPT_SETUPPerf.EXE

Windows 2k3 crash auto memorydump setting (regedit)

Windows Registry Editor Version 5.00

 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl]

"AutoReboot"=dword:00000000

"CrashDumpEnabled"=dword:00000001

"Overwrite"=dword:00000001

 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters]

"CrashOnCtrlScroll"=dword:00000001

 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\kbdhid\Parameters]

"CrashOnCtrlScroll"=dword:00000001

 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CrashControl]

"NMICrashDump"=dword:00000001

windows 效能監視器設定步驟

以下為效能監視器設定步驟: PS :thread 可以看到每一個thread 使用狀況.但可能會讓log 變很大.請小心注意disk 空間.盡可能不要將perfmon log 放在C Drive

Perfmon

1.    Collect performance log from the server by the following steps:

1.   Launch Windows Performance tool perfmon.exe.

2.   On the left panel, expand the Performance Logs and Alerts item.

3.   Right click Counter logs on the left panel and choose New log Settings.

4.   Specify a log name and click OK.

5.   Click Add.

6.   In the Performance object list, choose one objects, and make sure that All counters and All instances are selected, then click Add. Repeat to add the all the following performance objects, then click Close to return.

Cache
Memory
Network Interface
Paging File
PhysicalDisk
Process
Processor
Server
Server Work Queues
System
Thread 

7.   In the Sample data every section, set Interval to 10 and set Units to Sec.

8.   On the Log Files tab, please set the Location and File name of the log file.

9.   On the "Schedule" tab, set "Start log" to "At"  "00:00:00" of the next day, set "Stop log" to "After 1 days", then check "Start a new log file".

10.    Click OK to return. The performance log will automatically start at midnight and create a new log file every day.

11.    Please keep collecting the information until the problem happens again. And then you can transfer the log back to me for analysis. 

 

2009年12月5日 星期六

Exchange 2007 啟動 outlook anywhere

Server side

 

1.要求憑證 (exchange command line)

New-ExchangeCertificate -GenerateRequest -subjectname "dc=tw,dc=com,dc=mmik,o=Mmik Solutions,cn=mail.mmik.com.tw" -domainname "mail.mmik.com.tw" -PrivateKeyExportable $true -path c:\a.txt

 

2.取得cert檔案

c:\a.txt的內容貼到CA server的網頁去要求憑證 http://127.0.0.1/certsrv

 

3.import cert

Import-ExchangeCertificate -Path c:\certificates\filename.cer -friendlyname "Contoso CAS01"

 

4.check 是否成功

get-exchangecertificate | fl

SBS debug01- application log always show sharepoint error message

 

http://msmvps.com/blogs/cgross/archive/2009/03/29/sharepoint-search-amp-event-id-2436-errors-in-sbs-2008.aspx

*UPDATE:  Still not why the steps below work on some boxes but not others.  However, the SBS team just blogged about the implications of the Loopback Check registry key as well as the ability to register your public URL on your SBS box so that it bypasses the loopback check without having to completely disable the loopback check.  I still recommend reconfiguring SharePoint Search as noted below in addition to registering your public URL to bypass the Loopback Check.

*UPDATE:  We have confirmed that the steps below work on some SBS 2008 boxes, but not all installs.  If these steps do not work, see Dan's entry in the Comment section about disabling the LoopBackCheck in the registry.  Despite what you may see in other forums, SharePoint search will work just fine with https://remote.company.com being the Default security zone for your companyweb - you do not need to edit your alternate access mappings.  Additionally, the SPContent account only needs to be a member of the domain users security group, and the SPSearch account only needs to be a member of the domain users and WSS_WPG security groups.  SharePoint Central Administration will add the SPSearch user account to the WSS_WPG security group when search is configured per the steps below.

*Updated on 2009-03-29 at 9:45am CDT (GMT -5).  Original post missed the steps of stopping the Search service before reconfiguring.

With Small Business Server 2008, SBS customers finally get Windows SharePoint Services 3.0 built-in to replace the SharePoint 2.0 companyweb included with SBS 2003.  However, when you get your SBS 2008 box all set up and running, you may notice a few quirks when it comes to SharePoint search.  Specifically,you are seeing 2436 errors in your Application event log:

Log Name:      Application
Source:        Windows SharePoint Services 3 Search
Date:          3/29/2009 4:20:05 PM
Event ID:      2436
Task Category: Gatherer
Level:         Warning
Keywords:      Classic
User:          N/A
Computer:      server.company.local
Description:
The start address <sts3s://remote.company.com:987/contentdbid={d4078aab-
ce82-4581-8d4f-973e1e6eac23}> cannot be crawled.

Context: Application 'Search index file on the search server', Catalog
'Search'

Details:
    Access is denied. Check that the Default Content Access Account
has access to this content, or add a crawl rule to crawl this content.  
(0x80041205)
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Windows SharePoint Services 3 Search" />
    <EventID Qualifiers="32768">2436</EventID>
    <Level>3</Level>
    <Task>3</Task>
    <Keywords>0x80000000000000</Keywords>
    <Channel>Application</Channel>
    <Computer>server.company.local</Computer>
    <Security />
  </System>
  <EventData>
    <Data>

Context: Application 'Search index file on the search server', Catalog
'Search'

Details:
    Access is denied. Check that the Default Content Access Account
has access to this content, or add a crawl rule to crawl this content.  
(0x80041205)</Data>
    <Data>sts3s://remote.company.com:987/contentdbid={d4078aab-ce82-4581-
8d4f-973e1e6eac23}</Data>
  </EventData>
</Event>

The issue here is that Windows SharePoint Services Search uses two separate accounts – one user account runs the search service, and the other user account is used to actually access the SharePoint content in order to index it.  When configuring SharePoint Search, SharePoint Central Administration explicitly states that these accounts cannot be built-in accounts (such as LOCAL SYSTEM or NETWORK SERVICE).  By default, SBS 2008 is using built-in windows accounts, which is resulting in this error being generated.

Luckily, this is easy to fix.  The first thing we need to do is to create two new user accounts for SharePoint search to use.  Personally, I do not create these accounts using the SBS add user wizard, because they will effectively be service accounts, so they do not need mailboxes, and we don’t need to see these accounts included in the User account list on the SBS console. 

1.     On your SBS, open Active Directory Users & Computers (Start –> Administrative Tools –> Active Directory Users & Computers.

2.     Within ADU&C, navigate to the Organizational Unit where you want to create the new user accounts.  (Personally, I create a new “Service Accounts” OU under <domain> –> My Business –> Users)

3.     Right-click on the OU and select New –> User

4.     On the first page of the new user window, enter the following info:

o    First Name:   SPSearch

o    Last Name:  <leave blank>

o    Username:   spsearch

5.     Click Next.

6.     Enter a strong password for the new account. 

7.     Uncheck the option “User must change password at next login”

8.     Check the option “User cannot change password”

9.     Check the option “Password never expires”

10.   Click Next

11.   Click Finish.

12.   Repeat steps 3-11, using “SPContent” instead of “SPSearch” in step 4

We do not have to worry about granting any access or permissions to the two new accounts we created.  After the accounts have been created, close Active Directory Users & Computers, then open SharePoint Central Administration  (Start –> Administrative Tools –> SharePoint 3.0 Central Administration). 

1.     When SharePoint 3.0 Central Administration opens, go to the Operations tab.

2.     Click on the “Services on Server” link

3.     In the Action column, click the link to Stop the “Windows SharePoint Services Search” service.

o    You will receive a warning that stopping the search service will remove existing indices.  Click OK to acknowledge the warning.

4.     When you return to the SharePoint Central Administration Operations tab, the Windows SharePoint Search Service will show as stopped.  Click the link to Start the Windows SharePoint Services Search service.  This will open the Search service configuration page.

5.     In the Service Account section, select the “Configurable” option

1.  For a username, enter <DOMAIN>\SPSearch  (where <DOMAIN> is your AD domain).

2.  For a password, enter the strong password you assigned to the SPSearch account.

1.     In the Content Access Account section, select the “Configurable” option

1.  For a username, enter <DOMAIN>\SPContent  (where <DOMAIN> is your AD domain)

2.  For a password, enter the strong password you assigned to the SPContent account.

2.     In the Search Database section, change the database name by appending and underscore 1 (“_1”) to the database name. 

o    By default, the database name should be WSS_Search_[SERVERNAME], so we’re changing it to  WSS_Search_[SERVERNAME]_1.

o    Changing the name is necessary because the default database name already exists with search data.  If we attempted to use the default database name, SharePoint would throw an error that the database contains user-defined schema and cannot be used.  By changing the search database name on this configuration page, SharePoint Central Administration will create a new database using this name and configure search to use this new database.  Since the new database is empty, we won’t encounter any errors.

1.     Accept the remaining defaults and click the OK button.

After clicking OK, the settings should be applied and you should return to the “Services on Server” page in SharePoint Central Administration, and the Windows SharePoint Services Search” service should be listed as started.

Close SharePoint Central Administration and open the Services MMC (Start –> Administrative Tools –> Services).  Restart the Windows SharePoint Services Search service.  Verify that the Windows SharePoint Services Search service is configured to login with the SPSearch account you created.

Voila!  Moving forward, you should not experience the 2436 error event in your Application Log.

 

2009年11月12日 星期四

remote desktop can not connect

1.terminal configuration\connections\rdp-tcp check service start

 

2.check regedit

hkey_local_machine\system\currentcontrolset\control\terminal server\wds\rdpwd\tds\tcp\portnumber=3389

hkey_local_machine\system\currentcontrolset\control\terminal server\winstation\rdp-tcp\portnumber=3389

hkey_local_machine\system\currentcontrolset\control\terminal server\fdenytsconnection=0

hkey_local_machine\software\policies\microsoft\windowsnt\terminal services\fdenyconnextion=0

 

3.terminal 自己

 

4.如果都不行,就要找微軟了

mts report

netstat -ano

error message screen shot

2009年9月7日 星期一

IIS 竟然占據所有的port不給人家用

IIS7 post #44 - IIS7 and Apache on the same machine.

There was a question on http://forums.iis.net about having Apache and IIS7 on the same box.  here are the instructions I tested on Vista RTM and Windows Server 2008 B3.  This assumes you have two ip addresses on the box, 192.168.0.90 and 192.168.0.91.  It can be any ip's.

1) Added or make sure your machine has two ip's
2) Open a command prompt
3) Type netsh
4) Type http
5) Type sho iplisten.  It should be blank
6) Type add iplisten ipaddress=192.168.0.90
You should get IP address successfully added
7) Type sho iplisten again
It should sho 192.168.0.90 in the list
8) Type exit to get out of netsh
9) Type type netstat -an.  See if you notice 192.168.0.90:80 in the list.  If you see 0.0.0.0:80, do an iisreset

10) Download and install Apache ( I did it with 2.2.4)
http://mirror.nyi.net/apache/httpd/binaries/win32/apache_2.2.4-win32-x86-no_ssl.msi
11) Do a default install,
12) Open httpd.conf and adjust the ip listen to 192.168.0.91:80