Error installing JasperReports Server as non-root user

0

I am trying to install jasper reports server on a RHEL 5 machine as a non-root user.

I am getting a lot of errors that look like the following,

Caused by: org.springframework.beans.factory.BeanCreationException:
Error creating bean with name 'dataSnapshotCachingService' defined in
file
[/home/josesm/jasperreports-server-cp-5.5.0/buildomatic/conf_source/ieCe/applicationContext-data-snapshots.xml]:
Cannot create inner bean
'org.springframework.cache.ehcache.EhCacheFactoryBean#43b12dbb' of type
[org.springframework.cache.ehcache.EhCacheFactoryBean] while setting
bean property 'contentsCache'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name
'org.springframework.cache.ehcache.EhCacheFactoryBean#43b12dbb' defined
in file
[/home/josesm/jasperreports-server-cp-5.5.0/buildomatic/conf_source/ieCe/applicationContext-data-snapshots.xml]:
Invocation of init method failed; nested exception is
net.sf.ehcache.CacheException: java.io.IOException: Permission denied
[java] at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:281)
[java] at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:120)
[java] at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360)
[java] at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
[java] at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
[java] at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
[java] at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
[java] at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
[java] at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
[java] at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
[java] at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322)
[java] ... 160 more [java] Caused by:
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name
'org.springframework.cache.ehcache.EhCacheFactoryBean#43b12dbb' defined
in file
[/home/josesm/jasperreports-server-cp-5.5.0/buildomatic/conf_source/ieCe/applicationContext-data-snapshots.xml]:
Invocation of init method failed; nested exception is
net.sf.ehcache.CacheException: java.io.IOException: Permission denied
[java] at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
[java] at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
[java] at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
[java] at
org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:270)
[java] ... 170 more [java] Caused by: net.sf.ehcache.CacheException:
java.io.IOException: Permission denied [java] at
net.sf.ehcache.DiskStorePathManager$DiskStorePath.<init>(DiskStorePathManager.java:331)
[java] at
net.sf.ehcache.DiskStorePathManager.resolveAndLockIfNeeded(DiskStorePathManager.java:145)
[java] at
net.sf.ehcache.DiskStorePathManager.getFile(DiskStorePathManager.java:262)
[java] at
net.sf.ehcache.DiskStorePathManager.getFile(DiskStorePathManager.java:251)
[java] at
net.sf.ehcache.store.disk.DiskStorageFactory.<init>(DiskStorageFactory.java:125)
[java] at
net.sf.ehcache.store.disk.DiskStore.create(DiskStore.java:156) [java] at
 
net.sf.ehcache.store.DiskBackedMemoryStore.createDiskStore(DiskBackedMemoryStore.java:61)
[java] at
net.sf.ehcache.store.DiskBackedMemoryStore.create(DiskBackedMemoryStore.java:49)
[java] at net.sf.ehcache.Cache.initialise(Cache.java:1097) [java] at
net.sf.ehcache.CacheManager.initializeEhcache(CacheManager.java:1298)
[java] at
net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1329)
[java] at net.sf.ehcache.CacheManager.addCache(CacheManager.java:1227)
[java] at
org.springframework.cache.ehcache.EhCacheFactoryBean.afterPropertiesSet(EhCacheFactoryBean.java:332)
[java] at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
[java] at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
[java] ... 173 more [java] Caused by: java.io.IOException: Permission
denied [java] at java.io.UnixFileSystem.createFileExclusively(Native
Method) [java] at java.io.File.createNewFile(File.java:947) [java] at
net.sf.ehcache.DiskStorePathManager$DiskStorePath.<init>(DiskStorePathManager.java:322)
[java] ... 187 more

I have seen several posts pointing to this link as as solution, http://community.jaspersoft.com/wiki/javaioioexception-permission-denied...

This information does not seem to help me. I tried creating a directory /temp and gave it permissions 777 but the errors continue.

The file specified is buildomatic/conf_source/iePro/applicationContext-web-services.xml but I am not using the Pro version. The file buildomatic/conf_source/ieCe/applicationContext-web-services.xml does not exist. I found a file by same name in WEB-INF which does have a tempFolder property. I tried changing it from temp to tmp and ran <js-install>/js-install-ce.sh but the errors still exist.

Does anyone know what else could be wrong or have an advice on something I may be overlooking? Thanks!

jasperreportsuser's picture
Joined: Apr 3 2014 - 10:46am
Last seen: 3 years 10 months ago

No matter what I do the stack trace looks bad.  I'll take a suggestion on how to present that better too if someone has one.

jasperreportsuser - 5 years 4 months ago
You should install JRS as a non-root user. To achieve the aim of non-root execution of the tomcat process, our in house installation expert has suggested the following approach:
 
1) login as a non-root user (ie testuser)
 
2) run through the standard installer screens (the default install location /opt would normally have enough permissions to allow the testuser to install)
 
3) start JRS after the install
 (<js-install-dir>/ctlscript.sh start
 
Now, the user will see two processes: 
testuser apache-tomcat process
postgres postgres database process
 
Postgresql is a little unusual in that it actually creates a user named "postgres" when it installs and initializes itself. And then the process runs under this user. But apache tomcat is more simple and simply runs under the user who starts the process. So, the point is to *not* install as the root user.
tchen - 5 years 3 months ago

Thank you for the comment.  I am attempting exactly what you describe.  I am running the installer as a non-root user and do use the default install location. However, that defaults to users home directory. The error I posted is coming during an attempt at installation by a non-root user.

jasperreportsuser - 5 years 3 months ago

0 Answers:

No answers yet
Feedback
randomness