Upload size limit and data directory

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Upload size limit and data directory

Viktor Stroh
Dear Geonetwork users and gurus,
after reading the documentation, a lot of trial and error with different
versions from 3.7-3.10.2 (as geonetwork.war archive) I can't get the
limit of about 100 MB for uploading and changing the data directory.
Even reading the archived mailing list didn't help me.
The system is installed on a Xubuntu 18.04 VM, OpenJDK Runtime
Environment (build 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08), Apache
Tomcat/9.0.16.
Increasing the limit in the config.xml file does not work:
  <general>
                 <!-- Size must be in megabyte (integer), 100MB by
default -->
                 <maxUploadSize>500</maxUploadSize>
<uploadDir>/var/lib/geonetwork_data/tmp</uploadDir>
                 <debug, true, debug.
  </general>
Is this setting now outdated and no longer works in version 3 or higher?
Changing the data directory as described in Docs " Maintainer guide "
Installing the application " Customizing the data directory did not
help. Both CATALINA_OPTS=" -Dgeonetwork.dir=/var/lib/geonetwork_data"
and JAVA_OPTS="-Dgeonetwork.dir=/var/lib/geonetwork_data" do not work.
But also changes in config-spring-geonetwork.xml like:
<bean id="GeonetworkDataDirectory"
class="org.fao.geonet.kernel.GeonetworkDataDirectory" lazy-init="true">
       <property name="systemDataDir" ref="GNSystemDataDir"/>
       <property name="schemaPluginsDir" ref="GNSchemaPluginsDir"/>
    </bean>
    <bean id="GNSystemDataDir" class="java.nio.file.Paths"
factory-method="get">
       <constructor-arg index="0" value="/var/lib/geonetwork_data"/>
       <constructor-arg index="1"><array /></constructor-arg>
    </bean>
    <bean id="GNSchemaPluginsDir" class="java.nio.file.Paths"
factory-method="get">
       <constructor-arg index="0"
value="/var/lib/geonetwork_data/config/schema_plugins"/>
       <constructor-arg index="1"><array /></constructor-arg>
    </bean>
    <bean id="multipart resolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
      <property name="maxUploadSize" value="500000000"/>
    </bean>

have no effect.

Does that work with the config-spring-geonetwork.xml file only if you
compile the source code?
Would it work with these lines of code or is something missing?

Best regards

Viktor



_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Upload size limit and data directory

Francois Prunayre
Hi,

So you get an exception like
{"message":"MaxUploadSizeExceededException","code":"max_file_exceeded","description":"Maximum
upload size of 50000000 bytes exceeded; nested exception is
org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException:
the request was rejected because its size (90494573) exceeds the configured
maximum (50000000)"} ?

Le jeu. 16 avr. 2020 à 13:45, Viktor Stroh <[hidden email]> a écrit :

> Dear Geonetwork users and gurus,
> after reading the documentation, a lot of trial and error with different
> versions from 3.7-3.10.2 (as geonetwork.war archive) I can't get the
> limit of about 100 MB for uploading and changing the data directory.
> Even reading the archived mailing list didn't help me.
> The system is installed on a Xubuntu 18.04 VM, OpenJDK Runtime
> Environment (build 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08), Apache
> Tomcat/9.0.16.
> Increasing the limit in the config.xml file does not work:
>   <general>
>                  <!-- Size must be in megabyte (integer), 100MB by
> default -->
>                  <maxUploadSize>500</maxUploadSize>
> <uploadDir>/var/lib/geonetwork_data/tmp</uploadDir>
>                  <debug, true, debug.
>   </general>
> Is this setting now outdated and no longer works in version 3 or higher?
> Changing the data directory as described in Docs " Maintainer guide "
> Installing the application " Customizing the data directory did not
> help. Both CATALINA_OPTS=" -Dgeonetwork.dir=/var/lib/geonetwork_data"
> and JAVA_OPTS="-Dgeonetwork.dir=/var/lib/geonetwork_data" do not work.
> But also changes in config-spring-geonetwork.xml like:
> <bean id="GeonetworkDataDirectory"
> class="org.fao.geonet.kernel.GeonetworkDataDirectory" lazy-init="true">
>        <property name="systemDataDir" ref="GNSystemDataDir"/>
>        <property name="schemaPluginsDir" ref="GNSchemaPluginsDir"/>
>     </bean>
>     <bean id="GNSystemDataDir" class="java.nio.file.Paths"
> factory-method="get">
>        <constructor-arg index="0" value="/var/lib/geonetwork_data"/>
>        <constructor-arg index="1"><array /></constructor-arg>
>     </bean>
>     <bean id="GNSchemaPluginsDir" class="java.nio.file.Paths"
> factory-method="get">
>        <constructor-arg index="0"
> value="/var/lib/geonetwork_data/config/schema_plugins"/>
>        <constructor-arg index="1"><array /></constructor-arg>
>     </bean>
>     <bean id="multipart resolver"
> class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
>       <property name="maxUploadSize" value="500000000"/>
>     </bean>
>
> have no effect.
>
> Does that work with the config-spring-geonetwork.xml file only if you
> compile the source code?
>

It maybe the case. You could try updating the file in
WEB-INF/lib/services-3.10.X.jar
 and restart.
I'll look into moving that property to config.properties to make it easier
to customize.

Cheers.
Francois

Would it work with these lines of code or is something missing?
>

> Best regards
>
> Viktor
>
>
>
> _______________________________________________
> GeoNetwork-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
> GeoNetwork OpenSource is maintained at
> http://sourceforge.net/projects/geonetwork
>

_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Upload size limit and data directory

Andreas Böhme
In reply to this post by Viktor Stroh
Hi guys,

are there any more suggestions to the mentioned problem ? I also want to
increase the upload size following the docs like here:

'By default, the maximum file size is set to 100Mb. This limit is set in
source file /services/src/main/resources/config-spring-geonetwork.xml
<https://github.com/geonetwork/core-geonetwork/tree/master//services/src/main/resources/config-spring-geonetwork.xml>
with the parameter |maxUploadSize|.'

But I have no such file in this location and the one with the same name
I can find does not include this config lines.
Has this moved to some other file(s)?

Thx again and cheers
Andreas


Am 16.04.2020 um 12:43 schrieb Viktor Stroh:

> Dear Geonetwork users and gurus,
> after reading the documentation, a lot of trial and error with
> different versions from 3.7-3.10.2 (as geonetwork.war archive) I can't
> get the limit of about 100 MB for uploading and changing the data
> directory. Even reading the archived mailing list didn't help me.
> The system is installed on a Xubuntu 18.04 VM, OpenJDK Runtime
> Environment (build 1.8.0_242-8u242-b08-0ubuntu3~18.04-b08), Apache
> Tomcat/9.0.16.
> Increasing the limit in the config.xml file does not work:
>  <general>
>                 <!-- Size must be in megabyte (integer), 100MB by
> default -->
>                 <maxUploadSize>500</maxUploadSize>
> <uploadDir>/var/lib/geonetwork_data/tmp</uploadDir>
>                 <debug, true, debug.
>  </general>
> Is this setting now outdated and no longer works in version 3 or higher?
> Changing the data directory as described in Docs " Maintainer guide "
> Installing the application " Customizing the data directory did not
> help. Both CATALINA_OPTS=" -Dgeonetwork.dir=/var/lib/geonetwork_data"
> and JAVA_OPTS="-Dgeonetwork.dir=/var/lib/geonetwork_data" do not work.
> But also changes in config-spring-geonetwork.xml like:
> <bean id="GeonetworkDataDirectory"
> class="org.fao.geonet.kernel.GeonetworkDataDirectory" lazy-init="true">
>       <property name="systemDataDir" ref="GNSystemDataDir"/>
>       <property name="schemaPluginsDir" ref="GNSchemaPluginsDir"/>
>    </bean>
>    <bean id="GNSystemDataDir" class="java.nio.file.Paths"
> factory-method="get">
>       <constructor-arg index="0" value="/var/lib/geonetwork_data"/>
>       <constructor-arg index="1"><array /></constructor-arg>
>    </bean>
>    <bean id="GNSchemaPluginsDir" class="java.nio.file.Paths"
> factory-method="get">
>       <constructor-arg index="0"
> value="/var/lib/geonetwork_data/config/schema_plugins"/>
>       <constructor-arg index="1"><array /></constructor-arg>
>    </bean>
>    <bean id="multipart resolver"
> class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
>
>      <property name="maxUploadSize" value="500000000"/>
>    </bean>
>
> have no effect.
>
> Does that work with the config-spring-geonetwork.xml file only if you
> compile the source code?
> Would it work with these lines of code or is something missing?
>
> Best regards
>
> Viktor
>
>
>
> _______________________________________________
> GeoNetwork-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
> GeoNetwork OpenSource is maintained at
> http://sourceforge.net/projects/geonetwork
--
--------------------------------------------------------------------------------------------
                                               
Andreas Böhme
Techniker/Technician
Landschaftsökologie/Computational Landscape Ecology
                               
Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
Helmholtz Centre for Environmental Research GmbH - UFZ
Permoserstraße 15, 04318 Leipzig, Germany
Phone +49 341 235 1058
[hidden email], www.ufz.de

Sitz der Gesellschaft/Registered Office: Leipzig
Registergericht/Registration Office: Amtsgericht Leipzig
Handelsregister Nr./Trade Register Nr.: B 4703
Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: N.N.
Wissenschaftlicher Geschäftsführer/Scientific Managing Director:
Prof. Dr. Georg Teutsch
Administrative Geschäftsführerin/Administrative Managing Director:
Dr. Sabine König

Vermeiden Sie unnötige Ausdrucke./Think before printing.

Informationen aus der Wissenschaft (z.B. Veranstaltungshinweise, Projektangaben, Publikationen,
Bücher)

--------------------------------------------------------------------------------------------



_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

smime.p7s (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Upload size limit and data directory

Viktor Stroh
Hello, Andreas,
I'm guessing you installed the final compiled geonetwork.war archive? I
could not increase the upload limit on the compiled version.

I downloaded the source code from the Git server and compiled it using
maven. With the source code version, upload limit can be changed in the
file you specify by changing the "maxUploadSize" parameter.

Best regard

Viktor

Am 30.04.20 um 11:49 schrieb Andreas Böhme:

> Hi guys,
>
> are there any more suggestions to the mentioned problem ? I also want
> to increase the upload size following the docs like here:
>
> 'By default, the maximum file size is set to 100Mb. This limit is set
> in source file
> /services/src/main/resources/config-spring-geonetwork.xml
> <https://github.com/geonetwork/core-geonetwork/tree/master//services/src/main/resources/config-spring-geonetwork.xml>
> with the parameter |maxUploadSize|.'
>
> But I have no such file in this location and the one with the same
> name I can find does not include this config lines.
> Has this moved to some other file(s)?
>
> Thx again and cheers
> Andreas

--
_________________________________________
Viktor Stroh
Institut für Geodäsie und Geoinformation
Bereich der Geoinformation
Universität Bonn
Meckenheimer Allee 172
53115 Bonn

Tel: +49(0)228 73-1763
Fax: +49(0)228 73-1753
EMail: [hidden email]



_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Upload size limit and data directory

Viktor Stroh
In reply to this post by Viktor Stroh
Hi, guys,
after much trial and error, I found my own answers. If any of you know
other alternatives, please let me know.
I could only increase the upload limit if I edit the file
"services/src/main/resources/config-spring-geonetwork.xml" in the source
code version and then compile the source code using maven.

Changing the data directory unfortunately does not work under Tomcat 9,
or does it work for you?
When I installed Tomcat 8.5 under Ubuntu from the official repository
instead of Tomcat 9, the parameter "CATALINA_OPTS="
-Dgeonetwork.dir=/var/lib/geonetwork_data" was accepted.

Best regard

Viktor

Am 16.04.20 um 12:43 schrieb Viktor Stroh:
> Dear Geonetwork users and gurus,
> after reading the documentation, a lot of trial and error with
> different versions from 3.7-3.10.2 (as geonetwork.war archive) I can't
> get the limit of about 100 MB for uploading and changing the data
> directory.
...
>
> Does that work with the config-spring-geonetwork.xml file only if you
> compile the source code?
> ...



_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Upload size limit and data directory

Andreas Böhme
In reply to this post by Viktor Stroh
Hi guys,
can someone (Jose, Paul, Jo, Francois et al.) pls approve this. Is this
really the way to go ? It would be really great if there is another
solution to this.
Cheers
Andreas

Am 03.05.2020 um 23:25 schrieb Viktor Stroh:

> Hello, Andreas,
> I'm guessing you installed the final compiled geonetwork.war archive?
> I could not increase the upload limit on the compiled version.
>
> I downloaded the source code from the Git server and compiled it using
> maven. With the source code version, upload limit can be changed in
> the file you specify by changing the "maxUploadSize" parameter.
>
> Best regard
>
> Viktor
>
> Am 30.04.20 um 11:49 schrieb Andreas Böhme:
>> Hi guys,
>>
>> are there any more suggestions to the mentioned problem ? I also want
>> to increase the upload size following the docs like here:
>>
>> 'By default, the maximum file size is set to 100Mb. This limit is set
>> in source file
>> /services/src/main/resources/config-spring-geonetwork.xml
>> <https://github.com/geonetwork/core-geonetwork/tree/master//services/src/main/resources/config-spring-geonetwork.xml>
>> with the parameter |maxUploadSize|.'
>>
>> But I have no such file in this location and the one with the same
>> name I can find does not include this config lines.
>> Has this moved to some other file(s)?
>>
>> Thx again and cheers
>> Andreas
>
--
--------------------------------------------------------------------------------------------
                                               
Andreas Böhme
Techniker/Technician
Landschaftsökologie/Computational Landscape Ecology
                               
Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
Helmholtz Centre for Environmental Research GmbH - UFZ
Permoserstraße 15, 04318 Leipzig, Germany
Phone +49 341 235 1058
[hidden email], www.ufz.de

Sitz der Gesellschaft/Registered Office: Leipzig
Registergericht/Registration Office: Amtsgericht Leipzig
Handelsregister Nr./Trade Register Nr.: B 4703
Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: N.N.
Wissenschaftlicher Geschäftsführer/Scientific Managing Director:
Prof. Dr. Georg Teutsch
Administrative Geschäftsführerin/Administrative Managing Director:
Dr. Sabine König

Vermeiden Sie unnötige Ausdrucke./Think before printing.

Informationen aus der Wissenschaft (z.B. Veranstaltungshinweise, Projektangaben, Publikationen,
Bücher)

--------------------------------------------------------------------------------------------




_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

smime.p7s (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Upload size limit and data directory

Viktor Stroh
maybe you can test Francois proposal that he posted on April 16:

> You could try updating the file in WEB-INF/lib/services-3.10.X.jar
>  and restart.
> I'll look into moving that property to config.properties to make it
> easier to customize.

greetings

Viktor


Am 04.05.20 um 13:30 schrieb Andreas Böhme:

> Hi guys,
> can someone (Jose, Paul, Jo, Francois et al.) pls approve this. Is
> this really the way to go ? It would be really great if there is
> another solution to this.
> Cheers
> Andreas
>
> Am 03.05.2020 um 23:25 schrieb Viktor Stroh:
>> Hello, Andreas,
>> I'm guessing you installed the final compiled geonetwork.war archive?
>> I could not increase the upload limit on the compiled version.
>>
>> I downloaded the source code from the Git server and compiled it
>> using maven. With the source code version, upload limit can be
>> changed in the file you specify by changing the "maxUploadSize"
>> parameter.
>>
>> Best regard
>>
>> Viktor



_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork
Reply | Threaded
Open this post in threaded view
|

Re: Upload size limit and data directory

Andreas Böhme
Thx Viktor,
I didnt't scroll that far down...my fault ;)
Will try and post if it was successful.
Cheers
Andreas

Am 04.05.2020 um 17:46 schrieb Viktor Stroh:

> maybe you can test Francois proposal that he posted on April 16:
>
>> You could try updating the file in WEB-INF/lib/services-3.10.X.jar
>>  and restart.
>> I'll look into moving that property to config.properties to make it
>> easier to customize.
>
> greetings
>
> Viktor
>
>
> Am 04.05.20 um 13:30 schrieb Andreas Böhme:
>> Hi guys,
>> can someone (Jose, Paul, Jo, Francois et al.) pls approve this. Is
>> this really the way to go ? It would be really great if there is
>> another solution to this.
>> Cheers
>> Andreas
>>
>> Am 03.05.2020 um 23:25 schrieb Viktor Stroh:
>>> Hello, Andreas,
>>> I'm guessing you installed the final compiled geonetwork.war
>>> archive? I could not increase the upload limit on the compiled version.
>>>
>>> I downloaded the source code from the Git server and compiled it
>>> using maven. With the source code version, upload limit can be
>>> changed in the file you specify by changing the "maxUploadSize"
>>> parameter.
>>>
>>> Best regard
>>>
>>> Viktor
>
>
>
> _______________________________________________
> GeoNetwork-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/geonetwork-users
> GeoNetwork OpenSource is maintained at
> http://sourceforge.net/projects/geonetwork
--
--------------------------------------------------------------------------------------------
                                               
Andreas Böhme
Techniker/Technician
Landschaftsökologie/Computational Landscape Ecology
                               
Helmholtz-Zentrum für Umweltforschung GmbH - UFZ
Helmholtz Centre for Environmental Research GmbH - UFZ
Permoserstraße 15, 04318 Leipzig, Germany
Phone +49 341 235 1058
[hidden email], www.ufz.de

Sitz der Gesellschaft/Registered Office: Leipzig
Registergericht/Registration Office: Amtsgericht Leipzig
Handelsregister Nr./Trade Register Nr.: B 4703
Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: N.N.
Wissenschaftlicher Geschäftsführer/Scientific Managing Director:
Prof. Dr. Georg Teutsch
Administrative Geschäftsführerin/Administrative Managing Director:
Dr. Sabine König

Vermeiden Sie unnötige Ausdrucke./Think before printing.

Informationen aus der Wissenschaft (z.B. Veranstaltungshinweise, Projektangaben, Publikationen,
Bücher)

--------------------------------------------------------------------------------------------




_______________________________________________
GeoNetwork-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

smime.p7s (7K) Download Attachment