简体   繁体   English

docker 上的 Windows - jboss,拒绝连接到本地 ZA189C633D9995E11BF8607170ECA9

[英]Windows - jboss on docker, connection refused to local oracle database

I have Jboss running in a docker container.我有Jbossdocker容器中运行。 On jboss I have defined a connection to the xa-datasource database as the ip address of my computer and not localhost because I work in Windows 10 .在 jboss 上,我将与 xa-datasource 数据库的连接定义为我的计算机的 ip 地址,而不是 localhost,因为我在Windows 10工作。 Despite the correct ip and port to the database ( oracle ) I keep getting the connection refused error .尽管正确的 ip 和数据库端口 ( oracle ) 我不断收到连接被拒绝错误 I run jboss with the command我用命令运行 jboss

docker run -d -p 8080:8080 -p 9990:9990 myjboss

Can anyone help me, or do I need any additional settings in my docker.谁能帮助我,或者我需要在我的 docker 中进行任何其他设置。 I will add that I also test alpine and in the container ( exec ) I can ping my ip address.我要补充一点,我还测试了 alpine,并且在容器( exec )中我可以 ping 我的 ip 地址。

Thanks a lot for all the answers.非常感谢所有的答案。 I would like to add that I tested all other solutions contained in similar questions, but unfortunately I did not get the expected results.我想补充一点,我测试了类似问题中包含的所有其他解决方案,但不幸的是我没有得到预期的结果。

If you can ping your host IP, but you can't connect to the database, granted that the DB is running and the listener is up...如果您可以 ping 您的主机 IP,但您无法连接到数据库,前提是数据库正在运行并且侦听器已启动...

I'd advise you to check the Windows Firewall settings.我建议您检查Windows Firewall设置。

Maybe try disabling it to check if you can actually connect to the database, if so, add an Inbound Rule to the firewall to allow connections on port 1521 (or whatever port your listener is running on)也许尝试禁用它以检查您是否可以实际连接到数据库,如果可以,请向防火墙添加一个Inbound Rule以允许端口1521 (或您的侦听器正在运行的任何端口)上的连接

I solved this problem by using not ip/localhost but host.docker.internal as described here -> https://docs.docker.com/docker-for-windows/networking/我通过使用不是 ip/localhost 而是使用host.docker.internal解决了这个问题,如此处所述-> https://docs.docker.com/docker-for-windows/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 Docker 容器 (Windows) 拒绝连接到本地主机 - Connection refused to localhost with Docker container (Windows) psql:无法连接到服务器:Docker在Windows中拒绝连接到psql - psql: could not connect to server: Connection refused in Docker to a psql in Windows 从主机到 linux 容器的连接被拒绝,其中 Docker 用于 Windows - Connection refused from host into a linux container with Docker for Windows Docker容器与网关的连接被拒绝 - Docker container connection to gateway refused 如何使用JBoss 5和Oracle在每台机器上允许多个数据库连接 - How to allow more than one database connection per machine with JBoss 5 and Oracle 尝试在 Docker Windows 容器上安装 Oracle 数据库时出错 - Error trying to install Oracle database on Docker Windows container 本地 PostgresSQL 中的“连接被拒绝”,但它以前工作过 - "Connection refused" in Local PostgresSQL but it worked before 在Docker,tensorflow,Windows 10中使用本地文件系统和MySQL数据库 - Working with local filesystem and MySQL database in Docker, tensorflow, Windows 10 Windows上的Oracle连接问题 - Oracle connection problems on Windows Windows 10和Chrome操作系统拒绝SSH连接 - SSH connection refused from Windows 10 and ChromeOS
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM