Forum Ametys

Forum de la communauté Ametys

You are not logged in.

#1 11/02/2019 13:01:33

Seb.CT
Guest
From: LE MANS
Registered: 17/03/2016
Posts: 9

erreur accès page 404

Bonjour,
J’héberge un site sur CMS ametys 3.8.1
Ma config :
*Back office 
  - Debian 8
  - Apache 2.4.10
  - Java 7
  - tomcat 8.0.32
  - mysql 14.14
*Front office
 - Debian 9
 - Apache 2.4.25
 - Java 8
 - tomcat 9.0.14
 - mysql 14.14

Depuis que j'ai mis à jour mon front office en debian 9, j'ai de gros soucis avec mes pages d'erreur.
Lorsqu'une URL mal formée est envoyée, ma page d'erreur ne s'affiche pas, j'ai ce message d'Apache :
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Ce problème génère aussi d'importants nombres d'écritures au niveau des logs: le servlet-engine.log du back office pèse plusieurs Giga et mon disque arrive à saturation si je ne le purge pas très fréquemment.
Voici un extrait de ce journal :

2019-02-11 11:27:42,618 ERROR [access] (http-nio-8080-exec-1;/generate/cttm/error/404.html) Internal Cocoon Problem
org.apache.cocoon.ProcessingException: Failed to process pipeline
        at <map:serialize> - resource://org/ametys/runtime/kernel/sitemap.xmap:270:50
        at <map:transform type="i18n"> - resource://org/ametys/runtime/kernel/sitemap.xmap:267:43
        at <map:transform> - resource://org/ametys/runtime/kernel/sitemap.xmap:261:43
        at <map:generate type="exception"> - resource://org/ametys/runtime/kernel/sitemap.xmap:260:62
        at org.apache.cocoon.ProcessingException.throwLocated(ProcessingException.java:145)
        at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.handleException(AbstractProcessingPipeline.java:953)
        at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:583)
        at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:280)
        at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:481)
        at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:144)
        at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
        at org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(ActTypeNode.java:139)
        at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
        at org.apache.cocoon.components.treeprocessor.sitemap.SwitchSelectNode.invoke(SwitchSelectNode.java:104)
        at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
        at org.apache.cocoon.components.treeprocessor.sitemap.HandleErrorsNode.invoke(HandleErrorsNode.java:90)
        at org.apache.cocoon.components.treeprocessor.sitemap.ErrorHandlerHelper.prepareErrorHandler(ErrorHandlerHelper.java:182)
        at org.apache.cocoon.components.treeprocessor.sitemap.ErrorHandlerHelper.prepareErrorHandler(ErrorHandlerHelper.java:135)
        at org.apache.cocoon.components.treeprocessor.sitemap.ErrorHandlerHelper.invokeErrorHandler(ErrorHandlerHelper.java:108)
        at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:157)
        at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
        at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
        at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:236)
        at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:178)
        at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:254)
        at org.apache.cocoon.Cocoon.process(Cocoon.java:699)
        at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1159)
        at org.ametys.runtime.servlet.RuntimeServlet._doService(RuntimeServlet.java:135)
        at org.ametys.runtime.servlet.RuntimeServlet.service(RuntimeServlet.java:92)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)
Caused by: org.xml.sax.SAXException: I/O error writing: java.io.IOException: Relais brisé (pipe)
org.apache.catalina.connector.ClientAbortException: java.io.IOException: Relais brisé (pipe)
        at org.apache.cocoon.components.serializers.EncodingSerializer.write(EncodingSerializer.java:332)
        at org.apache.cocoon.components.serializers.EncodingSerializer.encode(EncodingSerializer.java:232)
        at org.apache.cocoon.components.serializers.XMLSerializer.charactersImpl(XMLSerializer.java:322)
        at org.ametys.runtime.cocoon.XHTMLSerializer.charactersImpl(XHTMLSerializer.java:330)
        at org.apache.cocoon.components.serializers.EncodingSerializer.characters(EncodingSerializer.java:485)
        at org.ametys.runtime.cocoon.XHTMLSerializer.characters(XHTMLSerializer.java:316)
        at org.apache.cocoon.xml.AbstractXMLPipe.characters(AbstractXMLPipe.java:124)
        at org.apache.cocoon.transformation.I18nTransformer.characters(I18nTransformer.java:1204)
        at org.apache.xml.serializer.ToXMLSAXHandler.characters(ToXMLSAXHandler.java:542)
        at org.apache.xml.utils.FastStringBuffer.sendSAXcharacters(FastStringBuffer.java:999)
        at org.apache.xml.dtm.ref.sax2dtm.SAX2DTM.dispatchCharactersEvents(SAX2DTM.java:557)
        at org.apache.xpath.axes.LocPathIterator.executeCharsToContentHandler(LocPathIterator.java:247)
        at org.apache.xalan.templates.ElemValueOf.execute(ElemValueOf.java:274)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
        at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:1376)
        at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395)
        at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:178)
        at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2400)
        at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2270)
        at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1356)
        at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3447)
        at org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:408)
        at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:56)
        at org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:586)
        at org.apache.cocoon.generation.ExceptionGenerator.generate(ExceptionGenerator.java:64)
        at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:579)
        ... 44 more
Caused by: org.apache.catalina.connector.ClientAbortException: java.io.IOException: Relais brisé (pipe)
        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:393)
        at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:315)
        at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:418)
        at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:406)
        at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:97)
        at java.io.BufferedOutputStream.write(BufferedOutputStream.java:122)
        at java.io.BufferedOutputStream.write(BufferedOutputStream.java:122)
        at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
        at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:282)
        at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125)
        at java.io.OutputStreamWriter.write(OutputStreamWriter.java:207)
        at org.apache.cocoon.components.serializers.EncodingSerializer.write(EncodingSerializer.java:330)
        ... 81 more
Caused by: java.io.IOException: Relais brisé (pipe)
        at sun.nio.ch.FileDispatcherImpl.write0(Native Method)
        at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47)
        at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
        at sun.nio.ch.IOUtil.write(IOUtil.java:65)
        at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:492)
        at org.apache.tomcat.util.net.NioChannel.write(NioChannel.java:124)
        at org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:101)
        at org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:172)
        at org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:139)
        at org.apache.coyote.http11.InternalNioOutputBuffer.flushBuffer(InternalNioOutputBuffer.java:244)
        at org.apache.coyote.http11.InternalNioOutputBuffer.addToBB(InternalNioOutputBuffer.java:189)
        at org.apache.coyote.http11.InternalNioOutputBuffer.access$000(InternalNioOutputBuffer.java:41)
        at org.apache.coyote.http11.InternalNioOutputBuffer$SocketOutputBuffer.doWrite(InternalNioOutputBuffer.java:320)
        at org.apache.coyote.http11.filters.ChunkedOutputFilter.doWrite(ChunkedOutputFilter.java:116)
        at org.apache.coyote.http11.filters.GzipOutputFilter$FakeOutputStream.write(GzipOutputFilter.java:177)
        at java.io.OutputStream.write(OutputStream.java:75)
        at java.util.zip.GZIPOutputStream.writeHeader(GZIPOutputStream.java:182)
        at java.util.zip.GZIPOutputStream.<init>(GZIPOutputStream.java:94)
        at java.util.zip.GZIPOutputStream.<init>(GZIPOutputStream.java:131)
        at org.apache.coyote.http11.filters.GzipOutputFilter.doWrite(GzipOutputFilter.java:77)
        at org.apache.coyote.http11.AbstractOutputBuffer.doWrite(AbstractOutputBuffer.java:256)
        at org.apache.coyote.Response.doWrite(Response.java:501)
        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:388)
        ... 92 more

J'ai aussi des logs similaires pour l'accès à la page 500.
J'ai vérifié les droits du dossier tomcat, du dossier error où se trouve ma page 404.html

Avez-vous une idée pour orienter mes recherches : config apache ou tomcat  du back-office ou  du front office ??

Last edited by Seb.CT (11/02/2019 13:05:07)

Offline

#2 22/03/2019 14:33:59

Raphaël Franchet
Expert Team
From: Toulouse
Registered: 10/08/2010
Posts: 1,117

Re: erreur accès page 404

En général, de notre côté nous faisons servir les pages d'erreurs directement par Apache Httpd.
Ce n'est pas votre cas ?


Raphael Franchet
Expert Ametys

Offline

#3 29/03/2019 18:59:09

Seb.CT
Guest
From: LE MANS
Registered: 17/03/2016
Posts: 9

Re: erreur accès page 404

Bonjour,
Oui bien sûr. La redirection vers la page 404.html ne semble plus fonctionner...
Dans ma config apache du front office, j'ai :

<Directory "/home/cms/Ametys_CMS/application/site/WEB-INF/error">
       Order allow,deny
       Options Multiviews
        Options FollowSymLinks
       Allow from all
       </Directory>

       RewriteEngine On
        ProxyRequests Off
        ProxyErrorOverride On

        RewriteRule             ^/?$             /fr/index.html [R]
        RewriteRule             ^/fr/?$          /fr/index.html [R]
        RewriteRule             ^/en/?$          /en/index.html [R]

        RewriteRule ^/error/(.+)$ /home/cms/Ametys_CMS/application/site/WEB-INF/error/$1 [L]

        RewriteCond    %{DOCUMENT_ROOT}/$1     -f
        RewriteCond      %{REQUEST_FILENAME}   !^/WEB-INF/.*
        RewriteRule    ^/(.+)$  %{DOCUMENT_ROOT}/$1 [L]

        ErrorDocument 404 /error/404.htm


Ma page 404.html est placée dans /home/cms/Ametys_CMS/application/site/WEB-INF/error/
Je ne vois pas où est l'erreur. Cela fonctionnait comme cela avant...

Offline

#4 08/04/2019 18:29:34

Raphaël Franchet
Expert Team
From: Toulouse
Registered: 10/08/2010
Posts: 1,117

Re: erreur accès page 404

Votre redirection 404 se fait vers 404.htm (sans L à la fin) alors que vous dites que votre page s'appelle 404.html... n'est-ce pas juste cela ?

Au passage, je vous recommande de changer [R] par [R=301] dans vos 3 RewriteRule de redirection vers index.


Raphael Franchet
Expert Ametys

Offline

#5 28/05/2019 17:10:41

Seb.CT
Guest
From: LE MANS
Registered: 17/03/2016
Posts: 9

Re: erreur accès page 404

Bonjour,
Bon ben le problème ne vient ni d'ametys, ni de la distrib linux, mais du passage à la version 2.4 d'Apache.
Pour ceux que ça intéresse, sur Apache 2.4, le contrôle d'accès n'est plus assuré par les directives order, allow, deny, satisfy
source :
Ma page d'erreur est à nouveau accessible.
Problème résolu

Offline

Board footer

Powered by FluxBB