Closed intervisionlord closed 5 years ago
@intervisionlord Debag file keeps track of outgoing messages from the plugin. Therefore, in this case, it is useless.
See, when you apply settings in the plugin or open a page with a user monitor, the plugin sends a request to the telegram servers and receives a response. When you write a message in a telegram client, you send a request to your server to the telegram server via the link that can be viewed on the User Monitor page. In this connection, you need to make sure that:
Here are more details on your server requirements: https://core.telegram.org/bots/webhooks#the-short-version Just keep in mind that the plugin currently does not support self-signed certificates.
I would also like to draw your attention to the fact that in the event of any damage from Telegram, we will not be able to find out about it. From my experience there were 2 such cases. Symptoms are the same as you described.
@intervisionlord Debag file keeps track of outgoing messages from the plugin. Therefore, in this case, it is useless.
See, when you apply settings in the plugin or open a page with a user monitor, the plugin sends a request to the telegram servers and receives a response. When you write a message in a telegram client, you send a request to your server to the telegram server via the link that can be viewed on the User Monitor page. In this connection, you need to make sure that:
- First, check whether your server is visible from the mantisbt outside your network (that is, from the Internet). Try to follow the link that you take on the page "user monitor". Your mantisbt should give a fatal error.
- Supplies all intermediate certificates to complete a verification chain.
Here are more details on your server requirements: https://core.telegram.org/bots/webhooks#the-short-version Just keep in mind that the plugin currently does not support self-signed certificates.
Yep, i receive an error INTERNAL APPLICATION ERROR
I'm using Let's Encrypt certificate and there was no problems with it for a long time
About details: You'll need a server that: ... Provides a supported, non-wildcard, verified or self-signed certificate.
WOW Problems with Wildcard??? This sounds strange - I'll try to change certificate...
Once again, make sure that the server issues a certificate along with an intermediate and root certificate. The browser on the PC usually has in its base and intermediate and root, so it does not give an error. But for example, a mobile browser may well argue against a seemingly working certificate, since most mobile browsers (like the telegram server client) have a limited base of root and intermediate certificates.
since most mobile browsers (like the telegram server client) have a limited base of root and intermediate certificates.
But it was working few days ago...
I suppose, that all chain is correct: Root:
Active ISRG Root X1 (self-signed) ISRG Root X1 Valid Certificate https://valid-isrgrootx1.letsencrypt.org/ ISRG Root X1 Revoked Certificate https://revoked-isrgrootx1.letsencrypt.org/ ISRG Root X1 Expired Certificate https://expired-isrgrootx1.letsencrypt.org/
Intermediate: Active Let’s Encrypt Authority X3 (IdenTrust cross-signed) Let’s Encrypt Authority X3 (Signed by ISRG Root X1) Backup Let’s Encrypt Authority X4 (IdenTrust cross-signed) Let’s Encrypt Authority X4 (Signed by ISRG Root X1) Retired Let’s Encrypt Authority X2 (IdenTrust cross-signed) Let’s Encrypt Authority X2 (Signed by ISRG Root X1) Let’s Encrypt Authority X1 (IdenTrust cross-signed) Let’s Encrypt Authority X1 (Signed by ISRG Root X1)
Have you already worked the plugin before this issue?
I mean, did your plugin stop receiving messages? That is, until this point everything worked correctly?
I mean, did your plugin stop receiving messages? That is, until this point everything worked correctly?
Exactly. It works perfectly before this issue
Let's try to see the logs of your web server. Try to find messages about attempts to connect from telegram servers to your web server in the intervals between sending a message to telegram chat.
There should be similar messages: source_ip - - [11 / Apr / 2019: 13: 56: 25 +0700] "POST /plugin.php?page=TelegramBot/hook&token=you_token_bot HTTP / 1.0" 200 961 "-" "-"
Nope... I have checked my iptables rules but there are no IP's of telegram servers, I'll try to check other IP's there
I also recommend that you check twitter for messages about problems with telegrams from other users in your region. Perhaps this is still a problem on the side of telegrams.
Well, i drop all my iptables reject rules and check info about problems from telegram side. And there are no reason why it doesnt work...
Sad ((
@intervisionlord Did you manage to solve the problem?
I can's solve it myself unfortunately, because i see nothing incorrect from my servers
@intervisionlord I am sorry that you have problems. Let me know if I can help you with anything else.
i try to ask in telegram support and they ask to test "getWebhookinfo" method. I can't uderstand how to use this information (see screenshot)
They ask you to check what method returns that they indicated to you. I have once again checked the documentation for their api and found that this method can indeed return an error message delivery message via webhook. The fact is that the plugin uses this method on the page "user monitor", but it returns there only if your webhook is successfully installed. Today I will figure out how to get additional information, and write you further instructions.
пт, 12 апр. 2019, 22:32 Andreas Lord notifications@github.com:
i try to ask in telegram support and they ask to test "getWebhookinfo" method. I can't uderstand how to use this information (see screenshot) [image: image] https://camo.githubusercontent.com/a9b55dd8999ab9f785581457db4a70b4c7b52da2/68747470733a2f2f696d672e7477722e73752f696d616765732f323031392f30342f31322f373456362e706e67
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mantisbt-plugins/TelegramBot/issues/28#issuecomment-482619275, or mute the thread https://github.com/notifications/unsubscribe-auth/AY0QVm-96KTcvoNlQYkBsxEDLYU7nYK_ks5vgKcjgaJpZM4coecu .
Please, let me know anytime if I could help to solve this issue.
@intervisionlord
While I am preparing a patch, try to get webhookinfo through a browser. Copy the following line into your browser's address bar. In the line, replace "<token>"
with your bot's token. Keep in mind that you should end up with something like this bot7623764: hdgugshf27HGDWHdjsdsh. That is, the word bot before the token is required!
https://api.telegram.org/bot<token>/getWebhookInfo
In response, the server will send you telegrams about the following line:
{"ok":true,"result":{"url":"https://you_d0main/plugin.php?page=TelegramBot/hook&token=you_token","has_custom_certificate":false,"pending_update_count":0,"max_connections":40}}
In my example, there is no error information, but you probably will have the last_error_message parameter.
Yep, i got this
{"ok":true,"result":{"url":"https://XXXXXXXXXXXXX/plugin.php?page=TelegramBot/hook&token=XXXXXXXXXXXXXXXXXXXX","has_custom_certificate":false,"pending_update_count":88,"max_connections":40}}
(some data hidden for some reasons)
Clear pending_count, reset webHook url and set it again... And now connection timeout (((
"has_custom_certificate":false,"pending_update_count":1,"last_error_date":1555171631,"last_error_message":"Connection timeout expired","max_connections":40
What was the first mistake?
In any case, the last error indicates that the server telegrams can not send you data. You need to check the availability of the IP address of your server from other Internet segments. It is possible that there is some problem with your ISP's routing. Do you use a proxy server?
i am using proxy only in plugin settings. From other segments my server is available. At this moment i have no ip's in firewall (except asian geoblock) and unfortunately telegram doesn't provide any service to check availability of server from their side.
What was the first mistake?
Actually i don't know, i tried to clear pending requests by changing webhookUrl to other resource and after that return valid url
You are from Russia?
Probably correctly ask, the server with the mantis is in the Russian segment of the Internet?
yep. Russia. But our ISP's can block only outcoming connections, that's why i am using proxy in plugin settings. There are no facts, that they are blocking incoming connections too. And that's why i try to get response from telegram support to check my server availability from their side.
Let's continue the conversation via email in Russian, if it is convenient for you. My email: igflocal@gmail.com
Ok
As a result, it was found out that the provider blocked outgoing traffic to the ip address of the Telegram server.
On settings page after saving changes i get a massage:
Telegram: Webhook is already set
But there is no reaction on messages from bot