Thanks for the list of things to try. I completed them and I still get the connection failed message when I try to log in to the app store. I have had this computer for 2.5 yrs. and never had this problem before.
For whatever reason, I can now log in to the apps store with one of my ids. It says my other account no longer exists so I can not update pages and numbers. It will not let me rebuy these programs under the working account because my computer recognizes that I bought them before.