mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #3628] 日志文件显示的时间与linux系统时间不一致 #2894
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#2894
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @caiwenmin on GitHub (Sep 23, 2023).
Original GitHub issue: https://github.com/fatedier/frp/issues/3628
Bug Description
frpc日志文件输出的时间比系统时间早8小时整,,导致连接不上frps服务端(服务端机器时间与客户端机器时间一致)
frpc Version
0.51.3
frps Version
0.51.3
System Architecture
linux/amd64
Configurations
就正常的配置
Logs
2023/09/23 11:50:06 [W] [service.go:133] login to server failed: EOF
Steps to reproduce
...
Affected area
@caiwenmin commented on GitHub (Sep 25, 2023):
查了一下问题,应该是time.Now()获取的默认是UTC时间的时区,代码中未做时区转换,这就导致了时间一直是UTC时区
@superzjg commented on GitHub (Sep 25, 2023):
曾在openwrt上安装zoneinfo-asia解决此问题,实际上就是补全了/usr/share/zoneinfo/Asia/Shanghai文件。但在华硕路由器的官改固件上,因为/zoneinfo/Asia/Shanghai文件不在/usr/share目录下,且无法修改,frpc日志时间就差8小时(但是可以与上述openwrt的frps正常连接使用)。以上都是linux内核系统,供参考。
@caiwenmin commented on GitHub (Sep 25, 2023):
frpc按照你的方法可以解决日志时间不对的问题,,frps也存在同样的问题要怎么做呀
@superzjg commented on GitHub (Sep 25, 2023):
方法一样的,重启一下系统。
@caiwenmin commented on GitHub (Sep 26, 2023):
frps是在debian 11系统上docker启动的,,时区还是和宿主机时区不一致,,设置了TZ也不生效
@superzjg commented on GitHub (Sep 26, 2023):
我刚测试不影响使用:frps 0.47的日志(差8小时),可以接受frpc0.51.3(时间正确)的连接:
2023/09/26 02:18:33 [I] [root.go:206] frps uses config file: /tmp/upload/.frps.ini
2023/09/26 02:18:46 [I] [service.go:200] frps tcp listen on 0.0.0.0:7000
2023/09/26 02:18:46 [I] [service.go:226] frps quic listen on quic 0.0.0.0:7000
2023/09/26 02:18:46 [I] [root.go:215] frps started successfully
2023/09/26 02:20:06 [I] [service.go:500] [5023f2c901278dbd] client login info: ip [[240e:xxx:xxx:xxxx::1]:57962] version [0.51.3] hostname [] os [linux] arch [arm64]
2023/09/26 02:20:06 [I] [tcp.go:66] [5023f2c901278dbd] [smb] tcp proxy listen port [12345]
2023/09/26 02:20:06 [I] [control.go:464] [5023f2c901278dbd] new proxy [smb] type [tcp] success
@caiwenmin commented on GitHub (Sep 26, 2023):
我frps 0.51.3(日志差8小时),frpc0.51.3(时间正确)
但是服务端接收不到客户端的连接
客户端日志
2023/09/26 19:03:01 [I] [root.go:220] start frpc service for config file [/var/etc/frp/frpc.conf]
服务端无任何日志
@superzjg commented on GitHub (Sep 26, 2023):
那就是配置文件问题,或者防火墙没打通,仔细检查,应该跟时间没关系
@caiwenmin commented on GitHub (Sep 26, 2023):
宝塔对应的端口都放开了呀,,唉,折腾好几天了
@github-actions[bot] commented on GitHub (Oct 27, 2023):
Issues go stale after 30d of inactivity. Stale issues rot after an additional 7d of inactivity and eventually close.