• Resolved danivanc

    (@danivanc)


    Whenever I try to enter the Mailchimp API key, I get the error message:

    Mailchimp says: API Request Error – 503 :: on 1474 in /wp-content/plugins/mailchimp-for-woocommerce/includes/api/class-mailchimp-api.php

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support khungate

    (@khungate)

    Hi @danivanc, thanks for reaching out. Since you’re currently receiving a 503 error code, that’s coming from Mailchimp’s API gateway service (Akamai). The quick and easy way to see if the problem was temporary is to perform a fresh uninstall and install. If the problem persists, troubleshooting something like this is can be technical in nature and we suggest asking your host or a 3rd party developer for help if you’re not comfortable running the following commands:

    The first step is to see if your server can communicate directly with the Mailchimp API using the CURL command below:
    curl -v -X GET https://{$DATA_CENTER}.api.mailchimp.com/3.0/ecommerce/stores?apikey={$API_KEY}

    Please replace the $DATA_CENTER and the $API_KEY with your credentials. You can locate the $DATA_CENTER number in the URL, for example us19. If you receive a valid response from the Mailchimp API, that helps us solve the first step of determining whether or not your server has been IP Blacklisted by the API gateway.

    Once we’ve verified that you are able to make calls directly using CURL – we can then see if there might be another SSL handshake issue / OpenSSL / libCURL issue that might need to be addressed by your server admins.

    Give that a try and let us know if it solved the issue. I look forward to hearing back from you.

    Thread Starter danivanc

    (@danivanc)

    [techunit@sha19 ~]$ curl -v -X GET https://{us19}.api.mailchimp.com/3.0/ecommerce/stores?apikey={****************************46e-us19}
    * About to connect() to us19.api.mailchimp.com port 443 (#0)
    * Trying 23.7.204.86…
    * Connected to us19.api.mailchimp.com (23.7.204.86) port 443 (#0)
    * Initializing NSS with certpath: sql:/etc/pki/nssdb
    * CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath: none
    * SSL connection using TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
    * Server certificate:
    * subject: CN=wildcardsan2.mailchimp.com,OU=IT,O=”The Rocket Science Group, LLC”,L=Atlanta,ST=Georgia,C=US
    * start date: May 09 00:00:00 2018 GMT
    * expire date: Sep 07 12:00:00 2019 GMT
    * common name: wildcardsan2.mailchimp.com
    * issuer: CN=DigiCert ECC Secure Server CA,O=DigiCert Inc,C=US

    GET /3.0/ecommerce/stores?apikey=****************************46e-us19 HTTP/1.1
    User-Agent: curl/7.29.0
    Host: us19.api.mailchimp.com
    Accept: /

    < HTTP/1.1 503 Service Unavailable
    < Server: Apache
    < Content-Length: 126
    < Content-Type: application/json
    < ETag: “953d389c654d003dd7a67b8f959df97a:1452000673”
    < Cache-Control: max-age=43914
    < Date: Fri, 14 Dec 2018 18:46:25 GMT
    < Connection: keep-alive
    <
    * Connection #0 to host us19.api.mailchimp.com left intact
    {“type”:”akamai_error_message”,”title”:”akamai_503″,”status”:503,”ref_no”:”Reference Number: 00.8dac1502.1544813185.71c6db34″}

    Plugin Author ryanhungate

    (@ryanhungate)

    @danivanc just wanted to follow up with you on this thread… You’re getting a 503 error, and that shows that the Akamai API gateway is blocking requests from your web server. You can see at the bottom of that request print the error number.

    For anyone else looking at this thread – THIS IS THE PROPER WAY to diagnose API connection issues.

    The best thing to do – would be to get on with Mailchimp support, tell them your Akamai Reference number ( most likely you’ll have to do this again for a recent number ) and ask if they can look into why your server is being blocked.

    Another thing to note – it’s recommended to have a dedicated IP address for your domain, and make sure that PHP CURL is using the dedicated address by attempting this CURL request again in the command line in VERBOSE MODE by using the -v flag.

    Unfortunately there is nothing that we can do to resolve this in the plugin, it’s something that needs to be handled at the server level, and possibly by contacting Mailchimp’s support team through your account portal. Just request support and let them know about this post! 🙂

    Let us know if we can be of any other assistance at all.

    Hello,
    Same problem here. I followed your instruction on diagnosing the problem, and below you will find the result from curl -v -X GET command I run on web hosting server. (Its a shared hosting server with dedicated IP).

    enpangr@wayne [~]# curl -v -X GET https://{us18}.api.mailchimp.com/3.0/ecommerce/stores?apikey={98*************************bbac-us18}
    * About to connect() to us18.api.mailchimp.com port 443 (#0)
    * Trying 96.7.201.18… connected
    * Connected to us18.api.mailchimp.com (96.7.201.18) port 443 (#0)
    * Initializing NSS with certpath: sql:/etc/pki/nssdb
    * CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath: none
    * SSL connection using TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
    * Server certificate:
    * subject: CN=wildcardsan2.mailchimp.com,OU=IT,O=”The Rocket Science Group, LLC”,L=Atlanta,ST=Georgia,C=US
    * start date: May 09 00:00:00 2018 GMT
    * expire date: Sep 07 12:00:00 2019 GMT
    * common name: wildcardsan2.mailchimp.com
    * issuer: CN=DigiCert ECC Secure Server CA,O=DigiCert Inc,C=US
    > GET /3.0/ecommerce/stores?apikey=98c989b8765e1a1ee2c8bd24ba68bbac-us18 HTTP/1.1
    > User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.27.1 zlib/1.2.3 libidn/1.18 libssh2/1.4.2
    > Host: us18.api.mailchimp.com
    > Accept: */*
    >
    < HTTP/1.1 503 Service Unavailable
    < Server: Apache
    < Content-Length: 126
    < Content-Type: application/json
    < ETag: “953d389c654d003dd7a67b8f959df97a:1452000673”
    < Cache-Control: max-age=52939
    < Date: Thu, 28 Feb 2019 10:49:46 GMT
    < Connection: keep-alive
    <
    * Connection #0 to host us18.api.mailchimp.com left intact
    * Closing connection #0
    {“type”:”akamai_error_message”,”title”:”akamai_503″,”status”:503,”ref_no”:”Reference Number: 00.d82bf648.1551350986.47a807a2″}

    I have also contacted MailChimp, so below is their reply regarding our servers IP address reply :

    TJ (Mailchimp)
    Feb 26, 11:26 AM EST
    Hello –

    Thanks for reaching back out and providing your IP address – I don’t see a block on your IP so that’s good. But I do understand you may still be seeing errors and it would be helpful if you’re able to rerun whatever process you used that generated the first TXT error log you enclosed. I’d like to see a new Reference number so I can check the reason why Akamai may be blocking the API commands.

    Following this reply, I run a curl GET command and sent them the results. Their answer was as following:

    TJ (Mailchimp)
    Feb 27, 12:37 PM EST
    Hello –

    Thank you so much for getting that reference code – that was helpful in trying to troubleshoot this issue.

    It looks like the reason the API calls are being blocked are because of a Reputation bock. It looks like some SQL injections coming from that IP address. You may have a script or program that’s doing something that may appear to be doing something malicious.

    If it’s happening with multiple dedicated IP addresses, then you’ll want to check the integration, etc. to review what type of actions it’s taking.

    Your host provider may be able to determine the source of those SQL injections, so I’d recommend reaching back out to them. Please let me know if you have further questions on this!

    Thanks,
    TJ

    Thinking of the last reply from MailChimp, what comes in my mind is that the company who was assigned the development of the web site, has an identical web site running on their servers. This version works as expected without any problems.
    So I thought of the possibility that the fact of using the same API key from two different IPs, it is being recognized as an attack so our IP has been blocked.
    I created a new API key and set it up in our web site only, but with no luck till now.

    Now I am stuck !

    Any ideas ?

    Thank you in advance.

    Sincerely,
    Stamatis

    Error 503 was created by DoS Denial of Service

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘API Request Error – 503’ is closed to new replies.