无法使用端口 8080 在 Raspberry Pi 上访问 Jenkins 运行
Can't access Jenkins running on a Raspberry Pi using port 8080
我试图通过我的本地网络在端口 8080 上访问我的 jenkins 服务 运行,但由于某种原因它不允许我连接。我可以远程进入 pi 并启动网络浏览器并输入 localhost:8080,它工作正常。
这是 raspbian 的基本安装,我没有在上面安装防火墙,所以不确定为什么我无法访问本地网络上的 jenkins。
如果这是真的,
I can remote into the pi and launch a web browser and type in localhost:8080 and it seems to work fine.
您可以专注于 firewall/iptables/routing/ip 配置问题,让我们继续吧。
假设您的 Raspberry Pi 有 ip 192.168.0.10/24
并且您正在从同一网络上的设备访问。
防火墙
你说它被禁用了,所以我们可以不考虑它。
Iptables
检查您有哪些规则
iptables -L
将它们全部刷新以进行测试以防万一
iptables -F
路由
你们在同一个网络,所以这里应该没有问题。
IP配置
ping 192.168.0.10
不工作?然后检查你的配置
route -n
ifconfig
一切如常? ping
执行时再次
tcpdump -i eth0 -n #(or use whireshark if possible)
在两台机器上。您将能够看到那里发生了什么。您在那里可以看到的内容:
- 请求未发送 =>
most lickely missconfiguration on source
- 正在发送请求,没有回答 =>
most lickely missconfiguration on dest
- 两者都已发送,但未收到答复 =>
missconfiguration of firewall on source or routing problem (probably not your case)
如果以上一切正常,那么您必须专注于 Pi 上的服务 运行。它是否监听每个 IP 并接受来自任何地方(或至少您的网络)的连接?
如果不是,请更改您的配置,您应该会很好 运行。
我试图通过我的本地网络在端口 8080 上访问我的 jenkins 服务 运行,但由于某种原因它不允许我连接。我可以远程进入 pi 并启动网络浏览器并输入 localhost:8080,它工作正常。
这是 raspbian 的基本安装,我没有在上面安装防火墙,所以不确定为什么我无法访问本地网络上的 jenkins。
如果这是真的,
I can remote into the pi and launch a web browser and type in localhost:8080 and it seems to work fine.
您可以专注于 firewall/iptables/routing/ip 配置问题,让我们继续吧。
假设您的 Raspberry Pi 有 ip 192.168.0.10/24
并且您正在从同一网络上的设备访问。
防火墙
你说它被禁用了,所以我们可以不考虑它。
Iptables
检查您有哪些规则
iptables -L
将它们全部刷新以进行测试以防万一
iptables -F
路由
你们在同一个网络,所以这里应该没有问题。
IP配置
ping 192.168.0.10
不工作?然后检查你的配置
route -n
ifconfig
一切如常? ping
执行时再次
tcpdump -i eth0 -n #(or use whireshark if possible)
在两台机器上。您将能够看到那里发生了什么。您在那里可以看到的内容:
- 请求未发送 =>
most lickely missconfiguration on source
- 正在发送请求,没有回答 =>
most lickely missconfiguration on dest
- 两者都已发送,但未收到答复 =>
missconfiguration of firewall on source or routing problem (probably not your case)
如果以上一切正常,那么您必须专注于 Pi 上的服务 运行。它是否监听每个 IP 并接受来自任何地方(或至少您的网络)的连接?
如果不是,请更改您的配置,您应该会很好 运行。