• Resolved Sean Conklin

    (@seanconklin)


    Hello,

    After today’s update we noticed the below error. We contacted the host to confirm all is good on the server. We also disconnected and re-connected the site with Mailchimp but had the same outcome.

    CURL error :: bind failed with errno 99: Cannot assign requested address

    Mailchimp says: API Request Error – 500 :: CURL error :: bind failed with errno 99: Cannot assign requested address on 2193 in /www/wp-content/plugins/mailchimp-for-woocommerce/includes/api/class-mailchimp-api.php

    It’s worth noting this error did not happen with a client that uses WP Engine – so the host seems to matter here. PHP compilation more likely. I tried but the technician at the hosting blames the plugin. I see similar though slightly different trouble reports posted today.

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author ryanhungate

    (@ryanhungate)

    @seanconklin can you please try adding an override on the outbound IP address to see if that has anything to do with it? We have documentation on this feature here.

    Thread Starter Sean Conklin

    (@seanconklin)

    Hello. I’ve added that line for MAILCHIMP_USE_OUTBOUND_IP to wp-config.php with the IP address, but it still gives me the same error messages.

    I double verified the IP address by running these:

    – Ping to the FTP server address
    – SSH terminal running dig +short myip.opendns.com @resolver1.opendns.com

    It seems that I have the correct IP in there. I’ve alerted the web host as well. It’s managed hosting by SiteDistrict.com not WHM/cPanel. We use Cloudflare as well.

    Hello,

    I have the same problem since doing the recent update. Please help.

    Thank you

    Plugin Author ryanhungate

    (@ryanhungate)

    @seanconklin would you be able to double check that the CONSTANT you used is indeed the only instance of it – and that the IP is correct… but then try to save your Audience settings again?

    I’m sorry to ask but this has come up before where the constant may have been written twice and it didn’t work.

    Thread Starter Sean Conklin

    (@seanconklin)

    Hi @ryanhungate I added a quick code snippet that echo’s out the IP address from that constant. It’s definitely correct per those two verifications I mentioned earlier.

    Web hosting ports and routing could be blocking the way this plugin works. Or it could be the way PHP is compiled. Would a phpinfo() report be helpful?

    I had disconnected Mailchimp and attempted re-connecting. So I see no Audience page, only the CONNECT ACCOUNT button and the error message Mailchimp says: API Request Error – 500 :: CURL error :: bind failed with errno 99: Cannot assign requested address on 2193 in /www/wp-content/plugins/mailchimp-for-woocommerce/includes/api/class-mailchimp-api.php.

    When I click the button, overcome the browser pop-up blocker and log-in, the main page refreshes with those error messages in my original message.

    Plugin Author ryanhungate

    (@ryanhungate)

    @seanconklin i think we may be in a spot where the way the plugin has been configured to use the outbound IP address is just not going to work out. We may even have to issue a patch on this for situations like this.

    Can you please set that MAILCHIMP_USE_OUTBOUND_IP as false instead and see if this resolves the issue that you’re seeing?

    For context – the reason we added this particular outbound IP change is because a lot of folks were getting blocked by Akamai – the Mailchimp API gateway when using shared hosts. This works for the majority of installs, but apparently we have more work to do.

    If you could please try that quick tweak on the wp-config file that might help us in our troubleshooting too.

    Thread Starter Sean Conklin

    (@seanconklin)

    Yes setting it to define( 'MAILCHIMP_USE_OUTBOUND_IP', false ); and re-connecting does fix the issue ??

    Plugin Author ryanhungate

    (@ryanhungate)

    @seanconklin thanks for the follow up. Much appreciated. We may use this as the solution – but I would really like to dig in and find out why using your site’s IP address for the outgoing CURL IP was causing trouble.

    Hi all,

    For us mere mortals could you please give some detail about how we can fix this issue? Or is it a matter of waiting for a patch for the plugin?

    This thread is marked as resolved but I don’t understand the fix that was applied here. Seems like its a bit of a hot fix and not a permanent solution.

    Thanks

    • This reply was modified 2 years, 4 months ago by jasmaunder.
    Plugin Author ryanhungate

    (@ryanhungate)

    @jasmaunder that’s a fair question ?? This one is tough to call a bug because it has to do with another long standing issue related to the Akamai API gateway blocking requests from stores using servers on shared hosting.

    The reason for this enhancement was to automatically set the proper domain’s IP for all outgoing API requests. In the “shared host” situations (unless defined in that constant ) it was using the first IP address on the network, and that is by design of how PHP CURL works. That was causing trouble too, so we decided to fix it.

    The solution for anyone running into this particular issue is to simply add a single line of code to your wp-config.php file and it will fall back to the defaults that you had previously.

    define( 'MAILCHIMP_USE_OUTBOUND_IP', false );

    If you have any other questions – please open up another support ticket so this doesn’t get messy over here and ping people that have already fixed the issue on their end.

    Thank you, I had the bug too ! ??

    so where in the wp-config.php file do i add the line of define( ‘MAILCHIMP_USE_OUTBOUND_IP’, false );

    after this line
    /* Add any custom values between this line and the “stop editing” line. */

    @ryanhungate Thank you for this work around.

    Hi Ryan,

    adding define( ‘MAILCHIMP_USE_OUTBOUND_IP’, false ); solved the problem but caused nearly 20,000 pending scheduled action in a shop I care for. That blocked all subscription renewals. Deleting the code again solved this problem. I am fine with rolling back the plugin version, but I wanted to let you know. Maybe this information helps!

    Dirk

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘CURL error after upgrading v2.7 — bind failed with errno 99’ is closed to new replies.