Skip to content

windows环境下 tailx模式报错 #500

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

Closed
ahbll opened this issue May 23, 2018 · 6 comments
Closed

windows环境下 tailx模式报错 #500

ahbll opened this issue May 23, 2018 · 6 comments

Comments

@ahbll
Copy link
Contributor

ahbll commented May 23, 2018

复现过程操作步骤:

在windows环境下使用tailx模式采集日志, fail to newMeta 导致无法采集日志

@wonderflow
Copy link
Contributor

可以写一下 fail to newMeta 的完整错误日志吗

@ahbll
Copy link
Contributor Author

ahbll commented May 24, 2018

错误日志:
2018/05/24 17:24:42 [ERROR][github.com/qiniu/logkit/reader] meta.go:75: fail to newMeta cannot create meta\runner.20180523165621_789356349\C:_logs2_test.log, err:mkdir meta\runner.20180523165621_789356349\C:_logs2_test.log: The directory name is invalid.
2018/05/24 17:24:42 [ERROR][github.com/qiniu/logkit/reader] meta.go:92: check dir meta\runner.20180523165621_789356349\C:_logs2_test.log error mkdir meta\runner.20180523165621_789356349\C:_logs2_test.log: The directory name is invalid.
2018/05/24 17:24:42 [ERROR][github.com/qiniu/logkit/reader] mutireader.go:374: Runner[runner.20180523165621] NewActiveReader for matches C:\logs2\test.log error mkdir meta\runner.20180523165621_789356349\C:_logs2_test.log: The directory name is invalid., ignore this match...

@ahbll
Copy link
Contributor Author

ahbll commented May 24, 2018

reader配置:
"reader": {
"mode": "tailx",
"runner_name": "runner.20180523165621",
"encoding": "UTF-8",
"datasource_tag": "datasource",
"expire": "100h",
"stat_interval": "3m",
"name": "runner.20180523165621",
"log_path": "C:\logs2\*",
"read_from": "oldest"
}

@wonderflow
Copy link
Contributor

可以先手动写一下 "meta":"meta" 解决一下,看上去是windows不支持自动生成的meta文件名

@ahbll
Copy link
Contributor Author

ahbll commented May 24, 2018

应该是win环境下自动生成的meta\runner.20180523165621_789356349\C:_logs2_test.log目录名有问题

@unknwon
Copy link
Contributor

unknwon commented May 26, 2018

meta\runner.20180523165621_789356349\C:_logs2_test.log 路径重新出现了盘符(C:),猜测是 *path.Join 时出现的问题

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

3 participants