Answers.Body: <p>The issue seems to be with the automatic address geocoding (finding the latitude and longitude using google maps api)</p>
  
  <p>It's probably that your server has a firewall that restrict it to connect to other websites. You should disable the geocoding feature or let the server connect to google maps api server</p>
  
  <p>You'll have a few other features that require the server to connect to external sites (eg. most of the payment processors), it's probably worthwhile opening up more the security, or at least keep in mind when you have a problem that it might be the issue</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-13T13:08:54.563Z
Answers.Text: Thanks, that was it. I had allowed my server to make connections out to maps.googleapis.com but I think they may have changed IP address recently.
Answers.UserDisplayName: Tim Vaughan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-12T09:26:10.493Z
Answers.LastActivityDate: 2015-05-12T09:26:10.493Z
Answers.UserDisplayName: Xavier
Body: <p>I'm running Civi 4.5.2 on Drupal 7. When I try to create a new organisation, I get a "Connection refused error" with this backtrace. Any ideas what is wrong?</p>
  
  <pre><code>backTrace
  #0 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/Error.php(191): CRM_Core_Error::backtrace()
  #1 [internal function](): CRM_Core_Error::handle(Object(PEAR_Error))
  #2 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(PEAR_Error))
  #3 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/packages/PEAR.php(566): PEAR_Error-&gt;PEAR_Error("Connection refused", 111, 16, (Array:2), NULL)
  #4 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/packages/Net/Socket.php(156): PEAR-&gt;raiseError("Connection refused", 111)
  #5 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/packages/HTTP/Request.php(737): Net_Socket-&gt;connect("maps.googleapis.com", 80, NULL, NULL, NULL)
  #6 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Utils/Geocode/Google.php(128): HTTP_Request-&gt;sendRequest()
  #7 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/BAO/Address.php(394): CRM_Utils_Geocode_Google::format((Array:22))
  #8 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/BAO/Address.php(151): CRM_Core_BAO_Address::fixAddress((Array:22))
  #9 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/BAO/Address.php(128): CRM_Core_BAO_Address::add((Array:22), TRUE)
  #10 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/BAO/Location.php(71): CRM_Core_BAO_Address::create((Array:36), TRUE, NULL)
  #11 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php(358): CRM_Core_BAO_Location::create((Array:36), TRUE)
  #12 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Contact/Form/Contact.php(975): CRM_Contact_BAO_Contact::create((Array:36), TRUE, FALSE, TRUE)
  #13 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/Form.php(328): CRM_Contact_Form_Contact-&gt;postProcess()
  #14 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php(158): CRM_Core_Form-&gt;mainProcess()
  #15 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php(129): CRM_Core_QuickForm_Action_Upload-&gt;realPerform(Object(CRM_Contact_Form_Contact), "upload")
  #16 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload-&gt;perform(Object(CRM_Contact_Form_Contact), "upload")
  #17 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller-&gt;handle(Object(CRM_Contact_Form_Contact), "upload")
  #18 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/Controller.php(356): HTML_QuickForm_Page-&gt;handle("upload")
  #19 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(117): CRM_Core_Controller-&gt;run()
  #20 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(304): CRM_Utils_Wrapper-&gt;run("CRM_Contact_Form_Contact", "New Contact", (Array:1))
  #21 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(75): CRM_Core_Invoke::runItem((Array:13))
  #22 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
  #23 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/drupal/civicrm.module(457): CRM_Core_Invoke::invoke((Array:3))
  #24 [internal function](): civicrm_invoke("contact", "add")
  #25 /srv/domain.tld/public/htdocs/includes/menu.inc(517): call_user_func_array("civicrm_invoke", (Array:2))
  #26 /srv/domain.tld/public/htdocs/index.php(21): menu_execute_active_handler()
  #27 {main}
  </code></pre>
  
Tags: <4.5>
Title: "Connection Refused" error when trying to create a new contact
ThreadText: # "Connection Refused" error when trying to create a new contact
  
  (Asked by: username_0 on 2015-05-12)
  
  I'm running Civi 4.5.2 on Drupal 7. When I try to create a new organisation, I get a "Connection refused error" with this backtrace. Any ideas what is wrong?
  
  ```
  backTrace
  #0 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/Error.php(191): CRM_Core_Error::backtrace()
  #1 [internal function](): CRM_Core_Error::handle(Object(PEAR_Error))
  #2 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(PEAR_Error))
  #3 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/packages/PEAR.php(566): PEAR_Error->PEAR_Error("Connection refused", 111, 16, (Array:2), NULL)
  #4 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/packages/Net/Socket.php(156): PEAR->raiseError("Connection refused", 111)
  #5 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/packages/HTTP/Request.php(737): Net_Socket->connect("maps.googleapis.com", 80, NULL, NULL, NULL)
  #6 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Utils/Geocode/Google.php(128): HTTP_Request->sendRequest()
  #7 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/BAO/Address.php(394): CRM_Utils_Geocode_Google::format((Array:22))
  #8 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/BAO/Address.php(151): CRM_Core_BAO_Address::fixAddress((Array:22))
  #9 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/BAO/Address.php(128): CRM_Core_BAO_Address::add((Array:22), TRUE)
  #10 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/BAO/Location.php(71): CRM_Core_BAO_Address::create((Array:36), TRUE, NULL)
  #11 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php(358): CRM_Core_BAO_Location::create((Array:36), TRUE)
  #12 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Contact/Form/Contact.php(975): CRM_Contact_BAO_Contact::create((Array:36), TRUE, FALSE, TRUE)
  #13 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/Form.php(328): CRM_Contact_Form_Contact->postProcess()
  #14 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php(158): CRM_Core_Form->mainProcess()
  #15 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/QuickForm/Action/Upload.php(129): CRM_Core_QuickForm_Action_Upload->realPerform(Object(CRM_Contact_Form_Contact), "upload")
  #16 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/packages/HTML/QuickForm/Controller.php(203): CRM_Core_QuickForm_Action_Upload->perform(Object(CRM_Contact_Form_Contact), "upload")
  #17 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/packages/HTML/QuickForm/Page.php(103): HTML_QuickForm_Controller->handle(Object(CRM_Contact_Form_Contact), "upload")
  #18 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/Controller.php(356): HTML_QuickForm_Page->handle("upload")
  #19 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Utils/Wrapper.php(117): CRM_Core_Controller->run()
  #20 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(304): CRM_Utils_Wrapper->run("CRM_Contact_Form_Contact", "New Contact", (Array:1))
  #21 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(75): CRM_Core_Invoke::runItem((Array:13))
  #22 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:3))
  #23 /srv/domain.tld/public/htdocs/sites/all/modules/civicrm/drupal/civicrm.module(457): CRM_Core_Invoke::invoke((Array:3))
  #24 [internal function](): civicrm_invoke("contact", "add")
  #25 /srv/domain.tld/public/htdocs/includes/menu.inc(517): call_user_func_array("civicrm_invoke", (Array:2))
  #26 /srv/domain.tld/public/htdocs/index.php(21): menu_execute_active_handler()
  #27 {main}
  
  ```
  
  **Tags:** 4.5
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-05-12. Score: 1 | Accepted answer
  
  The issue seems to be with the automatic address geocoding (finding the latitude and longitude using google maps api)
  
  It's probably that your server has a firewall that restrict it to connect to other websites. You should disable the geocoding feature or let the server connect to google maps api server
  
  You'll have a few other features that require the server to connect to external sites (eg. most of the payment processors), it's probably worthwhile opening up more the security, or at least keep in mind when you have a problem that it might be the issue
  
  > **Comments:**
  > **username_0**: Thanks, that was it. I had allowed my server to make connections out to maps.googleapis.com but I think they may have changed IP address recently.  
  
  ---
  
  