今天新增了两台SQL Azure,需要加入到天兔监控里进行监控,但加完后发现界面里显示失败。
天兔日志有如下错误信息:
# cat /usr/local/lepus/logs/lepus.log
..............................................................................................
2017-10-23 08:08:15 [WARNING] check sqlserver sc-stable.database.chinacloudapi.cn:1433 :
(40615, "Cannot open server 'sc-stable' requested by the login. Client with IP address
'54.222.221.177' is not allowed to access the server.
To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database
to create a firewall rule for this IP address or address range.
It may take up to five minutes for this change to take effect.DB-Lib error message 40615,
severity 14:\nGeneral SQL Server error: Check messages from the SQL Server\nDB-Lib error message 20002, severity 9:\nAdaptive Server connection failed\n")
...............................................................................................
根据日志内容判断应该是SQL Azure的防火墙拒绝了来自IP为54.222.221.177的连接。
解决方案:
用Navicat连接SQLServer数据库,右键-->SQL Azure防火墙规则
添加54.222.221.177网段,比如:

添加完后重启天兔进程后问题得到解决:
[root@c58c333ef639 logs]# lepus stop
lepus processes id 17026 been stop
lepus processes id 17042 been stop
lepus processes id 17370 been stop
lepus processes id 17546 been stop
lepus processes id 17594 been stop
lepus processes id 17625 been stop
[root@c58c333ef639 logs]# /usr/local/sbin/lepus: line 16: 17026 Terminated nohup python lepus.py &>logs/lepus.log
[root@c58c333ef639 logs]# lepus start
lepus server start success!
再次查看界面显示正常:

天兔日志有如下错误信息:
# cat /usr/local/lepus/logs/lepus.log
..............................................................................................
2017-10-23 08:08:15 [WARNING] check sqlserver sc-stable.database.chinacloudapi.cn:1433 :
(40615, "Cannot open server 'sc-stable' requested by the login. Client with IP address
'54.222.221.177' is not allowed to access the server.
To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database
to create a firewall rule for this IP address or address range.
It may take up to five minutes for this change to take effect.DB-Lib error message 40615,
severity 14:\nGeneral SQL Server error: Check messages from the SQL Server\nDB-Lib error message 20002, severity 9:\nAdaptive Server connection failed\n")
...............................................................................................
根据日志内容判断应该是SQL Azure的防火墙拒绝了来自IP为54.222.221.177的连接。
解决方案:
用Navicat连接SQLServer数据库,右键-->SQL Azure防火墙规则
添加54.222.221.177网段,比如:

添加完后重启天兔进程后问题得到解决:
[root@c58c333ef639 logs]# lepus stop
lepus processes id 17026 been stop
lepus processes id 17042 been stop
lepus processes id 17370 been stop
lepus processes id 17546 been stop
lepus processes id 17594 been stop
lepus processes id 17625 been stop
[root@c58c333ef639 logs]# /usr/local/sbin/lepus: line 16: 17026 Terminated nohup python lepus.py &>logs/lepus.log
[root@c58c333ef639 logs]# lepus start
lepus server start success!
再次查看界面显示正常:

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15498/viewspace-2146266/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/15498/viewspace-2146266/