Re: Telegram messages are not received

545 views
Skip to first unread message
Message has been deleted

Rudi Giesler

unread,
Jan 13, 2020, 2:05:37 AM1/13/20
to Jesus Ekie, rapidpro-dev
Hi

I'm not part of the RapidPro development team, but maybe I can help.

The first place I would look is the channel logs (Org -> Channel -> Channel logs). You can then go into detail of each message and see if RapidPro is receiving the requests, and what the error is if RapidPro is not processing the requests correctly.

If RapidPro is not receiving requests, then I would look at the connection between Telegram and Courier, since that's the path that inbound messages will take.

Have a look where Telegram is sending the messages, and ensure that the route goes to Courier. The setup is usually that all /c/ URLs go to courier, so make sure that Telegram is sending to a /c/ URL, and that all /c/ URLs are actually being routed to Courier.

You can also increase the log level on Courier (there's an undocumented log_level configuration parameter), to better see what's happening when Telegram is making the request to Courier.

Regards,
Rudi.

On Sun, Jan 12, 2020 at 3:25 PM Jesus Ekie <ekieya...@gmail.com> wrote:
Hello RapidPro team,

We have setup the lastest version of RapidPro with the four components. SMS messages are received and flows are correctly created/executed with old/new editors.

As for telegram, we are able to add a channel but when we send the trigger keyword through that channel RapidPro don't respond.
Can you please help us locate the problem?

Thank you.

--
You received this message because you are subscribed to the Google Groups "rapidpro-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rapidpro-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rapidpro-dev/ceb7126a-b549-4e83-81bc-176c93f9fe59%40googlegroups.com.
Message has been deleted

Rudi Giesler

unread,
Jan 13, 2020, 6:47:42 AM1/13/20
to Jesus Ekie, rapidpro-dev
It depends on how you're doing your configuration for Courier, if you're using environment variables it will be COURIER_LOG_LEVEL=debug

On Mon, Jan 13, 2020 at 1:05 PM Jesus Ekie <ekieya...@gmail.com> wrote:
Hi Rudi, 

Thank you for your answer.
I just check the log of the Telegram channel and it's empty.

Can you give me more details about the log_level parameter (where can I set and what value do you recommend)?

Thank you.
To unsubscribe from this group and stop receiving emails from it, send an email to rapidp...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "rapidpro-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rapidpro-dev...@googlegroups.com.
Message has been deleted

Rudi Giesler

unread,
Jan 15, 2020, 2:09:02 AM1/15/20
to Jesus Ekie, rapidpro-dev
Ah I see, I misunderstood your message. So outbound messages are the issue? Can you see anything by clicking the notepad icon to the right of the message (not sure if the message details page exists for messages in Outbound or not)

Is Courier and RapidPro using the same instance and db number for Redis? 

Can you check to see if there's anything in the Redis queues?

Is the celery worker up and running and connected to the same Redis queue? (I'm not sure what all the celery worker is still responsible for, so not sure if this could be an issue or not)

Also, make sure you're either running the stable versions of everything: https://github.com/rapidpro/rapidpro#stable-versions , or the latest version of each component.



On Tue, Jan 14, 2020 at 11:14 PM Jesus Ekie <ekieya...@gmail.com> wrote:
Hello Rudi,

Thank you for your orientation.
We have set it in environment variables but nothing is coming out. Telegram messages are still stuck in the outbox and are not delivered to the users.

--
You received this message because you are subscribed to the Google Groups "rapidpro-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rapidpro-dev...@googlegroups.com.
Message has been deleted

James Oguya

unread,
Jul 19, 2020, 7:04:20 PM7/19/20
to rapidpro-dev
I had to append ?sslmode=disable to COURIER_DB because I was getting the following error message:
{"message":"Error","data":[{"type":"error","error":"pq: SSL is not enabled on the server"}]}

https://stackoverflow.com/a/21959214

On Thursday, 30 January 2020 19:46:47 UTC+3, Jesus Ekie wrote:
Hello Rudi, 

I think I have to set a domain name and an SSL certificate on the server to have everything up correctly.

I will try that and come back to tell you if it get rid of the problem.

Samuel Rutunda

unread,
Oct 14, 2020, 10:59:22 AM10/14/20
to rapidpro-dev
I am facing a similar error, telegram is unable to reach rapidpro, I have set the courier log to debug and I get no answer, even when I check the logs of nginx there seem to be no traffic coming from telegram, any help?

Nic Pottier

unread,
Oct 14, 2020, 11:45:49 AM10/14/20
to Samuel Rutunda, rapidpro-dev
If you don't see anything in your logs about Telegram trying to
deliver the message, then it is likely that you don't have the
hostname properly set in your settings file. RapidPro has to tell
Telegram where to deliver messages so that needs to be properly set to
a domain that can be reached from anywhere on the internet.
> To unsubscribe from this group and stop receiving emails from it, send an email to rapidpro-dev...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rapidpro-dev/ce15f586-5e69-4c28-bddb-7afb163a3f86n%40googlegroups.com.

Samuel Rutunda

unread,
Oct 15, 2020, 9:32:22 AM10/15/20
to rapidpro-dev
I think the domain is well set, since we can access the rapidpro site from the outside and we even set the surveyor app which is working.
However we have added a letsencrypt docker container on top of the infrastructure, as rapidpro is a component of the solution we are implementing, therefore traffic to rapidpro must come redirected by the letsencrypt 

Nic Pottier

unread,
Oct 15, 2020, 2:08:01 PM10/15/20
to Samuel Rutunda, rapidpro-dev
When you add a Telegram channel we set the webhook Telegram sends
events to. That is based on the domain set for your brand:
https://github.com/nyaruka/rapidpro/blob/master/temba/channels/models.py#L759

You'll want to make sure this is correctly set in your settings. If
you aren't seeing anything come into your webserver when you send a
telegram message from a handset then this is misconfigured.

Nic

On Thu, Oct 15, 2020 at 6:32 AM Samuel Rutunda
> To view this discussion on the web visit https://groups.google.com/d/msgid/rapidpro-dev/2d8a25e1-df7d-4cbb-9b9d-9d5ae73d53e8n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages