有維護一些定期工作的程式
都是歷史悠久一代傳一代
只要他正常工作都不會異動他
最近忽然發現某支程式會執行失敗
錯誤訊息為 Lost connection to MySQL server during query at ...
上網查了一下 說是資料庫資料較大 建議加大 net_read_timeout和net_write_timeout時間
因為資料庫不是我管理的 試著從程式下手
發現在執行失敗的那一行是一個查詢的指令
而where的條件式沒有依過濾最多的放在前面
調整一下順序 果然查詢回覆的時間大幅減少 應該就可以避免失敗了
2018年7月27日 星期五
2018年6月24日 星期日
interface input error
https://www.cisco.com/en/US/docs/internetworking/troubleshooting/guide/tr1904.html#wp1020996
runts, giants, no buffer, CRC, frame, overrun, and ignored都是input error原因之一,
原先目標是抓interface crc error,這值如果持續產生有很大機率是線材的問題,
結果目標設備不支援,只好改抓input error,input error 的原因則較多了,
Includes runts, giants, no buffer, CRC, frame, overrun, and ignored counts. Other input-related errors can also cause the input error count to be increased, and some datagrams may have more than one error; therefore, this sum may not balance with the sum of enumerated input error counts.
但這些數量總合不會等於input error,因為封包發生錯誤也許原因不只一種。
macOS ssh 失敗(diffie-hellman-group1-sha1)
Unable to negotiate with xxx.xxx.xxx.xxx port 22: no matching key exchange method found. Their offer:diffie-hellman-group1-sha1
ans:
ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 name@xxx.xxx.xxx.xxx
2017年6月16日 星期五
CentOS 7 ,Mediawiki, php5.6, mariaDB 10.2
因為要安裝google -authentication,所以把老舊的系統換掉,
systemctl 取代 service
安裝google -authentication
php 版本更新到 5.6
mariadb從原本的5.5更新到10.2
systemctl 取代 service
安裝google -authentication
php 版本更新到 5.6
mariadb從原本的5.5更新到10.2
- 將套件移除
- 將 /var/lib/mysql 資料夾備份
- https://downloads.mariadb.org/mariadb/repositories/#mirror=ossplanet
- 選擇你對應的版本根據指示進行
- 新增/etc/yum.repos.d/MariaDB.repo
- 安裝
- 將舊資料移回/var/lib/mysql
Mediawiki
- 執行安裝時一直卡在set_time_limit(0)這行,因為我暫時找不到問題,直接將這行comment out
- 然後就一路安裝完畢了
- 目前還有上傳檔案的問題 ,doc檔案會變成你的zip檔案毀損無法辨識
2016年2月16日 星期二
switch ssh 設定
在更換switch後發現設定檔完全一樣但ssh無法登入,
一般設定步驟如下:參考 cisco ssh 設定
1. enable
2. configure terminal
3. hostname hostname
4. ip domain-name name
5. crypto key generate rsa
6. ip ssh [time-out seconds | authentication-retries integer]
7. ip ssh version [1 | 2]
其實,就是少了產生公鑰的步驟,所以即使將設定檔完全倒入也無法ssh登入
crypto key generate rsa
2015年12月22日 星期二
virtualbox無法啟動(Timed out after 60014 ms waiting for child request......)
今天在重啟電腦後要啟動virtualbox的os 非常緩慢
然後一直跳出以下類型的錯誤訊息
Timed out after 60014 ms waiting for child request......
在virtualbox討論串裡有
https://forums.virtualbox.org/viewtopic.php?f=6&t=67840&start=195#p347694
avira移除後,啟動就恢復以往的快速了
2014年10月9日 星期四
Drivers for GUC232A USB to Serial converter
http://iogear.custhelp.com/app/answers/detail/a_id/1026/~/drivers-for-guc232a-usb-to-serial-converter
安裝完後
開啟終端機
安裝完後
開啟終端機
screen /dev/cu.UC-232AC 9600
ctrl+ A , ctrl+\ 離開
2014年7月28日 星期一
2014年7月15日 星期二
2014年6月30日 星期一
If host is DOWN, Nagios desable notification for all services
http://forum.centreon.com/showthread.php/10820-howto-define-relations-no-notifaction-for-each-service-if-host-is-down
在測試nagios監控服務時發現,service告警信一直無法驅動,明明狀態就顯示critical/warning,
原來,當host down,service的告警就會停掉,因為它認為主機既然掛了,
服務當然也不會存活,不過這就困擾我了,因為它預設判斷主機的方式是用ping,
偏偏欲監控的主機例如他只開http服務,可是他檔ping,就會造成host down,service up,
會一直寄host down告警信,有沒有關掉host 告警都沒差,因為它認為host down,
所以假設service down他也不會寄告警,最快的解決方式就是要求被監控的主機
開放監控方icmp,但是,還是想想看其他方式,終於,就是改掉host alive的檢查方式,
改用他開放的服務去當作host alive的檢查方式,
缺點就是,當有一台新機器一樣檔icmp開放特定服務時,
又要手動增加一個host alive的檢查方式...
在測試nagios監控服務時發現,service告警信一直無法驅動,明明狀態就顯示critical/warning,
原來,當host down,service的告警就會停掉,因為它認為主機既然掛了,
服務當然也不會存活,不過這就困擾我了,因為它預設判斷主機的方式是用ping,
偏偏欲監控的主機例如他只開http服務,可是他檔ping,就會造成host down,service up,
會一直寄host down告警信,有沒有關掉host 告警都沒差,因為它認為host down,
所以假設service down他也不會寄告警,最快的解決方式就是要求被監控的主機
開放監控方icmp,但是,還是想想看其他方式,終於,就是改掉host alive的檢查方式,
改用他開放的服務去當作host alive的檢查方式,
缺點就是,當有一台新機器一樣檔icmp開放特定服務時,
又要手動增加一個host alive的檢查方式...
2014年6月25日 星期三
ncnof:someone else is already generating the configuration for nconf
移除 /../nconf/temp/generate.lock文件
2014年6月24日 星期二
2014年6月11日 星期三
What IOS command will show the TCP ports that are listening on a device?
https://supportforums.cisco.com/discussion/11255361/what-ios-command-will-show-tcp-ports-are-listening-device
show control-plane host open-ports
show control-plane host open-ports
nagios: Unable to get process status, You don’t have permission to access /nagios on this server
- Unable to get process status
http://www.linuxquestions.org/questions/linux-newbie-8/nagios-internal-server-error-903798/
chcon -R -t httpd_sys_content_t /usr/local/nagios
- You don’t have permission to access /nagios on this server
2014年6月5日 星期四
2014年3月6日 星期四
SSL-VPN on Safari 7.0.2
- Open Safari Preferences, click the Security tab and choose "Manage Website Settings..." next to the Internet Plug-ins checkbox.
- Click on Java and find the SA/IC URL listed on the right column. Change the pulldown for that listing to "Run in unsafe mode".
2014年1月24日 星期五
2014年1月17日 星期五
eTag不爽裝 免儲值 一樣上國道
小市民能做的其實很簡單
就是不用而已
這年頭廠商竟然比花錢的還要大聲
真的是反過來了
大公司的大老闆們
在公司裡講話沒人敢反對
不要把在公司裡習慣的態度拿出來社會
太多前例了不是嗎
2014年1月8日 星期三
訂閱:
文章 (Atom)
