FIXED - captcha not showing in create account 6.04FIXED - captcha not showing in create account 6.04https://liferay.dev/en/c/message_boards/find_thread?p_l_id=119785333&threadId=54224392024-03-29T13:33:13Z2024-03-29T13:33:13ZRE: FIXED - captcha not showing in create account 6.04Ankita Guptahttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=1135715772019-05-08T14:01:55Z2019-05-08T14:01:55ZHi steve,<br /><br />I am unable to run recaptcha on Liferay 6.2.<br /><br />Getting error.<br />13:50:47,274 ERROR [http-bio-2020-exec-1][ReCaptchaImpl:105] java.net.ConnectException: Connection refused: connect<br />java.net.ConnectException: Connection refused: connect<br /> at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)<br /> at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)<br /> at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)<br /> at java.net.AbstractPlainSocketImpl.connect(Unknown Source)<br /> at java.net.PlainSocketImpl.connect(Unknown Source)<br /> at java.net.SocksSocketImpl.connect(Unknown Source)<br /> at java.net.Socket.connect(Unknown Source)<br /> at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)<br /> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br /> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br /> at java.lang.reflect.Method.invoke(Unknown Source)<br /> at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)<br /> at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:130)<br /> at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)<br /> at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)<br /> at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)<br /> at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)<br /> at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)<br /> at com.liferay.portal.util.HttpImpl.URLtoByteArray(HttpImpl.java:1411)<br /> at com.liferay.portal.util.HttpImpl.URLtoByteArray(HttpImpl.java:1038)<br /> at com.liferay.portal.util.HttpImpl.URLtoString(HttpImpl.java:1069)<br /> at com.liferay.portal.kernel.util.HttpUtil.URLtoString(HttpUtil.java:395)<br /> at com.liferay.portal.captcha.recaptcha.ReCaptchaImpl.validateChallenge(ReCaptchaImpl.java:102)<br /> at com.liferay.portal.captcha.recaptcha.ReCaptchaImpl.validateChallenge(ReCaptchaImpl.java:139)<br /> at com.liferay.portal.captcha.simplecaptcha.SimpleCaptchaImpl.check(SimpleCaptchaImpl.java:88)<br /> at com.liferay.portal.captcha.CaptchaImpl.check(CaptchaImpl.java:55)<br /> at com.liferay.portal.kernel.captcha.CaptchaUtil.check(CaptchaUtil.java:42)<br /><br />even if configured portalext properties:<br />##<br /># Enable or not reCaptcha<br />##<br />#recaptcha.enabled=true<br /><br />captcha.engine.impl=com.liferay.portal.captcha.recaptcha.ReCaptchaImpl<br />#captcha.engine.impl=com.liferay.portal.captcha.simplecaptcha.SimpleCaptchaI<br /><br />captcha.check.portal.create_account=true<br />captcha.check.portal.send_password=true<br />captcha.check.portlet.message_boards.edit_category=false<br />captcha.check.portlet.message_boards.edit_message=false<br /><br />##<br /># Urls to access reCaptcha services<br />##<br />captcha.engine.recaptcha.url.script=http://api.recaptcha.net/challenge?k=<br />captcha.engine.recaptcha.url.noscript=http://api.recaptcha.net/noscript?k=<br />captcha.engine.recaptcha.url.verify=https://www.google.com/recaptcha/api/siteverify<br /><br />##<br />#reCaptcha domain specific keys<br />##<br />captcha.engine.recaptcha.key.private=6LcTuqAUAAAAAJ8dgf_W9EyCL7hWJVpwzXmmRU8b<br />]<br />captcha.engine.recaptcha.key.public=LcTuqAUAAAAAIVTzOmpcgvIFJG_0lZHcrKBOMkr]Ankita Gupta2019-05-08T14:01:55ZRE: FIXED - captcha not showing in create account 6.04Olaf Kockhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=575441632015-08-17T13:26:41Z2015-08-17T13:26:41ZAs this thread seems to stay on top in the "Recent Changes" I'll add some explanation: I've split an unrelated new question (that resurrected this thread) into <a href="https://www.liferay.com/en_GB/community/forums/-/message_boards/message/57544096">its own thread</a>. Please continue there - back to sleep for this old thread.Olaf Kock2015-08-17T13:26:41ZRE: UPDATED - captcha not showing in create account 6.04Hsatish Mhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=71522832011-01-19T06:53:35Z2011-01-19T06:53:35ZHi Tina,<br /><br />I am also facing the same problem. In my local meshine captch is showing properly,<br />but in server it is not showing.<br />I am using liferay 5.1.2 with tomcat 6.0<br />Have you solved your problem, if it solved can you share with me how you solved.<br /><br />Thanks,<br />Satish.satish M2011-01-19T06:53:35ZRE: UPDATED - captcha not showing in create account 6.04HJames Falknerhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=67858612010-12-13T14:43:55Z2010-12-13T14:43:55ZI don't know if this will work but in the past on headless systems one had to set <span style="font-family: Courier New">-Djava.awt.headless=true</span> on the JVM command line (or through code) to keep the graphics subsystems from throwing exceptions when GUI libraries weren't present.James Falkner2010-12-13T14:43:55ZRE: UPDATED - captcha not showing in create account 6.04HTina Fasulohttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=67788992010-12-12T15:05:20Z2010-12-12T15:05:20ZHi,<br />I have the same problem in Liferay 5.2.3. On my pc, which runs on Ubuntu 10.04 with GUIs, captcha was showed. When I installed it on a server, which runs on Ubuntu server 10.04 LTS, in command-line modality, the captcha stopped to work.<br /><br />Do you think this problem is due to "headless"? Do I have to install further libraries, like java.awt.headless?<br /><br />Thank you! <br /><br />Furthermore, is there a mechanism to use recaptcha service in Liferay 5.2.3 or a way to integrate it?<br /><br />Bye <br /><br />TinaTina Fasulo2010-12-12T15:05:20ZRE: UPDATED - captcha not showing in create account 6.04Samuel Liuhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=54417732010-07-28T22:09:12Z2010-07-28T22:09:12ZGlad to assist you Hamish!<br /><br />SamSamuel Liu2010-07-28T22:09:12ZRE: UPDATED - captcha not showing in create account 6.04Hamish Campbellhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=54416832010-07-28T21:43:13Z2010-07-28T21:43:13ZSam, thanks for the excellent help, Steve got Recaptcha up and running which has solved the problem. <img alt="emoticon" src="@theme_images_path@/emoticons/big_grin.gif" ><br /><br />HamishHamish Campbell2010-07-28T21:43:13ZRE: UPDATED - captcha not showing in create account 6.04Samuel Liuhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=54385392010-07-28T16:49:02Z2010-07-28T16:49:02ZHi Steve,<br /><br />Yeah I would think it installed as headless if you used apt to get it. Hrm, yes Recaptcha is plugged in out of the box, so go ahead and add those properties to your portal-ext with your keys. Hopefully this will solve your problem.<br /><br />Alternatively you can also disable captcha, though I doubt that's optimal.<br /><br />A part of me wonders if SimpleCaptcha's failure to render a captcha might have to do with the fact that Ubuntu server doesn't come with graphical utilities. There may be an unaccounted for dependency -- I can do a test on this but it will take some time. Until then your best bet is Recaptcha I think. (I also prefer recaptcha -- the captchas tend to be clearer and it's Google technology so it's rock-solid).<br /><br />Let me know how it goes!<br /><br />Warm regards,<br />SamSamuel Liu2010-07-28T16:49:02ZRE: UPDATED - captcha not showing in create account 6.04Steve Dowdinghttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=54355142010-07-28T12:40:26Z2010-07-28T12:40:26Z<div class="quote-title">Samuel Liu:</div><blockquote>Hi Hamish,<br /><br />So basically we didn't change any code relating to the captcha in the new version. Out of curiosity, did you set a variable somewhere called java.awt.headless, because Ubuntu Server is a headless OS?<br /><br />Warm regards,<br />Sam</blockquote><br /><br />Hi Sam,<br /><br />I'm part of VisionOn.tv and did the server setup. First thing to say is I'm no expert.<br /><br />All I did with java was: sudo apt-get install openjdk-6-jre<br />As java runtime installed it reported it was installing 'headless', we did no other configuration of java.<br /><br />We'll probably want to try with recaptcha for better accessibilty. I read somewhere Recaptcha is enabled in liferay 6? What wasn't clear to me was whether we needed to create an account with recaptcha.net or if it somehow functions 'out-of-the-box' as part of Liferay? You've answered that for us already, so we'll sign ourselves up for a key.<br /><br />ThanksSteve Dowding2010-07-28T12:40:26ZRE: UPDATED - captcha not showing in create account 6.04Hamish Campbellhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=54347442010-07-28T11:44:13Z2010-07-28T11:44:13ZThanks Sam, looking into it now.<br /><br />One thing we did which might affect it, we installed a new copy of Liferay 6.04 on our server and imported the database from our 6.03 build, we also downgraded our operating system form Ubuntu server 10.04 to 8.04 in the move.Hamish Campbell2010-07-28T11:44:13ZRE: UPDATED - captcha not showing in create account 6.04Samuel Liuhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=54304112010-07-28T01:02:56Z2010-07-28T01:02:56Z<html><head></head><body>Hi Hamish,<br><br>Here are all the possible Captcha settings that you can specify in portal-ext.properties. Perhaps you should try enabling recaptcha's captcha service? (http://www.recaptcha.net) -- if ours doesn't work for you maybe theirs will. I'm still unable to reproduce the bug right now.<br><br><pre><code>
##
## Captcha
##
#
# Set the maximum number of captcha checks per portlet session. Set this
# value to 0 to always check. Set this value to a number less than 0 to
# never check. Unauthenticated users will always be checked on every request
# if captcha checks is enabled.
#
captcha.max.challenges=1
#
# Set whether or not to use captcha checks for the following actions.
#
captcha.check.portal.create_account=true
captcha.check.portal.send_password=true
captcha.check.portlet.message_boards.edit_category=false
captcha.check.portlet.message_boards.edit_message=false
#
# Set the engine used to generate captchas. reCAPTCHA uses an external
# service that must be configured independently but provides an audible
# alternative which makes the captcha accessible to the visually impaired.
#
#captcha.engine.impl=com.liferay.portal.captcha.recaptcha.ReCaptchaImpl
captcha.engine.impl=com.liferay.portal.captcha.simplecaptcha.SimpleCaptchaImpl
#
# reCAPTCHA
#
captcha.engine.recaptcha.key.private=
captcha.engine.recaptcha.key.public=
captcha.engine.recaptcha.url.script=http://api.recaptcha.net/challenge?k=
captcha.engine.recaptcha.url.noscript=http://api.recaptcha.net/noscript?k=
captcha.engine.recaptcha.url.verify=http://api-verify.recaptcha.net/verify
#
# SimpleCaptcha
#
#
# Set the height and width for captcha images generated by SimpleCaptcha.
#
captcha.engine.simplecaptcha.height=50
captcha.engine.simplecaptcha.width=150
#
# Input a list of comma delimited class names that implement
# nl.captcha.backgrounds.BackgroundProducer. These classes will be randomly
# used by SimpleCaptcha to generate a background for a captcha image.
#
captcha.engine.simplecaptcha.background.producers=nl.captcha.backgrounds.FlatColorBackgroundProducer,nl.captcha.backgrounds.GradiatedBackgroundProducer,nl.captcha.backgrounds.SquigglesBackgroundProducer,nl.captcha.backgrounds.TransparentBackgroundProducer
#
# Input a list of comma delimited class names that implement
# nl.captcha.gimpy.GimpyRenderer. These classes will be randomly
# used by SimpleCaptcha to gimp a captcha image.
#
#captcha.engine.simplecaptcha.gimpy.renderers=nl.captcha.gimpy.RippleGimpyRenderer
captcha.engine.simplecaptcha.gimpy.renderers=nl.captcha.gimpy.BlockGimpyRenderer,nl.captcha.gimpy.DropShadowGimpyRenderer,nl.captcha.gimpy.FishEyeGimpyRenderer,nl.captcha.gimpy.RippleGimpyRenderer,nl.captcha.gimpy.ShearGimpyRenderer
#
# Input a list of comma delimited class names that implement
# nl.captcha.noise.NoiseProducer. These classes will be randomly
# used by SimpleCaptcha to add noise to a captcha image.
#
#captcha.engine.simplecaptcha.noise.producers=nl.captcha.noise.CurvedLineNoiseProducer
captcha.engine.simplecaptcha.noise.producers=nl.captcha.noise.CurvedLineNoiseProducer,nl.captcha.noise.StraightLineNoiseProducer
#
# Input a list of comma delimited class names that implement
# nl.captcha.text.producer.TextProducer. These classes will be randomly
# used by SimpleCaptcha to generate text for a captcha image.
#
captcha.engine.simplecaptcha.text.producers=com.liferay.portal.captcha.simplecaptcha.PinNumberTextProducer
#captcha.engine.simplecaptcha.text.producers=com.liferay.portal.captcha.simplecaptcha.DictionaryWordTextProducer,com.liferay.portal.captcha.simplecaptcha.PinNumberTextProducer,nl.captcha.text.producer.DefaultTextProducer,nl.captcha.text.producer.FiveLetterFirstNameTextProducer
#
# Input a list of comma delimited class names that implement
# nl.captcha.text.renderer .WordRenderer. These classes will be randomly
# used by SimpleCaptcha to render text for a captcha image.
#
captcha.engine.simplecaptcha.word.renderers=nl.captcha.text.renderer.DefaultWordRenderer
#captcha.engine.simplecaptcha.word.renderers=nl.captcha.text.renderer.ColoredEdgesWordRenderer,nl.captcha.text.renderer.DefaultWordRenderer
</code></pre><br><br>To use this, copy any properties you think you want to change (what you see here is default) and modify them as willed in your portal-ext.properties, which you probably have created already. If not, it's in <strong>tomcat-{version}/webapps/ROOT/WEB-INF/classes/portal-ext.properties</strong><br><br>In fact, I'd recommend using recaptcha. It's a really great service and to activate it just add this to your portal-ext.properties (you need to get your own public/private key though)<br><br><pre><code>
##
# Enable or not reCaptcha
##
captcha.engine.impl=com.liferay.portal.captcha.recaptcha.ReCaptchaImpl
#captcha.engine.impl=com.liferay.portal.captcha.simplecaptcha.SimpleCaptchaI
captcha.check.portal.create_account=true
captcha.check.portal.send_password=true
captcha.check.portlet.message_boards.edit_category=false
captcha.check.portlet.message_boards.edit_message=false
##
# Urls to access reCaptcha services
##
captcha.engine.recaptcha.url.script=http://api.recaptcha.net/challenge?k=
captcha.engine.recaptcha.url.noscript=http://api.recaptcha.net/noscript?k=
captcha.engine.recaptcha.url.verify=http://api-verify.recaptcha.net/verify
##
#reCaptcha domain specific keys
##
captcha.engine.recaptcha.key.private=YOUR KEY HERE. GET IT FROM http://www.google.com/recaptcha
captcha.engine.recaptcha.key.public=YOUR KEY HERE. GET IT FROM http://www.google.com/recaptcha
</code></pre><br><br><br>Hope this helps <img alt="emoticon" src="@theme_images_path@/emoticons/happy.gif"> Keep asking if you have more problems, I will do my best to assist you.<br><br>Warm regards,<br>Sam</body></html>Samuel Liu2010-07-28T01:02:56ZRE: UPDATED - captcha not showing in create account 6.04Samuel Liuhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=54279642010-07-27T19:34:07Z2010-07-27T19:34:07ZHi Hamish,<br /><br />So basically we didn't change any code relating to the captcha in the new version. Out of curiosity, did you set a variable somewhere called java.awt.headless, because Ubuntu Server is a headless OS?<br /><br />Warm regards,<br />SamSamuel Liu2010-07-27T19:34:07ZRE: UPDATED - captcha not showing in create account 6.04Samuel Liuhttps://liferay.dev/en/c/message_boards/find_message?p_l_id=119785333&messageId=54278842010-07-27T19:27:17Z2010-07-27T19:27:17ZHi Hamish,<br /><br />Thanks for the info, I'll try to reproduce this asap. I'll let you know how it goes <img alt="emoticon" src="@theme_images_path@/emoticons/happy.gif" ><br /><br />Warm regards,<br />SamSamuel Liu2010-07-27T19:27:17Z