apache / dolphinscheduler

Apache DolphinScheduler is the modern data orchestration platform. Agile to create high performance workflow with low-code
https://dolphinscheduler.apache.org/
Apache License 2.0
12.88k stars 4.63k forks source link

[Bug] Http Alert bug:When an http alarm is triggered, requests other than those on ports 80 cannot be sent #16431

Closed 3043442162 closed 2 months ago

3043442162 commented 3 months ago

Search before asking

What happened

My English is not good, I added the Chinese description

I found the following issues while using the http alarm, the http alarm from dolphinScheduler did not seem to be able to send requests to ports other than 80. I configured port 8008 in the URL attribute of the http alarm, but this configuration did not seem to take effect. I was prompted by dolphinScheduler that port 80 of the host timed out. 我在使用http告警过程中发现如下问题,dolphinScheduler的http告警似乎无法将请求发送到80以外的端口,我在http告警中的URL属性中配置了8008端口,但是这个配置似乎没有生效,dolphinScheduler提示我主机的80端口连接超时。

My dolphinScheduler configuration: 我的dolphinScheduler告警配置 image

My dolphinScheduler3.1.2 alert-server log: image

My springboot application configuration is used to receive the above dolphinScheduler trigger http alarms 我springboot应用配置,用于接收上述dolphinScheduler触发http告警 image image

I'm pretty sure I turned off the firewall, and the alarm group and alarm policy configuration are fine, and I'd like the community's help 我很肯定我关闭了防火墙,并且告警组和告警策略配置没有问题,我希望得到社区的帮助

What you expected to happen

My springboot service should have received an http request from the dolphinScheduler, but it did no 我的springboot服务应该接收到来自dolphinScheduler的http请求,但是并没有

How to reproduce

Repeat step: Configure the http alarm, define web port 8008 in the url, start a springboot service with port 8008 and ensure that the url is the same, and use dolphinScheduler to trigger the alarm. 重现步骤:配置http告警,并在url中定义web端口为8008,启动一个端口为8008的springboot服务,并保证二者url相同,用dolphinScheduler触发告警

Anything else

This issue arises every time I trigger the http alarm task on dolphinScheduler 3.1.2 我每次在dolphinScheduler 3.1.2 上触发告http警任务都会出现这个问题

Version

3.1.x

Are you willing to submit PR?

Code of Conduct

github-actions[bot] commented 3 months ago

Search before asking

What happened

My English is not good, I added the Chinese description

I found the following issues while using the http alarm, the http alarm from dolphinScheduler did not seem to be able to send requests to ports other than 80. I configured port 8008 in the URL attribute of the http alarm, but this configuration did not seem to take effect. I was prompted by dolphinScheduler that port 80 of the host timed out. I found the following problem when using http alarms. The http alarm of dolphinScheduler seems to be unable to send requests to ports other than 80. I configured port 8008 in the URL attribute in the http alarm, but this configuration does not seem to take effect. dolphinScheduler prompts me The host's port 80 connection timed out.

My dolphinScheduler configuration: My dolphinScheduler alarm configuration image

My dolphinScheduler3.1.2 alert-server log: image

My springboot application configuration is used to receive the above dolphinScheduler trigger http alarms My springboot application is configured to receive http alarms triggered by the above dolphinScheduler image image

I'm pretty sure I turned off the firewall, and the alarm group and alarm policy configuration are fine, and I'd like the community's help I'm pretty sure I've turned off the firewall and there's nothing wrong with the alert group and alert policy configuration, I'd love some help from the community

What you expected to happen

My springboot service should have received an http request from the dolphinScheduler, but it did no My springboot service should receive the http request from dolphinScheduler, but it doesn't

How to reproduce

Repeat step: Configure the http alarm, define web port 8008 in the url, start a springboot service with port 8008 and ensure that the url is the same, and use dolphinScheduler to trigger the alarm. Steps to reproduce: Configure http alarms, define the web port in the URL as 8008, start a springboot service with port 8008, and ensure that the two URLs are the same, and use dolphinScheduler to trigger the alarm

Anything else

This issue arises every time I trigger the http alarm task on dolphinScheduler 3.1.2 This problem occurs every time I trigger the http alarm task on dolphinScheduler 3.1.2

Version

3.1.x

Are you willing to submit PR?

Code of Conduct

3043442162 commented 3 months ago

I tried to change the 8008 for both to 80, and I successfully received the request 我尝试过将二者的8008都换成80,我成功收到了请求

SbloodyS commented 3 months ago

Please try using curl in ds alert server's host to check whether the request is successful. @3043442162

3043442162 commented 3 months ago

Hello xiangzihao, thank you for your reply. Could you please tell me what to send to the alert-server host of ds with curl? For example, tell me the type and content of the request. I am a little confused.  I don't know about you. What do you want me to do with curl 你好xiangzihao,,感谢你的回复,你能告诉我具体使用curl发送什么到ds的alert-server host吗,比如告诉我请求的类型和内容,我有一点懵逼。我不太清楚你希望我用curl做什么

I think the alert-server service is working normally, and the contents of the jps and log files are normal. I configured both mail alarm and http alarm in one alarm group. After the task is over, mail alarm is normally triggered, but http alarm is normally sent only when the request host port is 80.  After I change port 8008 in the alarm url on the web ui, the alert server still displays a message indicating that port 80 denies connection 我认为alert-server服务工作正正常工作,jps和log文件内容都是正常的,我在一个告警组内同时配置了邮件告警和http告警,当任务结束后,邮件告警被正常触发,但http告警仅在请求主机端口为80时正常发送。我在web ui 中修改告警的url中端口为8008后,alert server仍会在日志内容会打印80端口拒绝连接

------------------ 原始邮件 ------------------ 发件人: "apache/dolphinscheduler" @.>; 发送时间: 2024年8月10日(星期六) 下午3:51 @.>; @.**@.>; 主题: Re: [apache/dolphinscheduler] Http Alert bug:When an http alarm is triggered, requests other than those on ports 80 cannot be sent (Issue #16431)

Please try using curl in ds alert server's host to check whether the request is successful. @3043442162

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

SbloodyS commented 3 months ago

Just test the url through curl on the alert server's host machine to see if it can be reached properly.

3043442162 commented 3 months ago

OK,OK,I  think I see what you mean.I test the url through curl on the alert server`s host machine .it can be reached properly. this is my ds http alert configuration.

this is my curl command.

this is the server,I use to handle  alert requests

I read the code for ds.the exception occurs on line HttpSender.java 98,this is the exception content.

The alert message appears to have been sent to the wrong port

alert 信息似乎被发送到了错误的端口

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2024年8月13日(星期二) 上午9:44 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [apache/dolphinscheduler] Http Alert bug:When an http alarm is triggered, requests other than those on ports 80 cannot be sent (Issue #16431)

Just test the url through curl on the alert server's host machine to see if it can be reached properly.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

SbloodyS commented 3 months ago

At present, I have not found the specific reason in 3.1.2, but the current http alarm plugin is not useful, I will reconstruct it in the near future, you can pay attention to the progress of #16469

3043442162 commented 3 months ago

I have known, thank you for your help, your reply has brought me some different investigation ideas.  I will continue to try to fix this problem, and I will inform you by email if there is any progress.  If I want to know about the ds alarm section, where should I look for information? 

我已知晓,感谢您的帮助,您的回复为我带来了一些不同的排查思路。我会继续尝试修复这个问题,如果有进展我会用邮件告知您。若我希望了解ds告警这块的知识,我应该去哪里查找资料。

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2024年8月15日(星期四) 下午4:39 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [apache/dolphinscheduler] [Bug] Http Alert bug:When an http alarm is triggered, requests other than those on ports 80 cannot be sent (Issue #16431)

At present, I have not found the specific reason in 3.1.2, but the current http alarm plugin is not useful, I will reconstruct it in the near future, you can pay attention to the progress of #16469

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

SbloodyS commented 3 months ago

What do you mean by If I want to know about the ds alarm section, where should I look for information?

Do you want to know where the http alarm code is? If so, you can start from here org.apache.dolphinscheduler.plugin.alert.http.HttpSender.

3043442162 commented 3 months ago

I'm sorry I didn't describe it very well.I downloaded and read some of the ds code.  But I do not know the principle of alarm, for example: if I want to know where the ds trigger alarm code is, what is the general alarm process, where should I go to find the information?  I only see the specific implementation of each alarm in the alarm module.  But who uses these modules and where do I not know

很抱歉我描述的不是特别好,我下载了且阅读了一些ds的代码。但是我不清楚告警的原理,举个例子:如果我希望知道ds触发告警代码在哪里,大致的整个告警流程是怎样,我应该去哪里找资料?我在告警模块中仅看到了各个告警的具体实现。但是谁使用了这些模块,在哪里使用,我并不知道

------------------ 原始邮件 ------------------ 发件人: "apache/dolphinscheduler" @.>; 发送时间: 2024年8月16日(星期五) 上午8:58 @.>; @.**@.>; 主题: Re: [apache/dolphinscheduler] [Bug] Http Alert bug:When an http alarm is triggered, requests other than those on ports 80 cannot be sent (Issue #16431)

What do you mean by If I want to know about the ds alarm section, where should I look for information?

Do you want to know where the http alarm code is? If so, you can start from here org.apache.dolphinscheduler.plugin.alert.http.HttpSender.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

SbloodyS commented 2 months ago

Fixed in #16484