![](/img/trans.png)
[英]The TCP/IP connection to host server.com/Db_name, port 1433 has failed
[英]TOMCAT: The TCP/IP connection to the host 127.0.0.1, port 1433 has failed
我正在尝试启动 Tomcat 服务器,但出现此错误: The TCP/IP connection to the host 127.0.0.1, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
The TCP/IP connection to the host 127.0.0.1, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
server.xml 看起来像这样:
<Resource name="jdbc/ProcessEngine"
auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
uniqueResourceName="Camunda"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://localhost:1433/Camunda"
defaultTransactionIsolation="READ_COMMITTED"
username="sa"
password=".v>>4T^[#f/B)9Qx"
maxTotal="20"
minIdle="5"
maxIdle="20" />
PS。 TCP/IP 已启用并且 TCP 端口 id 等于 1433。此外,我可以通过 Microsoft SQL Server Management Studio 进行连接:
您必须在 SQL 服务器配置 -administration 中启用 TCP/IP 传入连接,默认情况下未打开端口。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.