春季靴子和Tomcat从外面访问
几天来,我一直在尝试通过在Stackoverflow和其他网站上搜索来解决这个问题,但我找不到它。
我目前有一个Spring Boot应用程序转换为服务器上运行的JAR。使用直接集成到我的Spring Boot应用程序的tomcat,使用端口8080上的Localhost访问该应用程序。
问题是:
我们将在这里告诉我服务器的IP地址为123.45.69.894
如果我输入:
localhost:8080/mypath
或者如果我输入:
123.45.69.894:8080/mypath
在服务器的浏览器中。当我提出请求时,我有在控制台中出现的:
2022-05-21 08:23:26.094 INFO 7536 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2022-05-21 08:23:26.094 INFO 7536 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2022-05-21 08:23:26.109 INFO 7536 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 15 ms
一切正常。
但是,如果我键入,则
123.45.69.894:8080/mypath
在另一台计算机的浏览器中不再起作用,并且我有一个连接超时错误,并且控制台中没有任何内容。
我已经检查了防火墙是否没有阻止端口8080。但是问题不存在。
我还在港口80和IIS网站上,问题可能来自那里吗?
例如,我已经看过这些文章,但这对我不起作用:
有人知道问题可能来自哪里以及如何解决问题吗?
For a few days I've been trying to solve this problem by searching on stackoverflow and other sites but I can't find it.
I currently have a spring boot application converted to jar running on a server. This application is accessible via a browser using the localhost on port 8080 by using tomcat which was directly integrated to my spring boot application.
The problem is the following:
We will tell here that the ip address of my server is 123.45.69.894
If I type :
localhost:8080/mypath
or if I type :
123.45.69.894:8080/mypath
in the browser of the server. I have this that appears in the console when I make the request :
2022-05-21 08:23:26.094 INFO 7536 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2022-05-21 08:23:26.094 INFO 7536 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2022-05-21 08:23:26.109 INFO 7536 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 15 ms
and everything works well.
But if I type,
123.45.69.894:8080/mypath
in the browser of another computer it doesn't work anymore and I have a connection time out error and nothing appears in the console.
I have already checked if the firewall doesn't blocked the port 8080. But the problem is not there.
I have also on the port 80 an IIS web site, the problem can come from there ?
I have already looked at these articles for example but that doesn't work for me :
how to deploy Spring boot application in IIS
Apache Tomcat not accessible from outside
Does anyone know where the problem might come from and how to solve it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从远程计算机中,尝试使用您的IP地址。如果有时,机器之间肯定存在防火墙问题。
如果Ping有效,请尝试使用Telnet IP端口。如果在Windows上,您可能需要从设置/应用程序中启用Telnet。如果telnet连接,
直到您击中CNTRL方形支架,才不会采取任何措施。如果有效,那么一切都可以正常工作。
From the remote machine, try pinging your IP address. If it times out there is definitely a firewall issue between the machines.
If ping works, try telnet IP port. If on Windows you may need to enable telnet from setup/applications. If telnet connects, the
there will be no action until you hit cntrl square bracket. If that works then everything should work ok.