Search code examples
jsfprimefacescaptchaconnection-timeout

p:captcha throws "HTTP Status 500 - Connection timed out: connect"


I'm using PrimeFaces <p:captcha> component. It works fine on local machine but when I deploy project to the server it throws "HTTP Status 500 - Connection timed out: connect".

Here is my xhtml code:

<f:facet name="header">
    <p:messages/>    
    <p:captcha label="Captcha" language="ru"
               validatorMessage="Вы робот! Попробуйте пройти проверку еще раз."
               rendered="#{loginBean.wrongLogins >= loginBean.wrongLoginsAvailable}"/>
</f:facet>
<h:panelGroup>
    <h:commandButton id="login"
                     ajax="false"
                     type="submit"
                     actionListener="#{loginBean.doLogin}"
                     value="#{login['login']}"
                     >
    </h:commandButton>
</h:panelGroup>

UPDATE!!! There's important thing I forgot to say: captcha displays fine and show success checkbox when you click on it. Timeout error happens when I click "login" button and before my own user verification.


Solution

  • The problem was not in captcha but in proxy server. Outcoming request was locked so google couldn't response my captcha. After configuring auth on proxy from java application it works fine!