留言板

Troubleshooting - Remote Staging

thumbnail
Marvin Gumpoldsberger,修改在15 年前。

Troubleshooting - Remote Staging

New Member 帖子: 21 加入日期: 08-10-29 最近的帖子
Hi all,

I want to set up my environment for remote publishing from staging machine to live, so i have two physical liferay servers configured for (remote) staging.


The staging in the same physical machine works fine, but the "publish to remote" results in:

"Could not connect to address http://<hostname or ip>:80. Please verify that the specified port is correct and that the remote server is configured to accept requests from this server."

Can somebody tell me where to configure the remote server to accept requests (the port must be correct) ?
I haven´t found sth. heplful in the community or even in the docs.



catalina says:

12:02:26,293 ERROR [GroupServiceHttp:60] com.liferay.portal.SystemException: java.io.StreamCorruptedException: invalid stream header: 3C21444F
com.liferay.portal.SystemException: java.io.StreamCorruptedException: invalid stream header: 3C21444F
at com.liferay.portal.service.http.GroupServiceHttp.getGroup(GroupServiceHttp.java:293)
at com.liferay.portlet.communities.util.StagingUtil.copyRemoteLayouts(StagingUtil.java:180)
at com.liferay.portlet.communities.util.StagingUtil._publishToRemote(StagingUtil.java:1129)
at com.liferay.portlet.communities.util.StagingUtil.publishToRemote(StagingUtil.java:596)
at com.liferay.portlet.communities.action.EditPagesAction.processAction(EditPagesAction.java:158)
at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcessor.java:180)
at com.liferay.portlet.StrutsPortlet.processAction(StrutsPortlet.java:197)
at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFilter(FilterChainImpl.java:93)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:57)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:589)
.
.
.
Caused by: java.io.StreamCorruptedException: invalid stream header: 3C21444F
at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at java.io.ObjectInputStream.<init>(Unknown Source)
at com.liferay.portal.service.http.TunnelUtil.invoke(TunnelUtil.java:69)
at com.liferay.portal.service.http.GroupServiceHttp.getGroup(GroupServiceHttp.java:282)
... 89 more

and wireshark says the remote host answers http code 302 moved temporarily....







Thanks!
thumbnail
ITCSrikanth ITCReddy ITCSanivarapu,修改在15 年前。

RE: Troubleshooting - Remote Staging

Regular Member 帖子: 203 加入日期: 08-11-15 最近的帖子
Marvin Gumpoldsberger:
Hi all,

I want to set up my environment for remote publishing from staging machine to live, so i have two physical liferay servers configured for (remote) staging.


The staging in the same physical machine works fine, but the "publish to remote" results in:

"Could not connect to address http://<hostname or ip>:80. Please verify that the specified port is correct and that the remote server is configured to accept requests from this server."

Can somebody tell me where to configure the remote server to accept requests (the port must be correct) ?
I haven´t found sth. heplful in the community or even in the docs.



catalina says:

12:02:26,293 ERROR [GroupServiceHttp:60] com.liferay.portal.SystemException: java.io.StreamCorruptedException: invalid stream header: 3C21444F
com.liferay.portal.SystemException: java.io.StreamCorruptedException: invalid stream header: 3C21444F
at com.liferay.portal.service.http.GroupServiceHttp.getGroup(GroupServiceHttp.java:293)
at com.liferay.portlet.communities.util.StagingUtil.copyRemoteLayouts(StagingUtil.java:180)
at com.liferay.portlet.communities.util.StagingUtil._publishToRemote(StagingUtil.java:1129)
at com.liferay.portlet.communities.util.StagingUtil.publishToRemote(StagingUtil.java:596)
at com.liferay.portlet.communities.action.EditPagesAction.processAction(EditPagesAction.java:158)
at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcessor.java:180)
at com.liferay.portlet.StrutsPortlet.processAction(StrutsPortlet.java:197)
at com.sun.portal.portletcontainer.appengine.filter.FilterChainImpl.doFilter(FilterChainImpl.java:93)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:57)
at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:589)
.
.
.
Caused by: java.io.StreamCorruptedException: invalid stream header: 3C21444F
at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
at java.io.ObjectInputStream.<init>(Unknown Source)
at com.liferay.portal.service.http.TunnelUtil.invoke(TunnelUtil.java:69)
at com.liferay.portal.service.http.GroupServiceHttp.getGroup(GroupServiceHttp.java:282)
... 89 more

and wireshark says the remote host answers http code 302 moved temporarily....







Thanks!





Hi Marvin Gumpoldsberger,

did u get the solution for the above posted query by u?

Please reply me whether you got the solution or not ?

and reply me the procedure for that?

Plz...

Itz really very urgent..

Thanks in advance.,

Srikanth Reddy.S
thumbnail
Jonas Yuan,修改在15 年前。

RE: Troubleshooting - Remote Staging

Liferay Master 帖子: 993 加入日期: 07-4-27 最近的帖子
Hi Marvin and Srikanth,

This is just a configuration issue.

Check your configuration:

tunnel.servlet.hosts.allowed=127.0.0.1,SERVER_IP, YOUR_REMOTE_SERVER_IP
tunnel.servlet.https.required=false

make sure that you have set remote server IPs properly.

When publishing remotely, just input the YOUR_REMOTE_SERVER_IP in UI.

Good Luck!

Jonas Yuan
thumbnail
Rajeev K,修改在12 年前。

RE: Troubleshooting - Remote Staging

Regular Member 帖子: 214 加入日期: 09-6-19 最近的帖子
Jonas Yuan:
Hi Marvin and Srikanth,

This is just a configuration issue.

Check your configuration:

tunnel.servlet.hosts.allowed=127.0.0.1,SERVER_IP, YOUR_REMOTE_SERVER_IP
tunnel.servlet.https.required=false

make sure that you have set remote server IPs properly.

When publishing remotely, just input the YOUR_REMOTE_SERVER_IP in UI.

Good Luck!

Jonas Yuan


Hi Jonas,

I am getting the same error when trying to connect to a remote Live server.

These are the settings that I have done in portal-ext file of the Remote server:-

tunnel.servlet.hosts.allowed=10.16.22.11
tunnel.servlet.https.required=false

#web.server.protocol=https
#web.server.http.port=80
#web.server.https.port=443


Error that I get is

Caused by: java.io.StreamCorruptedException: invalid stream header: 3C21444F
        at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:782)
        at java.io.ObjectInputStream.<init>(ObjectInputStream.java:279)
        at com.liferay.portal.service.http.TunnelUtil.invoke(TunnelUtil.java:61)
        at com.liferay.portal.service.http.GroupServiceHttp.getGroup(GroupServiceHttp.java:216)
</init>


Kindly suggest something, what could be going wrong here.
Note: My Local server (from where I am doing the staging is https site)
thumbnail
Olaf Kock,修改在12 年前。

RE: Troubleshooting - Remote Staging

Liferay Legend 帖子: 6403 加入日期: 08-9-23 最近的帖子
Rajeev K:
These are the settings that I have done in portal-ext file of the Remote server:-

tunnel.servlet.hosts.allowed=10.16.22.11
tunnel.servlet.https.required=false

...

Kindly suggest something, what could be going wrong here.
Note: My Local server (from where I am doing the staging is https site)


No guarantee - I'm always mixing these two settings (and can't try currently), but try
    axis.servlet.hosts.allowed=10.16.22.11,127.0.0.1,SERVER_IP
    axis.servlet.https.required=false


The https nature of the staging server should not matter, the settings you gave about the web server ports were commented and deactivated. For staging through https see this blog post
thumbnail
Randall Hidajat,修改在12 年前。

RE: Troubleshooting - Remote Staging

New Member 帖子: 15 加入日期: 10-8-31 最近的帖子
Just to add to what Olaf has stated above, You'll want to have both the tunnel.servlet properties along with the axis.servlet property also.

a little adjustment of your property you may want to use
tunnel.servlet.hosts.allowed=10.16.22.11,127.0.0.1,SERVER_IP
Lindsey Luther,修改在7 年前。

RE: Troubleshooting - Remote Staging

New Member 帖子: 3 加入日期: 10-11-22 最近的帖子
I know this is an old post but I recently ran into this issue and wanted to provide an answer.

I've implemented OpenAM with a custom auto login class on staging and production.

When setting staging in the UI, I used the Tomcat port instead of the Apache port.
Remote Host/IP : productionurl
Remote Port: 8443
Remote Path Context:
Remote Site ID:production site id

The Apache port resulted in the error listed above and also network connection failures.
Ex. Caused by: java.net.SocketException: Unexpected end of file from server

I followed Olaf's post for the remaining back end configuration.
1) Added the production host's cert to the staging host's keystore.
2)Added the following to portal-ext.properties on the production host.

tunnel.servlet.https.required=true
axis.servlet.https.required=true
tunnel.servlet.hosts.allowed=127.0.0.1,SERVER_IP,productionhostnameip,productionhostname
axis.servlet.hosts.allowed=127.0.0.1,SERVER_IP,productionhostnameip,productionhostname