我正在尝试启动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.".
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进行连接:
发布于 2021-05-05 22:02:10
必须在SQL Server configuration -administration中启用/IP传入连接,默认情况下端口不会打开。
在开始菜单上,单击所有程序> Microsoft SQL Server >配置工具> SQL
https://stackoverflow.com/questions/67371214
复制相似问题