Comments (6)
这个和 Natter 关系不大,看起来是 Docker 或者是操作系统的问题。
首先先测试下您的 Docker 是否能正常创建网络:
docker network create test_net
docker network rm test_net
如果上面命令失败了,先排查 Docker 出现的故障吧。
另外为了方便定位问题,麻烦提供下相关版本号:
uname -a
cat /etc/os-release
iptables --version
docker version
from natter.
确实是我的系统问题,以下是我可以查到的信息:
-
系统版本:
Linux AS6704T-5FDB 5.13.x #1 SMP Wed Mar 13 00:11:10 CST 2024 x86_64 GNU/Linux
-
iptables version:
iptables v1.8.4 (legacy)
- 运行
docker network create test_net
:
Error response from daemon: Failed to program FILTER chain: iptables failed: iptables --wait -I FORWARD -o br-3e42f43f0721 -j DOCKER: iptables v1.8.4 (legacy): Couldn't load target `DOCKER':No such file or directory
Try `iptables -h' or 'iptables --help' for more information.
(exit status 2)
root@AS6704T-5FDB:/volume1/natterISO # docker network create test_net
Error response from daemon: Failed to program FILTER chain: iptables failed: iptables --wait -I FORWARD -o br-0a438d66b352 -j DOCKER: iptables v1.8.4 (legacy): Couldn't load target `DOCKER':No such file or directory
Try `iptables -h' or 'iptables --help' for more information.
(exit status 2)
- docker版本:
Client:
Version: 25.0.3
API version: 1.44
Go version: go1.21.6
Git commit: 4debf41
Built: Tue Feb 6 21:13:00 2024
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 25.0.3
API version: 1.44 (minimum version 1.24)
Go version: go1.21.6
Git commit: f417435
Built: Tue Feb 6 21:13:08 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.7.13
GitCommit: 7c3aca7a610df76212171d200ca3811ff6096eb8
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0
from natter.
不知道什么原因,你的系统缺少了 Docker 相关的 chain。
如果是 NAS 专用操作系统,可以向有关厂商提单。
不过,可以尝试通过下面的方式手动补回来。
iptables -t filter -N DOCKER
iptables -t filter -N DOCKER-ISOLATION-STAGE-1
iptables -t filter -N DOCKER-ISOLATION-STAGE-2
iptables -t filter -N DOCKER-USER
iptables -t nat -N DOCKER
另外,也可以规避创建网络,就是在 docker-compose.yml
里加上 network_mode: bridge
。
from natter.
感谢回复,按照大佬的方法尝试手补,提示nat已存在,于是又运行了一次docker compose up
,成功了(虽然不知道咋回事)。
但在成功运行的log中有一行/usr/bin/env: ‘python3\r’: No such file or directory
,服务端口可以正常访问,不知这个抛出有何影响?
[+] Running 2/0
✔ Container natteriso-nginx-1 Created 0.0s
✔ Container natteriso-natter-nginx-cf-1 Created 0.0s
Attaching to natter-nginx-cf-1, nginx-1
nginx-1 | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx-1 | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
nginx-1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
nginx-1 | 10-listen-on-ipv6-by-default.sh: info: IPv6 listen already enabled
nginx-1 | /docker-entrypoint.sh: Sourcing /docker-entrypoint.d/15-local-resolvers.envsh
nginx-1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
nginx-1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
nginx-1 | /docker-entrypoint.sh: Configuration complete; ready for start up
nginx-1 | 2024/03/21 13:18:43 [notice] 1#1: using the "epoll" event method
nginx-1 | 2024/03/21 13:18:43 [notice] 1#1: nginx/1.25.4
nginx-1 | 2024/03/21 13:18:43 [notice] 1#1: built by gcc 12.2.0 (Debian 12.2.0-14)
nginx-1 | 2024/03/21 13:18:43 [notice] 1#1: OS: Linux 5.13.x
nginx-1 | 2024/03/21 13:18:43 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1024:4096
nginx-1 | 2024/03/21 13:18:43 [notice] 1#1: start worker processes
nginx-1 | 2024/03/21 13:18:43 [notice] 1#1: start worker process 21
nginx-1 | 2024/03/21 13:18:43 [notice] 1#1: start worker process 22
nginx-1 | 2024/03/21 13:18:43 [notice] 1#1: start worker process 23
nginx-1 | 2024/03/21 13:18:43 [notice] 1#1: start worker process 24
natter-nginx-cf-1 | 2024-03-21 13:18:44 [I] Natter v2.0.0-rc3
natter-nginx-cf-1 | 2024-03-21 13:18:49 [I]
natter-nginx-cf-1 | 2024-03-21 13:18:49 [I] tcp://192.168.1.107:2335 <--socket--> tcp://192.168.1.107:44463 <--Natter--> tcp://-:-
natter-nginx-cf-1 | 2024-03-21 13:18:49 [I]
natter-nginx-cf-1 | 2024-03-21 13:18:49 [I] Calling script: /opt/cf-redir.py
natter-nginx-cf-1 | /usr/bin/env: ‘python3\r’: No such file or directory
natter-nginx-cf-1 | /usr/bin/env: use -[v]S to pass options in shebang lines
natter-nginx-cf-1 | 2024-03-21 13:18:49 [I] LAN > - [ OPEN ]
natter-nginx-cf-1 | 2024-03-21 13:18:49 [I] LAN > - [ OPEN ]
natter-nginx-cf-1 | 2024-03-21 13:18:49 [I] LAN > - [ OPEN ]
natter-nginx-cf-1 | 2024-03-21 13:18:51 [I] WAN > - [ OPEN ]
natter-nginx-cf-1 | 2024-03-21 13:18:51 [I]
感谢
from natter.
原因是:你使用的是Windows的记事本编辑的脚本文件。
换行符格式与Linux不兼容。
请删除这个脚本,使用专用代码编辑器例如:VSCode, Notepad3 等,根据原文件重新修改。
from natter.
Sorry, 我自罚一杯,感谢回复。
from natter.
Related Issues (20)
- 【优化功能】能否新增一个web管理页面 HOT 1
- 【群晖】iptables报错,不认识 -m comment --comment NATTER_UUID=44dd0b25-3284-4d10-b9a2-001aff022804 HOT 4
- 使用 nattertool/natter:alpine 镜像,-m iptables 实际修改变为 nftables
- ufw阻止natter.py打洞 HOT 3
- CentOS 下使用 Docker,启动时出现 socket.gaierror HOT 4
- [Notice] 相关讨论已迁移至 Discussions 板块
- 内核模式启动失败 HOT 2
- 关于Nginx-Cloudflare配置参数求解 HOT 1
- 用cf-redir.py文件调用后报python3\r不知道哪里的问题 HOT 1
- 使用UDP协议遇到问题 HOT 4
- the port is supposedly open but it is not possible to log in. HOT 2
- A message sent on a datagram socket was larger than the internal message buffer or some other network limit, or the buffer used to receive a datagram into was smaller than the datagram itself. HOT 12
- 当 UPnP 扫描到的 URL 不含路径时,出现 ValueError HOT 1
- UPnP 服务端返回错误时,Natter 不能正常打印错误日志 HOT 1
- RouterOS 下 UPnP 不能正常工作 HOT 2
- Invalid format for X-Auth-Key header HOT 2
- uPnP无法使用 HOT 14
- fwd-socket: cannot forward port: Too many threads HOT 1
- 示例中的 cf-srv.py 失效 HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from natter.