运维笔记 -- docker环境下Sql Server评估过期,容器无法启动处理

场景描述:

  收到同事反馈,“Sql Server测试服务器,远程无法访问”,于是登录Sql Server数据库所在的宿主机服务器,查看容器状态,发现,容器没有正常启动,于是执行启动命令,之后,还是没有启动,docker logs --tail="30" sqlserver2019 查看日志:Error: The evaluation period has expired.

This program has encountered a fatal error and cannot continue running at Wed Jun  3 06:06:26 2020
The following diagnostic information is available:
Error: The evaluation period has expired.

错误提示:Sql Server 评估过期!

原因分析:

    当SQL Server评估版的120天评估期过期后,SQL Server将无法启动。

    后台服务会出现上述异常信息:Error: The evaluation period has expired.

处理方式:

    修改该数据库容器所在的宿主机,系统时间,改成你认为可用的一个时间点,这里临时改成了“一年前”,改完后,将容器启动,再将宿主机时间改回来。

    具体操作: 

---001查看宿主机当前时间
root@123:~# hwclock --show
Wed 03 Jun 2020 02:17:32 PM CST  .071467 seconds

root@123:~# date
Wed Jun  3 14:19:36 CST 2020

---002 修改时间:改成一年前
date -s 06/03/2019

---003 重启容器
docker restart sqlserver2019

---004 查看容器是否启动
docker ps

---005 将系统时间改回来
date -s 06/03/2020

---006 查看系统当前时间
root@123:~# date
Wed Jun  3 00:00:05 CST 2020

---补充:

windows环境下处理:

https://www.cnblogs.com/cw_volcano/archive/2012/10/08/2714955.html

https://www.ddayh.com/917.html

 

posted @ 2020-06-03 14:41  hello-Jesson  阅读(940)  评论(0编辑  收藏  举报