Customer.io to Supabase: cannot assign requested address fix
The error `dial tcp [IPv6 address]:5432: connect: cannot assign requested address: query failed` means Customer.io tried to reach Supabase's direct database host over IPv6 and its network couldn't. Enable Supabase's IPv4 add-on, or connect through the Supavisor pooler host, which accepts IPv4.
Sohail Hussain7 min readShort answer
- The direct Supabase database host is IPv6-only unless the project has the IPv4 add-on, and the connecting side has no usable IPv6 route to it.
- Quickest fix: copy the session pooler host from the Supabase Connect dialog into Customer.io, since pooler hosts are documented to answer on IPv4.
- If you need the direct host, enable Supabase's paid IPv4 add-on instead.
You paste your Supabase connection details into Customer.io, run the test, and get this:
dial tcp [IPv6 address]:5432: connect: cannot assign requested address: query failed
This is a developer integration problem, not an email problem. Nothing in your sending setup is broken. The fix happens in Supabase and in the Customer.io connection form. Mailneo doesn't connect to either service in this setup, so there is nothing product-specific to configure here.
Why it happens
Read the error left to right:
dial tcp [address]:5432is a Go-style network client opening a TCP connection to port 5432, the Postgres default. The bracketed address is IPv6, which tells you DNS returned an IPv6 record.connect: cannot assign requested addressis the client's operating system refusing to open that socket, usually because the machine has no IPv6 address or route to the outside world.query failedis the wrapper from the calling service, here Customer.io, noting that the connection or query step did not complete.
So the failure happens before Postgres sees anything. Your password, user, database name and permissions are not the problem yet.
The most likely cause: Supabase's direct connection host (the db.{project-ref}.supabase.co form) has historically resolved to IPv6 only unless the project has the IPv4 add-on. A service on an IPv4-only network cannot reach it. People on Supabase's community forum report this failure when linking Customer.io to Supabase, and the add-on is the usual resolution they describe.
I can't tell from the error alone which network Customer.io connects from, so treat this as the likely cause, not a certainty. Supabase's connection documentation is the authority on current behavior, including add-on pricing and which hosts answer on IPv4; check it before you spend money.
Confirm it is your case
Run two lookups from any terminal, using your real project reference in place of the placeholder:
dig +short AAAA db.example-project-ref.supabase.co
dig +short A db.example-project-ref.supabase.co
If the first returns an address and the second returns nothing, the direct host is IPv6-only for your project.
Fix 1: use the Supavisor session pooler host
Supabase documents its pooler hostnames as reachable over IPv4. For most Customer.io setups this is the quickest fix, and it doesn't need the add-on.
- In the Supabase dashboard, open your project and click Connect.
- Choose the Session pooler connection method. The dialog shows host, port, database and user.
- Copy the host and user from the dialog rather than typing them. The region and prefix differ by project, and the dialog is the source of truth. The shape looks like this (placeholder values only):
host: {pooler-host-from-dialog}
port: 5432
database: postgres
user: postgres.{project-ref}
- Note the username. On the pooler it is
postgres.followed by your project reference, not plainpostgres. Using the plain name is a common second failure and returns a "tenant or user not found" style error. - In Customer.io, edit the connection and replace host, port and user with those values. Keep the password and database as they were.
- Run the connection test again.
Use session mode first
Session mode (port 5432) supports prepared statements. Transaction mode (port 6543) does not, and some clients rely on them. If queries fail oddly in transaction mode, go back to session mode.
Fix 2: enable the IPv4 add-on
Choose this if you want to keep the direct host, or a tool needs a direct, non-pooled session.
- In the Supabase dashboard, open your project's settings and find the Add-ons section.
- Enable the IPv4 address add-on.
- Wait for the change to apply, then re-run the
dig +short Alookup above. It should now return an address. - Retest the connection in Customer.io with the same direct host.
The add-on is a paid extra on Supabase's side, so read their current pricing page before enabling it. Dashboard labels can move; if you can't find it, search the dashboard for "IPv4".
Which fix to pick
| Situation | Pick |
|---|---|
| Customer.io only needs to run queries | Session pooler host |
| You want to avoid a recurring add-on charge | Session pooler host |
| A tool needs a direct session or session-level features the pooler lacks | IPv4 add-on |
| You already pay for the add-on on this project | Either; the direct host now works |
What to check if the network error is gone but it still fails
Once the network path works, a different error means something else is wrong.
Network restrictions
If you enabled network restrictions on the Supabase project, add the IP addresses Customer.io connects from. Take that list from Customer.io's own documentation, because it can change.
SSL
Require SSL if Customer.io offers the option; Supabase expects encrypted connections.
Permissions
Give the sync a dedicated read-only role instead of the postgres superuser:
create role customerio_sync with login password 'use-a-long-random-password';
grant usage on schema public to customerio_sync;
grant select on public.example_table to customerio_sync;
On the pooler, the username then becomes customerio_sync.{project-ref}.
Row level security
A role without the right policies or the bypassrls attribute can connect fine and still read zero rows. If the sync succeeds but returns nothing, check this next.
Checklist before you retest
- The host in Customer.io is copied from the Supabase Connect dialog, not typed from memory.
- Pooler connections use the
postgres.{project-ref}style username. - Port matches the mode: 5432 for session, 6543 for transaction.
- If you stayed on the direct host,
dig +short Areturns an address. - Network restrictions, if enabled, include Customer.io's connection IPs.
- The role you use can
selectfrom the tables you sync.
If nothing works
Contact Customer.io support if the test still fails with the pooler host; they can tell you what their connection path supports. Contact Supabase support if the dig output looks wrong or the add-on shows as active but the A record is missing.
Send Customer.io the full error string, the time of the failed test, and the host you entered (never the password). Send Supabase the project reference and the output of the two dig lookups.
Subject: Supabase connection test fails with "cannot assign requested address"
Hi,
Testing my Supabase connection fails with:
dial tcp [IPv6 address]:5432: connect: cannot assign requested address: query failed
Time of the failed test: {timestamp and timezone}
Host entered: {host, no password}
Port and user: {port}, {user}
Already tried: session pooler host {yes/no}, IPv4 add-on {yes/no}
Can you tell me whether the connection originates from an IPv4-only network, and which IP addresses I should allow?
Thanks,
{your name}
Common questions
Is this a Customer.io bug?
Not necessarily. The error shows the connecting side could not use the IPv6 address it resolved, which is a mismatch between the two networks. Customer.io support can say what their side supports.
Can I just use the IPv4 address of the direct host?
Without the add-on, the direct host has had no IPv4 address to use. Either enable the add-on or switch to the pooler host.
Does the pooler change what Customer.io can query?
For normal read queries, no. Session mode behaves like a regular connection. Only features that need a direct, long-lived session may differ, which is when the add-on makes sense.
Will this affect my email sending?
No. The error only concerns the data connection between Customer.io and your database. Campaigns and delivery are separate.
Explore: Email Marketing Strategy
Related Articles
XX000 Tenant or user not found: Customer.io to Supabase fix
The Supabase pooler returns "XX000 - Tenant or user not found: query failed" when it can't match your login to a project. Set the username to postgres.{your-project-ref}, not plain postgres, and copy the pooler host and port from your project's connection settings. Test the string in psql first.
414 Request-URI Too Large in n8n's Amazon SES node: fix
The error 414 Request-URI Too Large in n8n's AWS SES node means a server in the path refused a request whose URL was too long, which a long HTML body can cause when it travels in the URL. Send through the SES v2 API with an HTTP Request node, or use SES SMTP.
Access denied, bad outbound sender: Outlook cold email fix
"Access denied, bad outbound sender" (550 5.1.8) means Microsoft 365 has put your mailbox on its restricted users list for spam-like sending. An admin must unblock it under Restricted entities in the Microsoft Defender portal. Then clean your list, lower your volume and resume gradually.
Acoustic Campaign "Application error" on login: bookmark fix
Acoustic Campaign shows "application error" at login when you open it from a bookmark saved while you were logged in, because the bookmark carries the old session. Log out, type your pod URL (campaign-us-[X].goacoustic.com) into the address bar, log in, then save a fresh bookmark.
Ready to supercharge your email marketing?
Start sending smarter emails with AI-powered campaigns. No credit card required.
Get Started Free