Has anyone deployed an agent/bot with Chatwoot?
-
Hey there, I'm trying to add a bot to Chatwoot but I'm stuck at the rails command to do so. Tried to follow the description from https://www.chatwoot.com/docs/product/others/agent-bots where you should enter
# pass account_id attribute to create an account bot instead of global bot bot = AgentBot.create!(name: "Your Bot", outgoing_url: "http://localhost:8000")But none of the outgoing_url that I tried worked (localhost/127.0.0.1/container ip/actual domain), any idea what to put there?
Reply/errormessage is
/root/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activerecord-6.1.7.3/lib/active_record/connection_adapters/postgresql_adapter.rb:83:in `rescue in new_client': connection to server at "::1", port 5432 failed: Connection refused (ActiveRecord::ConnectionNotEstablished) Is the server running on that host and accepting TCP/IP connections? connection to server at "127.0.0.1", port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? /root/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/pg-1.4.1/lib/pg/connection.rb:740:in `connect_to_hosts': connection to server at "::1", port 5432 failed: Connection refused (PG::ConnectionBad) Is the server running on that host and accepting TCP/IP connections? connection to server at "127.0.0.1", port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? -
Hey there, I'm trying to add a bot to Chatwoot but I'm stuck at the rails command to do so. Tried to follow the description from https://www.chatwoot.com/docs/product/others/agent-bots where you should enter
# pass account_id attribute to create an account bot instead of global bot bot = AgentBot.create!(name: "Your Bot", outgoing_url: "http://localhost:8000")But none of the outgoing_url that I tried worked (localhost/127.0.0.1/container ip/actual domain), any idea what to put there?
Reply/errormessage is
/root/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/activerecord-6.1.7.3/lib/active_record/connection_adapters/postgresql_adapter.rb:83:in `rescue in new_client': connection to server at "::1", port 5432 failed: Connection refused (ActiveRecord::ConnectionNotEstablished) Is the server running on that host and accepting TCP/IP connections? connection to server at "127.0.0.1", port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? /root/.rbenv/versions/3.1.3/lib/ruby/gems/3.1.0/gems/pg-1.4.1/lib/pg/connection.rb:740:in `connect_to_hosts': connection to server at "::1", port 5432 failed: Connection refused (PG::ConnectionBad) Is the server running on that host and accepting TCP/IP connections? connection to server at "127.0.0.1", port 5432 failed: Connection refused Is the server running on that host and accepting TCP/IP connections? -
@msbt Did you figure this out? This looks like the bot code is not getting the correct environment variables to connect to postgresql.
-
@girish not yet I'm afraid, but if you have any ideas for me to try, I'll give it another go. I thought maybe other people deployed bots and knew how

-
@msbt I could reproduce it. Can you update to latest chatwoot and try the commands here - https://docs.cloudron.io/apps/chatwoot/#rails-console . It source the DB environment variables as well and after that it works for me.
-
M msbt marked this topic as a question on
-
M msbt has marked this topic as solved on
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
