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

[BUG] <The startup process should not have to read all files under define> #1085

Closed
1 task done
Mr-zhou315 opened this issue Jul 10, 2023 · 7 comments · Fixed by #1153
Closed
1 task done

[BUG] <The startup process should not have to read all files under define> #1085

Mr-zhou315 opened this issue Jul 10, 2023 · 7 comments · Fixed by #1153
Assignees
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Mr-zhou315
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

我碰到一个事件如下:
我的目录权限是非root,但是在进行自定义监控时候,在define目录下面创建了一个root权限的.yml监控示例文件,导致软件无法启动,报错
5e4d281e60db41ba40cfcac1fab3463
我删除了这个文件之后,依然无法启动,然后发现还有个隐藏的.yml.swp文件存在,也是root权限,导致无法启动,删除之后软件恢复正常。

建议软件启动可以跳过权限不正确、配置不正确的文件,然后日志中能提示。

Expected Behavior

应该是跳过权限不正确的文件。

Steps To Reproduce

我碰到一个事件如下:
我的目录权限是非root,但是在进行自定义监控时候,在define目录下面创建了一个root权限的.yml监控示例文件,导致软件无法启动,报错
5e4d281e60db41ba40cfcac1fab3463
我删除了这个文件之后,依然无法启动,然后发现还有个隐藏的.yml.swp文件存在,也是root权限,导致无法启动,删除之后软件恢复正常。

建议软件启动可以跳过权限不正确、配置不正确的文件,然后日志中能提示。

Environment

HertzBeat version(s):v1.3.1

Debug logs

我碰到一个事件如下:
我的目录权限是非root,但是在进行自定义监控时候,在define目录下面创建了一个root权限的.yml监控示例文件,导致软件无法启动,报错
5e4d281e60db41ba40cfcac1fab3463
我删除了这个文件之后,依然无法启动,然后发现还有个隐藏的.yml.swp文件存在,也是root权限,导致无法启动,删除之后软件恢复正常。

建议软件启动可以跳过权限不正确、配置不正确的文件,然后日志中能提示。

Anything else?

@Mr-zhou315 Mr-zhou315 added the bug Something isn't working label Jul 10, 2023
@hertzbeat
Copy link
Contributor

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I come across an event as follows:
My directory permission is non-root, but when performing custom monitoring, a .yml monitoring sample file with root permission was created under the define directory, which caused the software to fail to start and an error was reported
5e4d281e60db41ba40cfcac1fab3463
After I deleted this file, it still failed to start, and then I found that there was a hidden .yml.swp file, which was also rooted, which made it impossible to start. After deleting, the software returned to normal.

It is recommended that the software can skip files with incorrect permissions and incorrect configurations when starting the software, and then there will be prompts in the log.

Expected Behavior

It should be skipping files with incorrect permissions.

Steps To Reproduce

I come across an event as follows:
My directory permission is non-root, but when performing custom monitoring, a .yml monitoring sample file with root permission was created under the define directory, which caused the software to fail to start and an error was reported
5e4d281e60db41ba40cfcac1fab3463
After I deleted this file, it still failed to start, and then I found that there was a hidden .yml.swp file, which was also rooted, which made it impossible to start. After deleting, the software returned to normal.

It is recommended that the software can skip files with incorrect permissions and incorrect configurations when starting the software, and then there will be prompts in the log.

Environment

Hertz Beat version(s):v1.3.1

Debug logs

I come across an event as follows:
My directory permission is non-root, but when performing custom monitoring, a .yml monitoring sample file with root permission was created under the define directory, which caused the software to fail to start and an error was reported
5e4d281e60db41ba40cfcac1fab3463
After I deleted this file, it still failed to start, and then I found that there was a hidden .yml.swp file, which was also rooted, which made it impossible to start. After deleting, the software returned to normal.

It is recommended that the software can skip files with incorrect permissions and incorrect configurations when starting the software, and then there will be prompts in the log.

Anything else?

None

@hertzbeat hertzbeat changed the title [BUG] <启动过程不应该必须读取define下面的所有文件> [BUG] <The startup process should not have to read all files under define> Jul 10, 2023
@tomsun28 tomsun28 added good first issue Good for newcomers help wanted Extra attention is needed labels Jul 10, 2023
@luoxuanzao
Copy link
Contributor

I want help

@l646505418
Copy link
Contributor

I want help

feel free to start

@luoxuanzao
Copy link
Contributor

Is it to be modified to only record logs, and any exceptions are not thrown

@l646505418
Copy link
Contributor

Is it to be modified to only record logs, and any exceptions are not thrown

From my perspective, you can add logs in your local to track and debug but not push such changes to remote.

@luoxuanzao
Copy link
Contributor

Is it to be modified to only record logs, and any exceptions are not thrown

From my perspective, you can add logs in your local to track and debug but not push such changes to remote.

So is it unnecessary to fix this bug?

@l646505418
Copy link
Contributor

Is it to be modified to only record logs, and any exceptions are not thrown

From my perspective, you can add logs in your local to track and debug but not push such changes to remote.

So is it unnecessary to fix this bug?

I mistake your original meaning, you can do what you want to fix

@tomsun28 tomsun28 linked a pull request Aug 4, 2023 that will close this issue
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants