#1 2022-06-21 09:47:14

Johann
Member
Registered: 2022-05-30

ReportServer Manual Installation: How to configure setenv.bat / setenv

According to https://reportserver.net/en/guides/conf … tallation/

As of Java 11 or newer, you need some extra configuration which can be done in the setenv.bat / setenv.sh of your Tomcat environment. Specifically, the following configuration is needed:

--add-opens=java.base/java.net=ALL-UNNAMED
--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED
--add-opens=java.base/jdk.internal.reflect=ALL-UNNAMED
-Djavax.net.ssl.trustStoreType=JKS

1. Should the setenv.bat / setenv.sh file be created under the /bin directory?
2. How do we enable the configuration above? If we are using a Mac/Linux system, do we just copy and paste the following into the setenv.bat / setenv.sh file?

--add-opens=java.base/java.net=ALL-UNNAMED
--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED
--add-opens=java.base/jdk.internal.reflect=ALL-UNNAMED
-Djavax.net.ssl.trustStoreType=JKS

Or do we use something like the following:

export --add-opens=java.base/java.net=ALL-UNNAMED
.
.
.

Thank you!

Last edited by Johann (2022-06-21 09:52:15)

Offline

#2 2022-06-21 09:50:03

eduardo
Administrator
Registered: 2016-11-01
Website

Re: ReportServer Manual Installation: How to configure setenv.bat / setenv

Hi Johann,

these are standard Tomcat settings, pls check the Tomcat documentation on the web for more details.
You can also check the Bitnami packages where this is already set.

Regards,
Eduardo

Offline

#3 2022-06-21 10:11:42

Johann
Member
Registered: 2022-05-30

Re: ReportServer Manual Installation: How to configure setenv.bat / setenv

Hi Eduardo,

Thank you for the quick reply. I have tried following the documentation, but when I try to start ReportServer I still get the same result as follows:

https://ibb.co/PD57kR6

Am I missing something?

Offline

#4 2022-06-21 13:26:24

eduardo
Administrator
Registered: 2016-11-01
Website

Re: ReportServer Manual Installation: How to configure setenv.bat / setenv

Hi Johann,

you seem to miss either the persistence.properties file in the internal files, or better, in the external config dir, pls check here: https://reportserver.net/en/tutorials/i … -practice/

"Setting up ReportServer"
and here: https://reportserver.net/en/guides/conf … Configdir/

Regards,
Eduardo

Offline

#5 2022-06-22 01:30:53

Johann
Member
Registered: 2022-05-30

Re: ReportServer Manual Installation: How to configure setenv.bat / setenv

Thanks Eduardo. At the following step from https://reportserver.net/en/tutorials/i … -practice/

Having changed the configuration, let's give the tomcat user the necessary permissions to read the configuration files:

chown -R tomcat7:tomcat7 /opt/reportserver

As I have installed tomcat 8 on my Mac, what should the command be exactly? I tried various combinations of "tomcat7", "tomcat8" and "tomcat" and my own Tomcat user "admin", but I get the error:

"chown: tomcat: illegal group name"

using this command:

 chown -R tomcat7:tomcat7 /opt/reportserver 

When I try to just change the permissions for a user. I get the error:

chown: tomcat7: illegal user name

using this command:

 chown -R tomcat7 /opt/reportserver 

Offline

#6 2022-06-22 01:45:07

Johann
Member
Registered: 2022-05-30

Re: ReportServer Manual Installation: How to configure setenv.bat / setenv

Now I can start ReportServer with no errors, but when I try to login I get the following error:

org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection<br>	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)<br>	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)<br>	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)<br>	at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:111)<br>	at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getPhysicalConnection(LogicalConnectionManagedImpl.java:138)<br>	at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.getConnectionForTransactionManagement(LogicalConnectionManagedImpl.java:276)<br>	at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.begin(LogicalConnectionManagedImpl.java:284)<br>	at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.begin(JdbcResourceLocalTransactionCoordinatorImpl.java:246)<br>	at org.hibernate.engine.transaction.internal.TransactionImpl.begin(TransactionImpl.java:83)<br>	at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:60)<br>	at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:112)<br>	at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)<br>	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)<br>	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br>	at java.base/java.lang.reflect.Method.invoke(Method.java:566)<br>	at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:587)<br>	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:333)<br>	at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:112)<br>	at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)<br>	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:303)<br>	at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:112)<br>	at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)<br>	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:373)<br>	at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)<br>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:681)<br>	at javax.servlet.http.HttpServlet.service(HttpServlet.java:764)<br>	at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:112)<br>	at net.datenwerke.gf.service.gwtstacktrace.CatchStacktraceInterceptor.invoke(CatchStacktraceInterceptor.java:38)<br>	at com.google.inject.servlet.ServletDefinition.doServiceImpl(ServletDefinition.java:290)<br>	at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:280)<br>	at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:184)<br>	at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:89)<br>	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:85)<br>	at com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:94)<br>	at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:82)<br>	at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:121)<br>	at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:133)<br>	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)<br>	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)<br>	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197)<br>	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)<br>	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)<br>	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135)<br>	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)<br>	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:698)<br>	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78)<br>	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:367)<br>	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:639)<br>	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)<br>	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:882)<br>	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1691)<br>	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)<br>	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191)<br>	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)<br>	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)<br>	at java.base/java.lang.Thread.run(Thread.java:834)<br>Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!<br>	at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)<br>	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:692)<br>	at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140)<br>	at org.hibernate.c3p0.internal.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:72)<br>	at org.hibernate.internal.NonContextualJdbcConnectionAccess.obtainConnection(NonContextualJdbcConnectionAccess.java:38)<br>	at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:108)<br>	... 53 more<br>Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.<br>	at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1507)<br>	at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:644)<br>	at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:554)<br>	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:758)<br>	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:685)<br>	... 57 more<br>Caused by: org.postgresql.util.PSQLException: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.<br>	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:319)<br>	at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49)<br>	at org.postgresql.jdbc.PgConnection.&lt;init&gt;(PgConnection.java:223)<br>	at org.postgresql.Driver.makeConnection(Driver.java:402)<br>	at org.postgresql.Driver.connect(Driver.java:261)<br>	at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:175)<br>	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:220)<br>	at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:206)<br>	at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:203)<br>	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1176)<br>	at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1163)<br>	at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)<br>	at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1908)<br>	at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)<br>Caused by: java.net.ConnectException: Connection refused (Connection refused)<br>	at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)<br>	at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399)<br>	at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242)<br>	at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224)<br>	at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403)<br>	at java.base/java.net.Socket.connect(Socket.java:608)<br>	at org.postgresql.core.PGStream.createSocket(PGStream.java:241)<br>	at org.postgresql.core.PGStream.&lt;init&gt;(PGStream.java:98)<br>	at org.postgresql.core.v3.ConnectionFactoryImpl.tryConnect(ConnectionFactoryImpl.java:109)<br>	at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:235)<br>	... 13 more<br>

I am using the PostgreSQL database and understand from the documentation (https://reportserver.net/en/guides/conf … tallation/) that no installation of jdbc drivers is needed:

ReportServer comes bundled with drivers for the open source databases MySQL (http://www.mysql.com) and PostgreSQL (http://www.postgresql.org). If you use either of these databases you do not need to manually copy the jdbc driver to the lib directory.

What could be the issue?

Offline

#7 2022-06-22 01:53:26

Johann
Member
Registered: 2022-05-30

Re: ReportServer Manual Installation: How to configure setenv.bat / setenv

Update: Not sure what I did but changed the PostgreSQL port number, and then changed it back and now I am able to log in!

Offline

#8 2022-06-22 08:19:58

eduardo
Administrator
Registered: 2016-11-01
Website

Re: ReportServer Manual Installation: How to configure setenv.bat / setenv

Hi Johann,

pls note that the link above is a little outdated, we are working on updating its components. We do not recommend to install tomcat 8 or tomcat 7. Tomcat 9 is the recommended servlet container version. The installation should be analogous as described in the link.

Regards,
Eduardo

Offline

#9 2022-06-22 10:49:42

Johann
Member
Registered: 2022-05-30

Re: ReportServer Manual Installation: How to configure setenv.bat / setenv

Got it, thanks Eduardo!

Offline

Board footer

Powered by FluxBB