No parameter substitution in ant when creating log.dir - DSpace 6 RC1

44 views
Skip to first unread message

Pantelis Karamolegkos

unread,
May 22, 2016, 11:53:59 AM5/22/16
to DSpace Technical Support
After running fresh_install, a file literally named ${log.dir} is created in dspace_installer folder.
It seems no parameter substitution takes place when running the ant target.
Where are the folder names taken from, i.e. ${upload.temp.dir}, ${report.dir} etc and why the log dir is not substituted while the others are?

Pantelis Karamolegkos

unread,
May 22, 2016, 12:01:23 PM5/22/16
to DSpace Technical Support


On Sunday, May 22, 2016 at 6:53:59 PM UTC+3, Pantelis Karamolegkos wrote:
After running fresh_install, a folder literally named ${log.dir} is created in dspace_installer folder.

Luiz dos Santos

unread,
May 22, 2016, 8:55:34 PM5/22/16
to Pantelis Karamolegkos, DSpace Technical Support
Hum...I got it, they changed it, now DSpace use "Apache configuration".  You should use the local.cfg instead build.properties, I attached my one, it should be in the dspace source folder.

On Sun, May 22, 2016 at 7:14 PM, Pantelis Karamolegkos <pante...@gmail.com> wrote:
Luiz, what file are you referring to?
I am running ant fresh_install and a folder named ${log.dir} is created (I assume the parameter ${log.dir} should have been substituted by its value before creating the folder, which does not happen). Instead a folder with the name ${log.dir} is created in my dspace installer dir.

Here are the first lines of the output when running ant fresh_install

dspace@Andromeda:/home/pkaramol/Workspace/dspace_dir/dspace-6.0-rc1-src-release/dspace/target/dspace-installer$ ant fresh_install 
Buildfile: /home/pkaramol/Workspace/dspace_dir/dspace-6.0-rc1-src-release/dspace/target/dspace-installer/build.xml

init_installation:
    [mkdir] Created dir: /home/pkaramol/Workspace/dspace_dir/dspace-6.0-rc1-src-release/dspace/target/dspace-installer/${log.dir}


There seems to be no substitution of the parameter log.dir by its actual value

Pantelis

On Mon, May 23, 2016 at 1:32 AM, Luiz dos Santos <lui...@gmail.com> wrote:
Hi Pantellis, 

   I've never seen this file, which version?

Best regards
Luiz



--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.



local.cfg

Pantelis Karamolegkos

unread,
May 23, 2016, 9:12:36 AM5/23/16
to DSpace Technical Support
Still it seems it is unable to grasp the value of log.dir parameter and substitute in log4j.properties.
My way around this was to hardcode the value of log.dir in log4j.properties in which I now have an entry like:

log.dir=/home/pkaramol/Workspace/dspace6/dspace-6.0-rc1-install-dir/log

And I also had to manually create the log dir in the above path and also grant rwx permissions to tomcat8 user (via setfacl)


On Sunday, May 22, 2016 at 6:53:59 PM UTC+3, Pantelis Karamolegkos wrote:

Mark Wood

unread,
May 23, 2016, 9:26:26 AM5/23/16
to DSpace Technical Support

This should have been corrected in https://github.com/DSpace/DSpace/pull/1364.  log.dir no longer exists in the DSpace configuration; it is only defined in the log4j configuration.  If a property is not defined, no substitution is done.

Pantelis Karamolegkos

unread,
May 23, 2016, 11:19:47 AM5/23/16
to DSpace Technical Support
Although the problem was manually corrected after creating the log dir and setting the respective value in log4j.properties, I am still getting the following error related to solr logs:

log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /log/solr.log (No such file or directory)
    at java.io.FileOutputStream.open0(Native Method)
    at java.io.FileOutputStream.open(FileOutputStream.java:270)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:133)
    at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
    at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
    at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:223)
    at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
    at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
    at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
    at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
    at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
    at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
    at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:415)
    at org.dspace.solr.filters.ConfigureLog4jListener.contextInitialized(ConfigureLog4jListener.java:79)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4812)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5255)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
log4j:ERROR Either File or DatePattern options are not set for appender [file].


It seems that a relevant substitution needs to be made to configure solr logs (?)

Any idea where the solr logs location is set? Can't seem to find it.

Thx,

Pantelis


On Sunday, May 22, 2016 at 6:53:59 PM UTC+3, Pantelis Karamolegkos wrote:

Tim Donohue

unread,
May 23, 2016, 11:26:01 AM5/23/16
to dspac...@googlegroups.com

Hi Pantelis,

This bug was resolved *after* the DSpace 6 RC1 release, as noted by Mark Wood. Here's the bug ticket and resolution:

https://jira.duraspace.org/browse/DS-3104
https://github.com/DSpace/DSpace/pull/1364

So, if you are still running RC1, then you are likely encountering this bug.

We do not yet have a 6.0 RC2 release out (as we're working on a few more bug fixes), but that should be coming soon.

In the meantime, if you want to avoid this issue, you could use the latest code on our "master" GitHub branch, as that is where we are working on the RC2 release.

https://github.com/DSpace/DSpace/

- Tim

--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

-- 
Tim Donohue
Technical Lead for DSpace & DSpaceDirect
DuraSpace.org | DSpace.org | DSpaceDirect.org
Reply all
Reply to author
Forward
0 new messages