Foren

Troubleshooting - Remote Staging

thumbnail
Marvin Gumpoldsberger, geändert vor 15 Jahren.

Troubleshooting - Remote Staging

New Member Beiträge: 21 Beitrittsdatum: 29.10.08 Neueste Beiträge
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, geändert vor 15 Jahren.

RE: Troubleshooting - Remote Staging

Regular Member Beiträge: 203 Beitrittsdatum: 15.11.08 Neueste Beiträge
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, geändert vor 15 Jahren.

RE: Troubleshooting - Remote Staging

Liferay Master Beiträge: 993 Beitrittsdatum: 27.04.07 Neueste Beiträge
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, geändert vor 12 Jahren.

RE: Troubleshooting - Remote Staging

Regular Member Beiträge: 214 Beitrittsdatum: 19.06.09 Neueste Beiträge
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, geändert vor 12 Jahren.

RE: Troubleshooting - Remote Staging

Liferay Legend Beiträge: 6396 Beitrittsdatum: 23.09.08 Neueste Beiträge
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, geändert vor 12 Jahren.

RE: Troubleshooting - Remote Staging

New Member Beiträge: 15 Beitrittsdatum: 31.08.10 Neueste Beiträge
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, geändert vor 7 Jahren.

RE: Troubleshooting - Remote Staging

New Member Beiträge: 3 Beitrittsdatum: 22.11.10 Neueste Beiträge
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