Downloading Python-3.4.3.tgz... -> https://www.python.org/ftp/python/3.4.3/Python-3.4.3.tgz Installing Python-3.4.3... ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?
Please consult to the Wiki page to fix the problem. https://github.com/yyuu/pyenv/wiki/Common-build-problems
BUILD FAILED (OS X 10.11.2 using python-build 20150519)
// rootユーザにlocalhostの全DBアクセス権限付与 mysql> GRANT ALL PRIVILEGES on *.* to root@localhost IDENTIFIED BY '(root's password)' WITH GRANT OPTION; Query OK, 0 rows affected (0.01 sec)
$ ls Procfile bin hubot-scripts.json package.json README.md external-scripts.json node_modules scripts
こんなエラーが出たときは
/root/.config へのアクセス権限がないと言われています。
1 2 3 4 5 6 7 8 9 10 11
Error: EACCES, permission denied '/root/.config' at Object.fs.mkdirSync (fs.js:654:18) at sync (/usr/lib/node_modules/yo/node_modules/configstore/node_modules/mkdirp/index.js:71:13) at Function.sync (/usr/lib/node_modules/yo/node_modules/configstore/node_modules/mkdirp/index.js:77:24) at Object.create.all.get (/usr/lib/node_modules/yo/node_modules/configstore/index.js:38:13) at Object.Configstore (/usr/lib/node_modules/yo/node_modules/configstore/index.js:27:44) at new Insight (/usr/lib/node_modules/yo/node_modules/insight/lib/index.js:37:34) at Object.<anonymous> (/usr/lib/node_modules/yo/lib/cli.js:156:11) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32)
# Description: # hubot basic command. # # Commands: # hubot who are you - I'm hubot! # hubot hello # hubot who am I - You are <user_name> # hubot what is this <*> - This is <$1>
robot.respond /who am I/i, (msg) -> msg.send "You are #{msg.message.user.name}"
robot.respond /what is this (.*)/i, (msg) -> msg.send "This is #{msg.match[1]}"
run hubot
sudo is required and in order to access http port. You will require hubot integrated with outside site - ex) JIRA etc…
1 2 3 4 5
$ sudo bin/hubot -a slack
[Wed Jan 13 2016 13:43:08 GMT+0900 (JST)] INFO Connecting... [Wed Jan 13 2016 13:43:10 GMT+0900 (JST)] INFO Logged in as hubot of RUBY GROUPE, but not yet connected [Wed Jan 13 2016 13:43:11 GMT+0900 (JST)] INFO Slack client now connected
no sudo execution result …(>_<) Error occured!!
1 2 3 4 5 6 7 8 9 10 11 12 13
$ bin/hubot -a slack
[Wed Jan 13 2016 16:40:59 GMT+0900 (JST)] INFO Connecting... [Wed Jan 13 2016 16:40:59 GMT+0900 (JST)] ERROR Error: listen EACCES at errnoException (net.js:905:11) at Server._listen2 (net.js:1024:19) at listen (net.js:1065:10) at net.js:1147:9 at dns.js:72:18 at process._tickCallback (node.js:442:13)
[Wed Jan 13 2016 16:41:00 GMT+0900 (JST)] INFO Logged in as hubot of RUBY GROUPE, but not yet connected [Wed Jan 13 2016 16:41:02 GMT+0900 (JST)] INFO Slack client now connected
$ pod install [!] Unable to load a specification for the plugin `/opt/homebrew-cask/Caskroom/cocoapods/0.37.0/CocoaPods.app/Contents/Resources/bundle/lib/ruby/gems/2.2.0/gems/cocoapods-plugins-install-0.0.1` Analyzing dependencies
CocoaPods 1.0.0.beta.1 is available. To update use: `sudo gem install cocoapods --pre` [!] This is a test version we'd love you to try.
For more information see http://blog.cocoapods.org and the CHANGELOG for this version http://git.io/BaH8pQ.
Downloading dependencies Installing Realm (0.97.0) Installing RealmSwift (0.97.0) Generating Pods project 2015-12-31 10:51:38.680 ruby[6275:47591] [MT] DVTAssertions: ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-9548/IDEFoundation/Initialization/IDEInitialization.m:590 Details: Assertion failed: _initializationCompletedSuccessfully Function: BOOL IDEIsInitializedForUserInteraction() Thread: <NSThread: 0x7fc66d067980>{number = 1, name = main} Hints: None Backtrace: 0 0x000000010e001f7f -[DVTAssertionHandler handleFailureInFunction:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation) 1 0x000000010e00170c _DVTAssertionHandler (in DVTFoundation) 2 0x000000010e001978 _DVTAssertionFailureHandler (in DVTFoundation) 3 0x000000010e0018da _DVTAssertionFailureHandler (in DVTFoundation) 4 0x0000000110e5154d IDEIsInitializedForUserInteraction (in IDEFoundation) 5 0x000000011393a631 +[PBXProject projectWithFile:errorHandler:readOnly:] (in DevToolsCore) 6 0x000000011393c1b6 +[PBXProject projectWithFile:errorHandler:] (in DevToolsCore) 7 0x00007fff93b2af14 ffi_call_unix64 (in libffi.dylib) zsh: abort pod install
[!] Please close any current Xcode sessions and use `Chapter6.xcworkspace` for this project from now on. Sending stats Pod installation complete! There is 1 dependency from the Podfile and 2 total pods installed.
[Instance A ]# pcs cluster auth ip-10-0-0-20.ap-northeast-1.compute.internal ip-10-0-1-20.ap-northeast-1.compute.internal -u hacluster -p ruby2015 Error: Unable to communicate with ip-10-0-0-20.ap-northeast-1.compute.internal Error: Unable to communicate with ip-10-0-1-20.ap-northeast-1.compute.internal
Shutting down pacemaker/corosync services... Redirecting to /bin/systemctl stop pacemaker.service Redirecting to /bin/systemctl stop corosync.service Killing any remaining services... Removing all cluster configuration files... ip-10-0-0-20.ap-northeast-1.compute.internal: Succeeded ip-10-0-1-20.ap-northeast-1.compute.internal: Succeeded Synchronizing pcsd certificates on nodes ip-10-0-0-20.ap-northeast-1.compute.internal, ip-10-0-1-20.ap-northeast-1.compute.internal... ip-10-0-0-20.ap-northeast-1.compute.internal: Success ip-10-0-1-20.ap-northeast-1.compute.internal: Success
Restaring pcsd on the nodes in order to reload the certificates... ip-10-0-0-20.ap-northeast-1.compute.internal: Success ip-10-0-1-20.ap-northeast-1.compute.internal: Success
[Instance A & B ]# rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm [Instance A & B ]# yum -y install python-pip [Instance A & B ]# pip --version pip 7.1.0 from /usr/lib/python2.7/site-packages (python 2.7)
[Instance A & B ]# pip install awscli [Instance A & B ]# aws configure AWS Access Key ID [None]: ********************* AWS Secret Access Key [None]: ************************************** Default region name [None]: ap-northeast-1 Default output format [None]: json
EIP 付け替えリソース作成
heartbeat で問題検知した際に起動するリソースとして登録します。
OCF_ROOT が定数として指定されているが、存在しない為
1 2 3 4 5 6 7
[Instance A & B ]# cd /tmp [Instance A & B ]# git clone https://github.com/moomindani/aws-eip-resource-agent.git [Instance A & B ]# cd aws-eip-resource-agent [Instance A & B ]# sed -i 's/\${OCF_ROOT}/\/usr\/lib\/ocf/' eip [Instance A & B ]# mv eip /usr/lib/ocf/resource.d/heartbeat/ [Instance A & B ]# chown root:root /usr/lib/ocf/resource.d/heartbeat/eip [Instance A & B ]# chmod 0755 /usr/lib/ocf/resource.d/heartbeat/eip
pacemaker 設定
stonish 無効化
1
[Instance A ]# pcs property set stonith-enabled=false
split-brain (スプリット・ブレイン) が発生しても quorum (クォーラム) が特別な動作を行わないように設定
1
[Instance A ]# pcs property set no-quorum-policy=ignore
+----------+ Ping Request +----------+ | | <-------------- | | | Server A | | Server B | | | --------------> | | +----------+ Ping Response +----------+
特定IPからの ping を通す許可設定
以下設定を Server A で実施する。
1 2 3
[Server A]# iptables -A INPUT -p icmp --icmp-type 8 -s <Server B の IP Address> -j ACCEPT [Server A]# iptables -A OUTPUT -p icmp --icmp-type 0 -s <Server B の IP Address> -j ACCEPT [Server A]# service iptables restart
--icmp-type 8 は Echo request (エコー要求) を許可
--icmp-type 0 は Echo Reply (エコー応答) を許可
Server Bから ping実行
1 2 3 4 5 6 7 8 9 10
[Server B]# ping <Server A の IP Address>
PING (<Server A の IP Address>): 56 data bytes 64 bytes from (<Server A の IP Address>): icmp_seq=0 ttl=58 time=4.411 ms 64 bytes from (<Server A の IP Address>): icmp_seq=1 ttl=58 time=4.079 ms 64 bytes from (<Server A の IP Address>): icmp_seq=2 ttl=58 time=4.027 ms ^C --- (<Server A の IP Address>) ping statistics --- 3 packets transmitted, 3 packets received, 0.0% packet loss round-trip min/avg/max/stddev = 4.027/4.172/4.411/0.170 ms