Error downloading log file

Hi, forum followers.
Application returns next errors after trying to download log files from server:
For remote context log file: app.cuba

java.lang.RuntimeException: Unable to download log from http://localhost:8080/arvia/dispatch/log/arvia.log
HTTP/1.1 404 
	at com.haulmont.cuba.web.export.LogDataProvider.provide(LogDataProvider.java:117)
	at com.vaadin.server.StreamResource.getStream(StreamResource.java:143)
	at com.haulmont.cuba.web.widgets.CubaFileDownloader.handleConnectorRequest(CubaFileDownloader.java:115)
	at com.vaadin.server.ConnectorResourceHandler.handleRequest(ConnectorResourceHandler.java:88)
	at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1578)
	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:425)
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:329)
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:215)
....

For remote context log file: app-core.cuba:

java.lang.RuntimeException: Unable to download log from http://localhost:8080/arvia-core/remoting/log/arvia.log
HTTP/1.1 404 
	at com.haulmont.cuba.web.export.LogDataProvider.provide(LogDataProvider.java:117)
	at com.vaadin.server.StreamResource.getStream(StreamResource.java:143)
	at com.haulmont.cuba.web.widgets.CubaFileDownloader.handleConnectorRequest(CubaFileDownloader.java:115)
	at com.vaadin.server.ConnectorResourceHandler.handleRequest(ConnectorResourceHandler.java:88)
	at com.vaadin.server.VaadinService.handleRequest(VaadinService.java:1578)
	at com.vaadin.server.VaadinServlet.service(VaadinServlet.java:425)
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.serviceAppRequest(CubaApplicationServlet.java:329)
	at com.haulmont.cuba.web.sys.CubaApplicationServlet.service(CubaApplicationServlet.java:215)
...

Before creating this post, we have read Cuba-Platform framework documentation but we doesn’t achieve correctly downloading of log files through the application.

app.home variable is defined in setenv.sh:

CATALINA_OPTS="$CATALINA_OPTS -Duser.timezone=Europe/Madrid"
CATALINA_OPTS="$CATALINA_OPTS -Dapp.home=/home/cuba/areavianants -Xmx512m -Dfile.encoding=UTF-8"

Log files are stored in the path indicated by app.home:

The war-logback.xml has the logDir property defined:

app.properties file contains configuration of necessary application properties :slight_smile:

web-app.properties files contains configuration of necessary application properties:

web.xml file contains its default value:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
           version="3.0">

    <!-- Application properties config files -->
    <context-param>
        <param-name>appPropertiesConfig</param-name>
        <param-value>
            classpath:com/company/areavianants/app.properties
            /WEB-INF/local.app.properties
            "file:${app.home}/local.app.properties"
        </param-value>
    </context-param>
    <!--Application components-->
    <context-param>
        <param-name>appComponents</param-name>
        <param-value>com.haulmont.cuba com.company.territori com.haulmont.reports com.haulmont.addon.restapi</param-value>
    </context-param>
    <listener>
        <listener-class>com.haulmont.cuba.core.sys.AppContextLoader</listener-class>
    </listener>

    <servlet>
        <servlet-name>remoting</servlet-name>
        <servlet-class>com.haulmont.cuba.core.sys.remoting.RemotingServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>

    <servlet-mapping>
        <servlet-name>remoting</servlet-name>
        <url-pattern>/remoting/*</url-pattern>
    </servlet-mapping>

</web-app>

We would appreciate some help to solve this problem because we have just explored all associated documentation without success.

Thanks in advance

Do you see the logs in the Server Log window?
Do you have a any other exceptions in the logs when you try to download?

Hi, Konstantin.

Yes, I can see the logs in the server Log window:

But, there aren’t any other exception in the logs:

I attach app.log file.
arvia.log (77.1 KB)

Regards,

OK.
Is http://localhost:8080/arvia-core a correct URL of your core app block? If not, you should adjust its cuba.webHostName, cuba.webPort and cuba.webContextName properties.

1 Like