关于tomcat启动项目时一直卡住无反应的场景之一

       最近碰到一次项目启动半天没反应,也不报错,项目在其它电脑上能正常启动运行。日志中有时候会报数据库连接超时,有时候会报类似于接连池问题。

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.

Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.

Caused by: java.net.ConnectException: Connection timed out: connect

最终问大神找到原因,是系统没有打开telnet.   然而我其它电脑也没有开这个功能也照样运行。不知道什么造成这样的结果 

telnet

       搭建或配置网络环境时,经常会使用ping命令检查网络是否可达。有些时候Ping命令也不好使,比如因防火墙禁止或访问策略限制等。则可使用telnet测试映射端口或远程访问主机。

     Telnet协议是TCP/IP协议族的其中之一,是Internet远程登录服务的标准协议和主要方式,常用于网页服务器的远程控制,可供使用者在本地主机运行远程主机上的工作。

启用telnet

       操作过程:点击"开始"→"控制器面板"→" 查看方式:类型"则点击"程序"("查看方式:大图标"则点击"程序和功能")→ "启动或关闭windows功能"→ 在"Windows功能"界面勾选Telnet服务器

猜你喜欢

转载自blog.csdn.net/sosozha/article/details/85014735