Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

服务端启动报错“ invalid character '<' looking for beginning of value” #9

Closed
layui0320 opened this issue Jun 23, 2020 · 10 comments

Comments

@layui0320
Copy link

报错信息

2020/06/23 19:05:21 [I] [service.go:149] frps tcp listen on 0.0.0.0:2333
2020/06/23 19:05:21 [I] [service.go:191] http service listen on 0.0.0.0:8880
2020/06/23 19:05:21 [I] [service.go:212] https service listen on 0.0.0.0:8443
2020/06/23 19:05:21 [I] [service.go:242] Dashboard listen on 0.0.0.0:8233
2020/06/23 19:05:21 [I] [root.go:204] Start frps success
2020/06/23 19:05:26 [I] [service.go:359] client login info: ip [192.168.2.1:13083] version [0.28.2] hostname [] os [windows] arch [amd64]
2020/06/23 19:05:26 [W] [service.go:301] invalid character '<' looking for beginning of value
2020/06/23 19:05:26 [D] [service.go:344] Accept new mux stream error: EOF

客户端和服务端都重编译过,一样报错。
在ubuntu18.04和Windows10 部署frps均是一样报错
也排除因修改网站设置问题(原封不动的源码)。
客户端可以正常使用natfrp网站上的配置文件

@layui0320
Copy link
Author

服务器配置:

[common]
bind_addr = 0.0.0.0
bind_port = 2333
kcp_bind_port = 2333
dashboard_port = 8233
dashboard_user = admin
dashboard_pwd = admin
vhost_http_port = 8880
vhost_https_port = 8443
# log_file = ./frps.log
token = 2020
bind_udp_port = 7001
# 以下项目无需修改
max_pool_count = 50
tcp_mux = true
authentication_timeout = 0
log_level = debug
log_max_days = 3
# 是否启用 Api 功能
api_enable = true
# Api 服务器地址
api_baseurl = http://example.com.com/api/
api_token = SakuraFrpToken

客户端配置:

[common]
server_addr = 61.140.xxx.xxx
server_port = 2333
tcp_mux = true
protocol = tcp
user = 4827900f6400c2e1
token = 2020
dns_server = 223.6.6.6
 
[test1]
privilege_mode = true
type = tcp
local_ip = 127.0.0.1
local_port = 3389
remote_port = 18320
use_encryption = false
use_compression = false

在网站的流量统计能显示到服务器:
TIM截图20200623192644

@CN-YoungYang
Copy link

你好,你这个问题是怎么解决的。

@layui0320
Copy link
Author

你好,你这个问题是怎么解决的。

配置文件的api文件没有修改。。。

@layui0320
Copy link
Author

layui0320 commented Jul 22, 2021

你好,你这个问题是怎么解决的。

原因在这里:

# 是否启用 Api 功能
api_enable = true
# Api 服务器地址
api_baseurl = http://example.com.com/api/
api_token = SakuraFrpToken

api域名没有更改,改了实际地址就行了

@CN-YoungYang
Copy link

哦哦,这个地址 就改成我 域名的地址吧, api_baseurl = http://XXXXX.com/api/

@layui0320
Copy link
Author

哦哦,这个地址 就改成我 域名的地址吧, api_baseurl = http://XXXXX.com/api/

你试试,因为时间有点久了,我当时部署成功后就没用了。。。如果可以就反馈下,以便后面的人排错

@layui0320 layui0320 changed the title 客户端启动报错“ invalid character '<' looking for beginning of value” 服务端启动报错“ invalid character '<' looking for beginning of value” Jul 22, 2021
@CN-YoungYang
Copy link

嗯,好的。我去试试

@CN-YoungYang
Copy link

上述方法,有用。 invalid character '<' looking for beginning of value 这个报错解决了

@layui0320
Copy link
Author

上述方法,有用。 invalid character '<' looking for beginning of value 这个报错解决了

总的来说,还是粗心才出现的问题,哈哈哈

@CN-YoungYang
Copy link

继续对参数,现在是 API问题。囧。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants