title: Liferay jsonws not accessible from remote location
body: <p>My liferay portlet jsonws not accessible from remote location but i can access it using localhost</p>
  
  <pre><code>example [http://localhost:8050/MySite-portlet/api/secure/jsonws] is accesible on the lacal machine
  but when i try to access it remotely using the external ip e.g
  [http://120.23.223.24:8050/MySite-portlet/api/secure/jsonws] its returning me the Connection refused error
  </code></pre>
  
  <p>However <code>[http://120.23.223.24:8050/api/jsonws]</code> and <code>[http://120.23.223.24:8050/web/MySite]</code> is working</p>
  
  <p>my portal-ext.properties file contains the following entries</p>
  
  <pre><code>open.id.auth.enabled=
  auth.login.site.url=
  auth.login.community.url=
  company.default.home.url=
  default.logout.page.path=
  default.landing.page.path=
  redirect.url.ips.allowed=
  jsonws.servlet.hosts.allowed=
  json.servlet.hosts.allowed=
  json.web.service.enabled=true
  jsonws.web.service.public.methods=*
  json.service.auth.token.enabled=true
  jsonws.web.service.strict.http.method=false
  </code></pre>
  
  <p>I am using liferay-tomcat 6.1.0</p>
  
  <p>Below is the error I am getting</p>
  
  <pre><code>type Exception report
  
  message
  
  description The server encountered an internal error () that prevented it from fulfilling this request.
  
  
      exception
  
      `java.net.ConnectException: Connection refused: connect
          java.net.PlainSocketImpl.socketConnect(Native Metho
  
  d)
      java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
      java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
      java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
      java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
      java.net.Socket.connect(Socket.java:529)
      java.net.Socket.connect(Socket.java:478)
      sun.net.NetworkClient.doConnect(NetworkClient.java:163)
      sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
      sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
      sun.net.www.http.HttpClient.&lt;init&gt;(HttpClient.java:233)
      sun.net.www.http.HttpClient.New(HttpClient.java:306)
      sun.net.www.http.HttpClient.New(HttpClient.java:323)
      sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:860)
      sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:801)
      sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:726)
      sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1049)
      java.net.URL.openStream(URL.java:1010)
      com.liferay.portal.jsonwebservice.JSONWebServiceServlet.service(JSONWebServiceServlet.java:136)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      com.liferay.portal.kernel.servlet.PortalClassLoaderServlet.service(PortalClassLoaderServlet.java:98)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
      com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
      sun.reflect.GeneratedMethodAccessor218.invoke(Unknown Source)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      java.lang.reflect.Method.invoke(Method.java:597)
      com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:54)
      $Proxy431.doFilter(Unknown Source)
      com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
      com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:121)
      com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:201)
      com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
      com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
      com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
      com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:69)
      com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:203)
      com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:105)
      com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)`
  </code></pre>