Golang中国

qianlnk

Golang China 第 3304 号会员,加入于 2015-04-15 13:52


qianlnk最近创建的主题


在终端输出二维码
开发工具qianlnk • 2017-06-03 16:52
2 golang实现类似try...catch...的异常处理机制
分享qianlnk • 2017-05-31 09:18 • 最后回复来自 qianlnk
2 mgo连接备节点做查询
社区开发qianlnk • 2015-04-15 14:38 • 最后回复来自 qianlnk
qianlnk 创建的更多主题

qianlnk最近回复了


回复了 qianlnk 创建的主题: golang实现类似try...catch...的异常处理机制 2017-05-31 09:18

@ichenq

这个用法其实也考虑应用场景 比如数据库事务 每步判断error然后rollback,用这个catch就很方便。

回复了 qianlnk 创建的主题: mgo连接备节点做查询 2015-04-15 14:38

直接在主节点用mongo 10.128.0.23:27017是可以的呀,另外,貌似本机上用内网ip也是连不上的,只能用外网ip。这个是不是设置有问题导致的?

    yiqice:PRIMARY> ^C
bye
root@198-72:/opt/mongodb/bin# ./mongo 10.128.0.23:27017
MongoDB shell version: 3.0.1
connecting to: 10.128.0.23:27017/test
Server has startup warnings: 
2015-04-14T14:34:38.379+0800 I CONTROL  [initandlisten] ** WARNING: You are running this process as the root user, which is not recommended.
2015-04-14T14:34:38.379+0800 I CONTROL  [initandlisten] 
2015-04-14T14:34:38.423+0800 I CONTROL  [initandlisten] 
2015-04-14T14:34:38.423+0800 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2015-04-14T14:34:38.423+0800 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2015-04-14T14:34:38.423+0800 I CONTROL  [initandlisten] 
2015-04-14T14:34:38.423+0800 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2015-04-14T14:34:38.423+0800 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2015-04-14T14:34:38.423+0800 I CONTROL  [initandlisten] 
yiqice:SECONDARY>
qianlnk 创建的更多回复