2017年12月14日 星期四

2017年11月26日 星期日

2017/11/26 2017為台灣教育而跑 從育苗成竹起跑 路跑

本來擔心天氣會很冷,還好當天不會冷、涼涼的,跑起來很舒服。
主辦單位:新竹市觀行菩薩學會
協辦單位:社團法人中華正行佛教協會
集合地點:新竹市南寮漁港


2017年11月22日 星期三

Backup Exec 2012 agent for VMware with GRT restore

Reference:
Using Granular Recovery Technology (GRT) with the Agent for VMware

BE2012 使用 Agent for VMware 期望可以縮短備份時間。
BE2012 支援 GRT (Granular Recovery Technology) 精細還原。
使用限制:

  • 備份來源只支援 Windows (據有 VSS 功能)
  • 備份來源必須安裝 agent for Windows (agent for MSSQL, agent for Exchange)
  • 備份來源必須安裝 VMware tools
  • 只支援 MBR partition,不支援 GPT partition
如果配置上都沒有問題, 請參閱下列link內容與方式進行無法 GRT 的 work around
(用 agent for Windows 的方式對備份來源的其中任一個檔案做備份,完成後即可在 agent for Windows 那裡看到 agent for VMware 備份完成的詳細內容)

2017年11月20日 星期一

2017/11/19 機車發不動

中午要去買午餐,機車發不動,按啟動完全沒反應。
推去機車行,老闆用電表量,說電瓶電不夠 (車燈會亮,但發不動)
更換電瓶後就恢復正常了。(電瓶 NTD 900)

2017年11月18日 星期六

2017寶二慈善環保馬拉松 路跑

今年比較早辦 (2017/11/18),天氣還很溫暖,去年 2016/12/17 舉辦就很冷。
起跑時天氣還不錯,大概到 8K 左右開始下雨,雨勢還滿大的。
去年的成績是 1:38:34,今年的成績 1:12:30,有進步很開心。
還記得去年跑完覺得快掛了,這次跑完覺得還好,哈哈哈。


2017年11月13日 星期一

2017/11/12 第二屆新竹湖口老街半程馬拉松 路跑

原本看手機的氣象預報可能會下雨,當天的天氣不錯,涼涼的、沒大太陽。


2017年11月2日 星期四

Windows 7 藍底白字當機

有一台組裝電腦一直無預期出現藍底白字當機。反覆交叉測試才找出是CPU的問題。工作這麼久第一次遇到這種狀況。

Error message:
IRQL_NOT_LESS_OR_EQUAL
PAGE_FAULT_IN_NONPAGED_AREA



2017年10月17日 星期二

Hyper Heroes 路跑鞋 試跑

參加路跑送的鞋子。
鞋子很輕、鞋墊夠軟、鞋面透氣,跑完 5K 腳趾頭不會有疼痛的感覺。
讚啦!


2017年10月14日 星期六

2017元培醫大校園路跑

今天參加 2017元培醫大校園路跑。我是為了那雙送的運動鞋去參加的 ^___^

人好多,很多人用走的,一開始擠成一團跑不動,後來才漸漸拉開距離。

騎車去的路上有下雨,起跑前雨停了,結束後騎車回家路上又下雨。
用 Google 地圖規劃路程大約 30 分鐘,但是我在一個路口弄錯,結果整個迷航,花了快一小時才到。這是常聽到的 "一步錯、步步錯" 嗎?


2017年10月12日 星期四

2017年10月11日 星期三

2017/10/8 民雄肉包

回家路過民雄,順路買民雄肉包。剛好中午時間,人超多的。
一個23元,好吃。


2017年10月3日 星期二

OpenVPN for Windows

安裝檔

設定教學

問題排除
‧無法取得 IP (server: 10.8.0.1, client: 10.8.0.6),解法為將 TAP-Windows Adaptor disable/enable

2017年9月10日 星期日

2017 義起愛運動勇士路跑

真的 22K。這次幾乎沒有停下來用走的。總共花了 3:03 超弱的。
10K 後感覺肚子怪怪的,最後 2K 最難受。



2017年8月23日 星期三

VBA Check for folder; create if it does not exist

Reference:
Check for folder; create if it does not exist

Sub TestForDir()
    Dim strDir As String
    strDir = "C:\My Documents\TestDir\"
   
    If Dir(strDir, vbDirectory) = "" Then
        MkDir strDir
    Else
        MsgBox "Directory exists."
    End If
End Sub

2017/08/22 理髮

到交大理髮。

2017年8月14日 星期一

2017/8/6 運動筆記線上跑 x 關帝廟街夏季公益路跑

看到 運動筆記線上跑 x 關帝廟街夏季公益路跑 的 紀念商品加價購:關帝廟完賽關刀,覺得很有趣就報名了。

這個線上跑只支援 JoiiSports APP 或是用 Garmin 手表記錄,只好帶著手機跑部記錄。




2017/08/13 路跑 運動筆記團練-竹北彩虹橋

運動筆記辦的免費活動。[新竹] 8/13 竹北的彩虹

天氣剛好,不會很熱。免費路跑還有補給,太感動了。


2017年8月11日 星期五

GoLife GPS 運動手錶

帶手機跑步有點不便,買了 GOLiFE GoWatch 820i GPS藍牙中文三鐵運動腕錶

重量 72g,大概半支手機的重量。戴在手上還是有點重......
看在它不到兩千元的份上,CP 值算高的。

用藍芽和手機的 GoLife APP 同步跑步記錄,可以顯示 GPS 地圖軌跡。
我是繞關新公園跑十圈,從圖上看起來 GPS 定位有飄移的狀況。
看來是我把 GPS 想像得太美好了, GPS 定位沒那麼準的。


CentOS 6 mail

Reference:
How To Send E-Mail Alerts on a CentOS VPS for System Monitoring
如何刪除 Postfix 中所有還沒發送的郵件
於 Bash shell echo 輸入換行字元的寫法

設定寄信 mail server

  • vi /etc/mail.rc
  • set smtp=smtp://smtp.example.com:25
刪除 mail Queue 中的郵件
  • mailq  (查詢 mail queue)
  • postsuper -d ALL (刪除 mail queue 所有郵件)
  • postsuper -d queue_id (刪除 mail queue 特定一封郵件)
echo 輸入換行字元
  • echo -e "\n"



2017年7月27日 星期四

Wordpress 好用的 Plugin

TinyMCE Advanced: 增加編輯器功能

Polylang: Multi Language 多語言網頁

Max Mega Menu: Menu 功能調整

Huge IT Slider: 圖片輪流播放

UpdraftPlus: 網站備份

WordPress 備份基本概念

Lockdown WP Admin: 隱藏登入網址

2017年7月23日 星期日

2017年7月14日 星期五

Sophos 防毒軟體重裝

狀況:
重裝 Sophos 防毒軟體,但裝好後開啟主控台卻無法操作。

解法:
Microsoft Fixit 工具移除 Sophos anti-virus 相關軟體,重開機再次安裝就正常了。


2017年7月6日 星期四

outlook 2007 block xlsx as unsafe attachment

Reference:
Unblock Attachments
Attachments are blocked after applying June 2017 update
Description of the security update for Outlook 2007: June 13, 2017

2017/6/13 的 Office Security Update 造成 Outlook 收到 .xlsx,會顯示 blocked access to the following potentially unsafe attachments。

暫時解法:
執行 regedit 新增 HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Security\AllowUnregisteredMapiServices,格式為 DWARD,值為 1。

只能等 Microsoft 的修正檔了。

2017年7月1日 星期六

IBM TS3100 Tape library error message (磁帶櫃錯誤訊息)

錯誤訊息:
Mechanical Block 8D 0B


用 I/O station 還可以把磁帶退出,所以機器手臂應該沒壞。
嘗試把磁帶櫃斷電十分鐘再開機,橘燈還在。

在磁帶櫃面板上選擇 “run system test”,出現錯誤為 Inv. cartridge,看起來像是磁帶機的問題。

從磁帶櫃後方把磁帶機拆出來,發現裡面卡了一張磁帶標籤紙!原來兇手就是你!
可能是從 I/O station 放新磁帶時不小心一起夾進去的。



移除異物後,磁帶櫃斷電十分鐘再開機,在磁帶櫃面板上選擇 “run system test”,做完後橘燈就消失了。

2017年6月26日 星期一

CentOS management via webmin

Reference:
CentOS Webmin網管最佳工具

Webmin官方網站:http://www.webmin.com/ 下載 rpm
執行 rpm -ivh webmin-1.xxx.noarch.rpm
service start httpd

用網頁連 https://youe-host:10000

PS. webmin 需要 httpd, perl

2017年6月15日 星期四

Solaris x86 安裝

ISO檔可以在Oracle網站下載,線上申請帳號就可以了。
建議抓Solaris 10,因為11改版和之前的很不像。
http://www.oracle.com/technetwork/server-storage/solaris10/downloads/index.html

安裝步驟參考,安裝過程可以選擇NIS。
http://solaris.tophk.net/basicsetting/quick_install_solaris10/

Configuring Telnet / FTP to login as root (Solaris)

我裝在VM上,看起來還行。

2017年6月13日 星期二

2017年6月8日 星期四

痛風紀錄 2017/6/7

上次發作是 2013/9/30,已經將近四年了。
本來以為我已經擺脫這傢伙,沒想到他又來了。

最近這一星期三餐飯後都吃 若元錠,難道兇手是它?

2017/6/7 (三) 下午左腳掌的前掌踩起來怪怪的,先吃一顆秋水仙素。晚上睡前再吃一顆。
2017/6/8 (四) 早午晚各一顆。這天腳最痛,走路一拐一拐的。
2017/6/9 ~ 11 早午晚各一顆。沒那麼痛了,走路不會拐,但踩下去還是有一點痛的感覺。
2017/6/12 (一) 只剩一點點感覺,就停藥了。

2017年4月22日 星期六

2017戀戀桐花路跑賽

剛好是下雨天,跑起來不熱。
這次慢慢跑,腳沒狀況反而手臂覺得有點酸。
號稱23K,其實只有21.7K。


2017年4月9日 星期日

2017海風馬拉松

學弟無法參加我代跑,21K 限時 3 小時,多了 3 分鐘被關門,好可惜。
跑到 14K 後左邊寬關節開始痛,最後 4K 幾乎用走的。
第一個 21K,跑到後來感覺快升天了。

2017年3月25日 星期六

Perl Net::SMTP::TLS attach file

Reference;
http://www.perlmonks.org/?node_id=784574

用 $smtp->datasend 傳附檔內容時,因為 gmail 接收資料有長度限制,如果一次傳送大量資料會出錯。變通辦法是用 split 將資料分段送出。


use Net::SMTP::TLS;
use MIME::Lite;

$gmail_from = 'account@gmail.com';
@gmail_bcc_png = ('bcc@gmail.com');
$mail_subject = "<mail_subjuct>";

$msg = MIME::Lite->new(
From       => $gmail_from,
    To         => $gmail_from,
    Subject    => $mail_subject,
Type     =>'multipart/mixed',
);
$msg->attach(
Type => 'image/png',
Path => '<file full path>',
Filename => 'report1.png',
Disposition => 'attachment'
);

$smtp = new Net::SMTP::TLS(
'smtp.gmail.com',
Port    => 587,
User    => '<account@gmail.com>',
Password=> '<password>',
Timeout => 30
);

$smtp->mail($gmail_from);

$smtp->bcc(@gmail_bcc_png);

$smtp->data();
  @tmp = split(/\n/, $msg->as_string);
foreach $line (@tmp) {
$line = $line . "\n";
$smtp->datasend( $line );
}
$smtp->dataend();

$smtp->quit;

2017年3月15日 星期三

webpage or html file transfer to image

Reference:
http://phantomjs.org/screen-capture.html

下載 PhantomJS 解壓縮,把 phantomjs.exe 加到 PATH。

把網頁轉成圖片:
1. 編輯 web_2_png.js,內容如下
var page = require('webpage').create();
page.open('http://github.com/', function() {
  page.render('github.png');
  phantom.exit();
});
2. 執行 phantomjs web_2_png.js 即可產生圖片


把 html 檔案轉成圖片:
1. 編輯 html_2_png.js,內容如下
var page = require('webpage').create();
page.open('file:///c:/tmp/myfile.htm', function() {
  page.render('myfile.png');
  phantom.exit();
});
2. 執行 phantomjs html_2_png.js 即可產生圖片

2017年3月13日 星期一

跑步記錄 2017/3/12

為 4/22 桐花路跑 23K 準備。下星期再把距離加長一點。
這次跑完膝蓋不酸、小腿不酸、大腿不酸,反而是大腿和骨盆間的關節在酸。


2017年3月11日 星期六

3com switch 4226T 異常事件記錄

狀況:
新設備設定好 IP address 後接到 3com 4226T,從別台電腦 ping 這個設備,只收到兩個 reply 然後就一直 timeout。

Try 1: 猜測是不是 IP address 衝突。把設備網路線拔掉,ping 完全沒有回應。
Try 2: router 清除 arp。狀況一樣。
Try 3: 查詢 3com 4226T MAC address table。設備接在 port 7,查詢結果居然顯示接在 port 17!見鬼了~~~~

暫時解法:
將設備的 MAC address 手動加到 port 7,用 ping 測試就正常了。

因為其他的接在這一台 3com 4226T 的網路運作都正常,找時間將這台 3com 4226T 重新開機試試看。

2017年3月4日 星期六

2017/3/4 第二屆苗栗超級馬拉松

10K 中途折返時,看到許多 21K 的還在我後面 ^___^
下星期自己試跑 21K,如果可以 3.5 小時內回來,下次就可以報名 21K了。


2017年3月2日 星期四

連線到印表機 生效的原則 無法連接 列印佇列

新增網路印表機時出線的錯誤訊息:
連線到印表機
由於您電腦的一個生效的原則,所以您無法連接到這個列印佇列,請連絡您的系統管理員。


解法為自行安裝驅動程式。
步驟:
1. 準備印表機的驅動程式。
2. 安裝本地印表機,連接埠選 TCPIP,輸入印表機 IP address。
3. 驅動程式選擇由磁片安裝,並瀏覽到放區棟程式的目錄。
4. 安裝驅動程式後,不共享印表機
5. 再次新增網路印表機,安裝完成後可將本地印表機移除

參考:
您電腦上一個生效原則阻止你連線到這個列印佇列,請聯絡您的系統管理員

2017年3月1日 星期三

Exchange 2010 move mailbox

How to Move Mailboxes in Exchange Server 2010


Exchange 2010 SP2 搬移 mailbox 後無法刪除原信箱,retry 次數過多造成很久才結束。
修改 C:\Program Files\Microsoft\Exchange Server\V14\Bin\MSExchangeMailboxReplication.exe.config
將 MaxCleanupRetries = "5" 改為 "1"

Reference:
MAPIEXCEPTIONUNEXPECTEDMAILBOXSTATE: UNABLE TO DELETE MAILBOX


升級到 SP3 可以解此問題。尚未升級前可以用指令刪除沒用到的信箱。
1.) Run the command to find the specific mailboxes that were impacted by this bug.

Get-MailboxStatistics -Database <MAILBOXDATABASE> | Where { $_.DisconnectReason -eq “SoftDeleted” } | fl LegacyDN, DisplayName, MailboxGUID,DisconnectReason

 2.) Run this command to remove those disconnected mailboxes cleanly.

Remove-StoreMailbox –Database <MAILBOXDATABASE> –Identity <MAILBOXGUID> –MailboxState Softdeleted

Reference:
Error with moving mailbox in Exchange 2010 SP2 RU3+

Exchange 2010 mail database create and mount fail

Reference:
Failed to create and mount database exchange 2010

Error message:
Couldn't mount the database that you specified. Specified database: <MailDB>; Error code: An Active Manager operation failed. Error The database action failed. Error: Operation failed with message: MapiExceptionNotFound: Unable to mount database. (hr=0x8004010f, ec=-2147221233)
. [Database: <MailDB>, Server: <MAIL server>].

SOLUTION:
Microsoft notes that the issue is related to having conflicting Domain Controller and Global Catalogue Server entries.  So do the following:
1.  Open EMC and right-click on “Organization Configuration”.  Choose “Modify Configuration Domain Controller”.
2.  Specify the domain and the DC.
3.  Open EMC and right-click on “Recipient Configuration”.  Choose “Modify Recipient Scope”.
4.  Specify the global catalog server.  Make sure it is the same as the chosen DC.

上面步驟做完後,再試一次錯誤變成
Couldn't mount the database that you specified. Specified database: <MailDB>; Error code: An Active Manager operation failed. Error Couldn't find the specified mailbox database with GUID 'b8974f86-80d6-4cfc-ae68-6b5fa110xxxx'.. [Database: <MailDB>, Server: <MAIL server>].

再次 mount MailDB 卻成功了!

2017年2月28日 星期二

IBM TS3100 Tape library error message (磁帶櫃錯誤訊息)

錯誤訊息:
Robotic Failure 94 61
Mechanical Block 8A 61

用 I/O station 還可以把磁帶退出,所以機器手臂應該沒壞。
嘗試把磁帶櫃斷電十分鐘在開機,橘燈還在。
在磁帶櫃面板上選擇 “run system test”,做完後橘燈就消失了。



2017大桔大利峨眉鄉柑橘路跑

有人為了那箱橘子和獎牌,我只好陪跑。
氣溫只有15度,冷冷冷~~~

2017年1月15日 星期日

VMware 升級到 ESXi 5.5 後 guest OS 無法啟動的解法

狀況:
ESXi 5.1 升級到 5.5,guest OS 無法啟動

錯誤訊息:
Host 'x.x.x.x' is not compatible with the vSphere Replication configuration supported by the virtual machine : the configured RPO is lower than what the host can support.

解法:
  • Shut down the virtual machine.
  • ssh to the host where the Virtual machine is located (look at the vm summary tab in the general section)
  • Locate the virtual machine's files in the datastore.
  • Backup the virtual machine's configuration file (.vmx) If your edits break the virtual machine, you can roll back to the original version of the file.
  • Edit the virtual machine's configuration file (.vmx) to comment out the following lines; prefixing them with a '#' character.
hbr_filter.configGen = ""
hbr_filter.rpo = ""
hbr_filter.destination = ""
hbr_filter.port = "0"
hbr_filter.gid = ""
hbr_filter.protocol = ""
hbr_filter.quiesce = "true"
hbr_filter.opp = "true"
hbr_filter.pause = "true"
scsi0:0.hbr_filter.rdid = ""
scsi0:0.hbr_filter.persistent = ""
  • Save the file
  • Run vim-cmd vmsvc/getallvms | grep -i <VM Name> to find the vmid. 
  • Then Run vim-cmd vmsvc/reload <vmid found above> to reload the virtual machine into inventory. 
  • See Reloading a vmx file without removing the virtual machine from inventory (1026043) for more details.
  • Power on the virtual machine

Reference:

2017/01/14 歲修記錄

這次歲修搞很久。

狀況:

  • 中華電信 FTTB 不通,幸好隔天早上來處理好了
  • NAS 服務異常,當天跟廠商連絡,停用新增的網卡暫時可用
  • HR server 硬碟故障,用 SSR 備份恢復
  • VPN 無法連線,VMware bug 修改網卡型態可解
  • VM guest 無法開機,修改 .vmx 可解

Windows PPTP server on VMware ESXi5.5

昨天將 VMware ESXi 5.1 升級到 5.5,發現 Windows PPTP server 無法連線,錯誤訊息 619。

幸好查到這篇解法 Point-to-Point Tunneling Protocol (PPTP) connections may not work on ESXi 5.5,將 PPTP server 網路卡改為 vmxnet3 即可。

2017年1月6日 星期五

Outlook 2007 增加信箱大小

Reference:
Increase maximum size pst-files

Outlook 2003/2007 預設信箱檔案 (.ost, .pst)大小是 20GB,Outlook 2010 以上 50GB。
如果要調大必須修改 registry 才能夠超過限制。

For Outlook 2007:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\PST]
"WarnLargeFileSize"=dword:f3cf3cf2
"MaxLargeFileSize"=dword:ffffffff

2017年1月4日 星期三

How to register/add a VM to the Inventory in vCenter Server

Reference:
How to register/add a VM to the Inventory in vCenter Server

如果需要把 VM 加回 ESXi host 或 vCenter,步驟如下:

  1. Open the vSphere/VMware Infrastructure (VI) Client and log in with appropriate credentials.
  2. If connecting to vCenter Server, click on the desired host.
  3. Click the Configuration tab.
  4. Click Storage.
  5. Right-click on the appropriate datastore and click Browse Datastore.
  6. Navigate to the folder named after the virtual machine, and locate the virtual machine.vmx file.
  7. Right-click the .vmx file and click Add to inventory. The Add to Inventory wizard opens.
  8. Continue to follow the wizard to add the virtual machine.


2017年1月3日 星期二

VMware ESXi 5.1 guest disk 2TB

VMware ESXi 5.1 的 guest OS disk 可以設定為 2TB,但是搭配 vCenter 5.1, Replication 5.1 做 Replication 時會發生錯誤,造成 guest OS 關機無法啟動。
VMware Knowledge base: Cannot power on a virtual machine after enabling vSphere Replication (2057808)
恢復 guest OS 的方法:VMware Module DevicePowerOn power on failed Unable to create virtual SCSI device for scsi0:1

Try 1: 把 vCenter, Replication 升級到 5.5、ESXi 在 5.1,錯誤狀況相同
Try 2: 把 vCenter, Replication 升級到 6.0、ESXi 在 5.1,錯誤狀況相同
Try 3: 把這個 guest OS 做 clone,錯誤訊息為超過檔案大小
Try 4: 把 vCenter, Replication 升級到 6.0、ESXi 升級到 5.5,Replication 可以正常運做了

結論:
ESXi 5.1 的 guest OS disk 設定為 2TB 可以使用,但是 Replication 和 clone 時會發生錯誤,必須升級到 5.5 才會正常。