[opencms-dev] Re: I/O Error while publishing

Niklas Eklund niklas at curalia.se
Fri Sep 5 17:49:01 CEST 2003


Hello,

No I haven't reported it since it is, like you say, so hard to describe. 
Also I cannot reliably reproduce the problem, but it keeps popping up 
more and more often in the installation I have.

It would be interesting to get comments from someone from the Alkacon 
camp about this. ;)

Here's what I've found so far (rather technical in-depth stuff):
There are public _static_ variables, m_dynamicExportRulesOnline is the 
interesting one in this case, in CmsStaticExport that are not 
syncronized properly.
In the non-static method createDynamicRules(), dynamicExportRulesOnline 
is reset and filled with new values that are used to translate links to 
export-mode (or not depending on the resource's "export" property). As 
these calls are syncronized on a higher level when publishing this would 
not be a problem if it was the only way the dynamicExportRulesOnline 
variable is used...

However, the static method handleDynamicRules(), as called by 
LinkSubstitution on page generation, is also using the variable and is 
not affected by the high-level syncronization. It can thus use the 
variable any time causing the symptoms we get, ie that the dynamic rules 
are (partially) ignored and the resulting generated page is using bad 
(exported) links.
Also, handleDynamicRules() seems to get the rules that the last 
"publisher" gets, since the rules are based on reading all resources 
with the property "export". If the last publisher is a user that has 
very few permissions, the rules will be fewer than if an administrator 
was the last publisher...

My current theory is that the bad page gets into the cache and it is 
being served at every request after that, until the cache is cleared, 
which happens on a second publish (the workaround).

(These problems might just happen when staticexport.enabled=true and 
staticexport.default.export=true in the opencms.properties-file)

Phew, a long e-mail. Hope y'all understand my ramblings. :)

Regards,

  Niklas

hermanhardenbol at zonnet.nl wrote:

> Dear Niklas,
> 
> Thank you very much for your response.  Your solution helped for me also.
> 
> I changed the <link></link> parts in /system/login/login/index into a 
> hardcoded filepath and my problem is gone.
> 
> Looks to me like a bug.  Did you report that?  It is so hard to describe.  
> I wander if other users are having the same problem.
> 
> Kind regards, Herman.
> 
> 
>>Hello Herman et al,
>>
>>I have the exact same problem. The urls (logo and other) change from 
>>/opencms/opencms/* to /opencms/export/*, which is what my export path is 
>>set to. Export is set to true by default, but the system folder has 
>>export=false. It seems that the entire online project goes into a 
>>strange "force-export-mode". I have found that if you keep the 
>>administrator logged in, you can fix this temporarily by using direct 
>>publish on the system/login folder in an offline project, without making 
>>any changes...
>>Any ideas?
>>
>>Regards,
>>
>>   Niklas
>>
>>hermanhardenbol at zonnet.nl wrote:
>>
>>
>>>Dear All,
>>>
>>>I hope you can help me with the following:
>>>
>>>when I publish something in OpenCMS as a administrator, there is no 
>>>problem, but when I publish the same thing in the same directory as 
>>>a 'ProjectManager', OpenCMS stops.  The webapp is still running, but one
>>
>>>cannot login anymore.
>>>
>>>The login page does not show the OpenCMS-logo anymore.  It is trying to 
>>>find the logo under /system/login/login_logo.gif  and after filling 
>>>username and password it gives me a 404 error for 
>>>file /system/login/index_1972.html
>>>
>>>When I restart the webapp everything is in order again, until the next 
>>>person does a publish.
>>>
>>>I am using: 
>>>tomcat 4.1.24, 
>>>java VM 1.4.0-b92 mixed mode
>>>windows NT 4.0 x86
>>>
>>>Putting the debug logging flag on, I found the following error in my log
>>
>>>file:
>>>
>>>[02.09.2003 13:59:47] <opencms_debug> Request character encoding is:
>>
>>'ISO-
>>
>>>8859-1'
>>>[02.09.2003 13:59:47] <opencms_debug> Request character encoding is:
>>
>>'ISO-
>>
>>>8859-1'
>>>[02.09.2003 13:59:47] <opencms_debug>
>>
>>[com.opencms.file.CmsRequestContext] 
>>
>>>can't get encoding property for 
>>>resource /system/workplace/action/explorer_files_new_upload.html, trying
>>
>>to 
>>
>>>get it from session.
>>>[02.09.2003 13:59:47] <opencms_debug>
>>
>>[com.opencms.file.CmsRequestContext] 
>>
>>>can't get encoding property for 
>>>resource /system/workplace/action/explorer_files_new_upload.html, trying
>>
>>to 
>>
>>>get it from session.
>>>[02.09.2003 13:59:47] <opencms_debug>
>>
>>[com.opencms.file.CmsRequestContext] 
>>
>>>can't get encoding property for 
>>>resource /system/workplace/action/explorer_files_new_upload.html, trying
>>
>>to 
>>
>>>get it from session.
>>>[02.09.2003 13:59:47] <opencms_debug>
>>
>>[com.opencms.file.CmsRequestContext] 
>>
>>>can't get encoding property for 
>>>resource /system/workplace/action/explorer_files_new_upload.html, trying
>>
>>to 
>>
>>>get it from session.
>>>[02.09.2003 13:59:47] <opencms_debug> [CmsXmlTemplateLoader] IO error
>>
>>while 
>>
>>>writing to response stream for explorer_files_new_upload.html
>>>[02.09.2003 13:59:47] <opencms_debug> [CmsXmlTemplateLoader] 
>>>java.net.SocketException: Connection reset by peer: socket write error
>>>[02.09.2003 13:59:47] <opencms_debug> Request character encoding is:
>>
>>'ISO-
>>
>>>8859-1'
>>>
>>>
>>>[02.09.2003 14:00:09] <opencms_debug> Request character encoding is:
>>
>>'ISO-
>>
>>>8859-1'
>>>[02.09.2003 14:00:10] <opencms_debug>
>>
>>[com.opencms.file.CmsRequestContext] 
>>
>>>can't get encoding property for 
>>>resource /system/workplace/action/publish_project.html, trying to get it
>>
>>>from session.
>>>[02.09.2003 14:00:10] <opencms_debug>
>>
>>[com.opencms.file.CmsRequestContext] 
>>
>>>can't get encoding property for 
>>>resource /system/workplace/action/publish_project.html, trying to get it
>>
>>>from session.
>>>[02.09.2003 14:00:10] <opencms_debug> [CmsDumpLoader] IO error while 
>>>writing to response stream for empty.html
>>>[02.09.2003 14:00:10] <opencms_debug> [CmsDumpLoader] 
>>>java.net.SocketException: Connection reset by peer: socket write error
>>>[02.09.2003 14:00:10] <opencms_debug> Request character encoding is:
>>
>>'ISO-
>>
>>>8859-1'
>>>[02.09.2003 14:00:10] <opencms_debug> Request character encoding is:
>>
>>'ISO-
>>
>>>8859-1'
>>>
>>>I am not showing you all the ISO-8859-1 stuff, because there are 
> 
> hundreds
> 
>>>of these messages for only a few actions, but the IO error worries me.
>>>
>>>Any idea is more than welcome.
>>>
>>>Kind regards, Herman Hardenbol.
> 
> 
> 




More information about the opencms-dev mailing list