Thread: USPS Error

Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 31
  1. #21
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: USPS Web Tools Error

    ok I have a unique one here...

    - Running Zen Cart 1.5.3
    - Using USPS Version 2015_0531_K7

    Sometimes it returns rates, sometimes it takes a while and gives: "Error 28: connect() timed out!"

    Thus far I'v tried:

    Reinstall module with the following steps:
    - Uninstalled in Admin (Modules -> Shipping -> USPS)
    - Copied/replaced freshly downloaded version K7 files
    - Installed in admin (Modules -> Shipping -> USPS)

    Used curltester.php
    - All other Curl test come back "Good" including "http://testing.shippingapis.com/ShippingAPITest.dll"
    - However "http://production.shippingapis.com/ShippingAPI.dll" is only working about 40% of the time.

    Swapped out USPS username for a known working one, same inconsistent results

    modified the address in
    PHP Code:
    doCurlTest() 
    for
    PHP Code:
    echo 'Connecting to USPS (port 80)...<br>'
    with the following addresses:
    production.shippingapis.com/ShippingAPI.dll
    http://production.shippingapis.com/ShippingAPI.dll
    https://production.shippingapis.com/ShippingAPI.dll
    then I tried http://testing.shippingapis.com/ShippingAPITest.dll and that worked

    tried the
    PHP Code:
    doCurlTest() 
    with and without the 2nd parameter of: 80 (except on the https address)

    Seems like once it fails it fails for a while, then it works and returns rates and then it fails again.

    Anyone with thoughts or similar experiences?

  2. #22
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: USPS Web Tools Error

    Sounds like intermittent problems connecting to USPS ...

    Normally, it either works or does not work ... the intermittent usually happens when USPS is having issues ... this is a link to one thing that checks the USPS connection:
    http://www.shippingapimonitor.com/history.html?api=usps

    You could check with your domain hosting company to see if they are having issues or explain to them that you are having intermittent issues so that they can check for these problems ...

    Usually, you will get logs for this problem to help identify times that this has been happening ... they will be in the /logs directory (/cache on older versions of Zen Cart) ... but this issue is either your Domain or USPS ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #23
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: USPS Web Tools Error

    Quote Originally Posted by Ajeh View Post
    Sounds like intermittent problems connecting to USPS ...

    Normally, it either works or does not work ... the intermittent usually happens when USPS is having issues ... this is a link to one thing that checks the USPS connection:
    http://www.shippingapimonitor.com/history.html?api=usps

    You could check with your domain hosting company to see if they are having issues or explain to them that you are having intermittent issues so that they can check for these problems ...

    Usually, you will get logs for this problem to help identify times that this has been happening ... they will be in the /logs directory (/cache on older versions of Zen Cart) ... but this issue is either your Domain or USPS ...
    Thank for the response Linda.

    Nothing in the /logs folder. Sorry I should have said that earlier.

    The link shows 2 minutes of downtime, which wouldn't account for what I'm having.

    Also I checked on 10+ different stores, on a variety of hosting companies (people really need to remove the /extras folder IMHO)
    and even the one from the same hosting company and all had "Good" responses, all the way down.

    I added
    dofsockTest('production.shippingapis.com',80); and received

    PHP Code:
    Connecting to USPS (port 80)...

    Warningfsockopen() [function.fsockopen]: unable to connect to production.shippingapis.com:80 (Connection timed outin /home4/****/public_html/extras/curltester.php on line 166


    Error Num
    110MessageConnection timed out 

  4. #24
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: USPS Web Tools Error

    Actually, I think I have discovered the issue, not the exact solution but...if I swap out the url for the IP address it works...I do the same in the includes/modules/shipping/usps.php (see below) it returns rates...

    Example:
    PHP Code:
    ...

        switch (
    MODULE_SHIPPING_USPS_SERVER) {
          case 
    'production':
          
    $usps_server '56.0.34.43';
          
    $api_dll 'shippingapi.dll';
          break;

    ... 
    results from modified curltester.php

    PHP Code:
    Connecting to USPS (port 80)...
    Error 28connect() timed out!

    Connection Details:
    Array
    (
        [
    url] => "HTTP://production.shippingapis.com/ShippingAPI.dll"
        
    [content_type] => 
        [
    http_code] => 0
        
    [header_size] => 0
        
    [request_size] => 0
        
    [filetime] => -1
        
    [ssl_verify_result] => 0
        
    [redirect_count] => 0
        
    [total_time] => 5.042165
        
    [namelookup_time] => 0.048846
        
    [connect_time] => 0
        
    [pretransfer_time] => 0
        
    [size_upload] => 0
        
    [size_download] => 0
        
    [speed_download] => 0
        
    [speed_upload] => 0
        
    [download_content_length] => -1
        
    [upload_content_length] => -1
        
    [starttransfer_time] => 0
        
    [redirect_time] => 0

    PHP Code:
    Connecting to USPS via IP (port 80)...
    GOODCURL Connection successful.

    Connection Details:
    Array
    (
        [
    url] => "HTTP://56.0.34.43/ShippingAPI.dll"
        
    [content_type] => text/xml
        
    [http_code] => 200
        
    [header_size] => 454
        
    [request_size] => 209
        
    [filetime] => -1
        
    [ssl_verify_result] => 0
        
    [redirect_count] => 0
        
    [total_time] => 0.164458
        
    [namelookup_time] => 0.000165
        
    [connect_time] => 0.081003
        
    [pretransfer_time] => 0.081085
        
    [size_upload] => 37
        
    [size_download] => 212
        
    [speed_download] => 1289
        
    [speed_upload] => 224
        
    [download_content_length] => 212
        
    [upload_content_length] => 37
        
    [starttransfer_time] => 0.16444
        
    [redirect_time] => 0


  5. #25
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: USPS Web Tools Error

    Seriously, talk to your hosting provider and explain to them the problem you are having with USPS and mention your observation of the IP vs the domain name which has never been an issue nor solution on USPS issues. That seems like a server-specific DNS name-resolution issue.

    The debug logs will only generate if you have in the USPS shipping module the Debug set to Logs ...

    NOTE: the cURL tester will not generate debug logs just the shipping module from either Shipping Estimator or Checkout shipping page ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  6. #26
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: USPS Web Tools Error

    If you add something to the shopping cart and test via the Shipping Estimator, about how many times does USPS fail over 20 attempts? Or is it more attempts before it fails?

    So far I cannot get it to fail and I am trying to reproduce the issue ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #27
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: USPS Web Tools Error

    Seems like a DNS problem on the server.

    A test could be to TEMPORARILY add a hosts file entry:
    Code:
    56.0.34.43  production.shippingapis.com   #temporary for testing only, Oct 2015; should be removed ASAP
    If the problems stop immediately after putting that in the hosts file but re-occur again after removing it, then that strongly suggests that the server's ability to do name resolution is broken.

    Do remember to remove it from the hosts file after you're done testing, in case USPS changes the IP address in the future.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  8. #28
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: USPS Web Tools Error

    Quote Originally Posted by Ajeh View Post
    If you add something to the shopping cart and test via the Shipping Estimator, about how many times does USPS fail over 20 attempts? Or is it more attempts before it fails?

    So far I cannot get it to fail and I am trying to reproduce the issue ...
    Now, with the IP they all come correct. Before I could do 20 requests and 15 would work, then another 20 and every one fail.

    I'm contacting hosting provider, hopefully they can resolve the issue, correctly. My suspicions are a DNS issue.

    Thanks for the help! Hopefully it will help someone else too!

  9. #29
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: USPS Web Tools Error

    Thanks for the update ... please let us know what the resolve is for this issue once you have found it with your hosting provider ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  10. #30
    Join Date
    Dec 2011
    Location
    Wisconsin, USA
    Posts
    674
    Plugin Contributions
    21

    Default Re: USPS Web Tools Error

    Just wanted to post an update, the hosting provider confirmed the issue.

    However they are saying it is the USPS server has banned the store's IP. But since USPS servers run multiple servers by forcing to use a server that hasn't banned that store it's working. They say they are contacting USPS to resolve the issue with being banned from that server.'

    I'll update when I hear more

 

 
Page 3 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Usps returning error.
    By exdealsad in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 14 Jul 2011, 02:22 PM
  2. USPS Error
    By Delights in forum Built-in Shipping and Payment Modules
    Replies: 10
    Last Post: 22 Nov 2008, 06:32 AM
  3. USPS error
    By bluealice in forum Built-in Shipping and Payment Modules
    Replies: 9
    Last Post: 2 Jan 2008, 09:43 PM
  4. USPS Error
    By Ruger22C in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 22 Mar 2007, 11:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR