Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
RE: RE: 7.3 CE GA6 - Problem adding basic content with link behind a proxy
I'm playing with the latest and greatest but I'm having a problem: whenever I create a web content with a link I'm unable to save the webcontent due to an unspecified error ("Error: Your request failed to complete"). No errors show up on the console.
I suspect this has to do with the server being behind a proxy with no direct internet access, because on a normal situation this does not happen. But I have configured the proxy settings on system-ext.prperties, as recommended by Jorge Diaz on Stack Overflow.
Any ideas on how I can debug this? What classes' logs should be enabled?
TIA
Fernando
- Connection errors in the network tab
- Errors in the console tab
Errors (404 or something) in the network tab could be related to a proxy. If you have a connection error, you probably can just ignore errors in the console tab since they are probably caused by the connection error.
Unfortunately on the browser side I only get some (seemingly) unreated warnings like:
"Component with id "_com_liferay_journal_web_portlet_JournalPortlet_ddmForm" is being registered twice. This can lead to unexpected behaviour in the "Liferay.component" and "Liferay.componentReady" APIs, as well as in the "*:registered" events"
I'm still gessing that this is a proxy/network related problem, since I cannot reproduce it on a non-proxied Liferay+browser. I'd like to confirm that the proxy I configured on system-ext.properties is working. I've checked on Control Panel and the properties are being read, but I'd like to confirm they're being used.
My system-ext.properties currently reads like this:
http.proxyHost=172.18.2.102
http.proxyPort=8080
http.nonProxyHosts=*.not-real-domain.org|localhost
Any ideas?TIA
Fernando
http://172.18.2.102:8080
Right? Or do you use a hostname? In general: I would not do it this way, I would try to configure my proxy to send an X-Header and let Liferay us that one. It works pretty well for me, I only have to tell the tomcat that it should use the https scheme.
Do you see any warnings/errors in the proxy logfile?
You could try to enable logging for this class:
com.liferay.journal.web.internal.portlet.action
(Try it without proxy too, to check if it indeed gives you some output)
Just a small update on this:
I access the liferay server with IP or localhost. The behaviour is the same with or without the proxy configuration. I've tested the proxy with an rss feed on a page and everything was working. I have no access to the proxy logs, unfortunately.
The behaviour is like this: a) If I create a basic webcontent with no links, I can save it normally; b) If I create a basic webcontent with a link to http://localhost, I can save it normally; c) If I create a basic webcontent with a link to http://www.google.com I get that generic error and the webcontent is not saved. No messages go into the log.
On Control Panel, I've disabled the Infrastructure / Import/Export / Validate Missing references option but it changes nothing.
I've activated debug logging for the com.liferay.journal.web.internal.portlet.action.UpdateArticleMVCActionCommand class and confirmed it's being called. I've looked at the code on github and tried to follow the path. I got to the method validateContentReferences() on com.liferay.journal.internal.exportimport.content.processor.JournalArticleExportImportContentProcessor and enabled debug on the class but either it's not that class or it's not called.
I'm suspecting that the url validation is being done through hostname checking and not by a connection to the url, but I was unable to confirm until now (I'm waiting for the sysadm to enable DNS on the machine).
Good news. It was not a proxy problem but a DNS problem.
Apparently, Liferay is testing the hostname on the link instead of the full URL.
Since the server was just relying on the proxy but had no DNS config, the validation was failing.
The prolem went away after correct DNS configuration on the host.
Thanks for the suggestions, Christoph!
Powered by Liferay™