Skip to content

Comments

7700 payara 5.2021.4#7701

Merged
kcondon merged 11 commits intoIQSS:developfrom
poikilotherm:7700-payara-5.2021.1
Jun 29, 2021
Merged

7700 payara 5.2021.4#7701
kcondon merged 11 commits intoIQSS:developfrom
poikilotherm:7700-payara-5.2021.1

Conversation

@poikilotherm
Copy link
Contributor

@poikilotherm poikilotherm commented Mar 18, 2021

What this PR does / why we need it:
Update to Payara 5.2021.4. New features like MPCONFIG 2.0 ahead.

Which issue(s) this PR closes:

Closes #7700

Unblocks #7245, #7695 and maybe #7680, might be beneficial for #5794

Special notes for your reviewer:
Did I miss any place after grepping for "5.2020.6"?

Suggestions on how to test this:
Install Payara 5.2021.1, compile, package, deploy. Using regular integration tests, don't we?

Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Nope.

Is there a release notes update needed for this change?:
Yes. 🔋 included.

Additional documentation:
None

@djbrooke
Copy link
Contributor

Hey @poikilotherm - I'm not sure I have an answer, but what are your thoughts on how often we should upgrade Payara? I know we upgraded last release as well.

It sounds like in this case it's unlocking some specific functionalities that you will unblock you, which is great. But, do we expect to continue this pattern of upgrading every release?

@poikilotherm
Copy link
Contributor Author

I'm not sure about a good answer for that, @djbrooke .

Currently, Payara Community Releases are roughly cutted every two to three months, which is quite similar to the frequency we do Dataverse releases.

Recently, the addition of MicroProfile Config 2.0 to Payara is a huge thing. As long as there are no security updates with the next release of Payara or any other huge bug resolved, we might be safe to skip it.

For installations using Ansible or containers, updating Payara is not realy a big deal. I understand that for a classic installation, that might be a problem. Maybe someone could create a script that does the update process more conveniently? It might manage at least parts of domain.xml, too, so updates get even easier when we want people to do changes to their domain config.

I think we should also ask the community about their opinion and which way to go. Usually production use cases benefit from regular and tested updates not just for the application but also the environment. Any production install should have some sort of strategy or at least opinion on how things should be dealt with.

We could also envision a second stable branch like master, but using updated dependencies. That way we could release early bird versions of a stable application (same version as master), yet let people test upcoming changes to the environment and see if stuff breaks. These changes might be incorporated into master once we consider it stable and mature, taking some of the pressure you mentioned. (This is actually quite similar to the Payara model of Community/Enterprise, so it might also allow for easier adoption of scenarios where people need support for Payara. Payara Enterprise releases are done with a much lower frequency)

@djbrooke
Copy link
Contributor

Thanks @poikilotherm - it sounds like you've thought about this and have some examples/strategies from other community-supported projects, which is great. I appreciate it. Like I mentioned, I'll rely on more technical people to provide some other opinions, but it was just something I wanted to flag for further discussion.

@pdurbin pdurbin self-assigned this Mar 22, 2021
Copy link
Member

@pdurbin pdurbin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, this looks great. I just have a question about the release notes.

Some changes in this release require an upgrade to Payara 5.2021.1 or higher.

Instructions on how to update can be found in the
[Payara documentation](https://docs.payara.fish/community/docs/5.2021.1/documentation/user-guides/upgrade-payara.html) No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the 5.3 release notes ( https://github.com/IQSS/dataverse/releases/tag/v5.3 ) we said:

It would likely be safer to upgrade Payara first, while still running Dataverse 5.2, and then proceed with the steps below. Upgrading from an earlier version of Payara should be a straightforward process: Undeploy Dataverse; stop Payara; move the current Payara directory out of the way; unzip the new Payara version in its place; replace the brand new payara/glassfish/domains/domain1 with your old, preserved domain1; start Payara, deploy Dataverse 5.2. We still recommend that you read the detailed upgrade instructions above; and, if you run into any issues with this upgrade, it will help to be able to separate them from any problems with the upgrade of Dataverse proper.

@poikilotherm how do you feel about putting equivalent text here? We can always remove it, especially at release time, if we decide we don't need it.

Copy link
Contributor Author

@poikilotherm poikilotherm Mar 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. If we merge the other PR containing changes only compatible with an upgraded Payara, we should mention updating the environment first before deploying the new WAR.

Do you feel like pushing a maintainer commit?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@djbrooke mention this, but I am wary of upgrading Payara too often. I get that we took way too long to upgrade from Glassfish 4, but we don't want every release to include a Payara upgrade. (we should try to limit them to some more standard schedule - once a year, maybe 1 every 6 months). Unless of course there is a critical security fix.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@poikilotherm sure, done in 4e94a80

@scolapasta sure, but I saw "Unblocks #7245, #7695 and maybe #7680" and figured it's probably worth it. I'll put it in QA but please feel free to pull it out.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but one is a draft, one is not yet worked on, and the third we have a solution for that does not require an app server upgrade. So I don't really want this to get merged, at least not for 5.4 and then to decide when we want to have our next infrastructure upgrade like this.

Don't get me wrong, I want us to upgrade Payara, I just want us to manage it well, as it does require overhead for developers, for reviewers, for QA.

Let's have a tech hours discussion this week or next on it.

@pdurbin pdurbin assigned poikilotherm and unassigned pdurbin Mar 22, 2021
@pdurbin
Copy link
Member

pdurbin commented Apr 8, 2021

I just noticed some Swagger/OpenAPI goodness is coming in Payara 5.2021.2 according to #5794 (comment) so maybe we should upgrade to .2 instead of .1.

@poikilotherm
Copy link
Contributor Author

I just noticed some Swagger/OpenAPI goodness is coming in Payara 5.2021.2 according to #5794 (comment) so maybe we should upgrade to .2 instead of .1.

Already in progress.

@poikilotherm poikilotherm changed the title 7700 payara 5.2021.1 7700 payara 5.2021.2 Apr 8, 2021
@poikilotherm poikilotherm force-pushed the 7700-payara-5.2021.1 branch from e799f48 to 804086e Compare April 8, 2021 15:02
@poikilotherm
Copy link
Contributor Author

Whoops my bad. Thx @djbrooke

@kcondon kcondon self-assigned this Jun 29, 2021
@kcondon
Copy link
Contributor

kcondon commented Jun 29, 2021

@poikilotherm I'm running into an issue deploying, gives the error: Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Access denied to execute this method : setURL

I recall seeing this the last time we upgraded payara but not sure what the answer was then. FYI, I have not upgraded postgres to 13 yet due to syncing with Harvard's installation and it being only recommended. Is this a db driver version issue?

Is it maybe something to do with the postgres driver being part of the war file now and perhaps a version issue?

@poikilotherm
Copy link
Contributor Author

Hi @kcondon 🙂

I am very confident this has nothing to do with an upgrade of Payara itself, as I have been deploying recent develop branch inside containers all day long 🙈 (yesterday). (So I don't have the latest merges tested you made yesterday...)

This makes me also confident it's not related to the driver included in the WAR or its version.

It might be Postgres 9.6 vs 13, but I did not test that (using 13 inside container).

Many deployment issues seem to arise from "dirty" appserver environments (leftovers, ...), which is pretty normal for devs not deploying inside a fresh container everytime.

There is a chance that the domain.xml has necessary changes in the newer version that would need to be applied to a copy of an old domain. As I am always deploying to a clean env, I can't catch those problems. I could create a diff between the old and new version, if you want.

Could you include a more verbose error log file here and/or maybe test with a fresh Payara install?

@kcondon
Copy link
Contributor

kcondon commented Jun 29, 2021

Hi @poikilotherm I was following the release notes upgrade instructions as folks with prior installations won't have a clean environment. I understand about not being able to consider all cases but this is an important one I think.

Here is the server.log error and tbh you and I saw this error in the past. There are two traces, the first has my db name listed twice (dvndbsimpledvndbsimple), that was also a prior issue we both had seen. Perhaps that's the root cause?

[2021-06-29T18:35:49.038+0000] [Payara 5.2021.4] [SEVERE] [] [javax.enterprise.resource.resourceadapter.com.sun.gjc.util] [tid: _ThreadID=134 _Thr
eadName=payara-executor-service-scheduled-task] [timeMillis: 1624991749038] [levelValue: 1000] [[
RAR5103 : Error setting java bean value : [dvndbsimpledvndbsimple]]]

[2021-06-29T18:35:49.039+0000] [Payara 5.2021.4] [SEVERE] [] [javax.enterprise.resource.resourceadapter.com.sun.gjc.util] [tid: _ThreadID=134 _Thr
eadName=payara-executor-service-scheduled-task] [timeMillis: 1624991749039] [levelValue: 1000] [[

java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.sun.gjc.util.MethodExecutor.runMethod(MethodExecutor.java:142)
at com.sun.gjc.common.DataSourceObjectBuilder.constructDataSourceObject(DataSourceObjectBuilder.java:118)
at com.sun.gjc.spi.ManagedConnectionFactoryImpl.getDataSource(ManagedConnectionFactoryImpl.java:1384)
at com.sun.gjc.spi.CPManagedConnectionFactory.getDataSource(CPManagedConnectionFactory.java:91)
at com.sun.gjc.spi.CPManagedConnectionFactory.createManagedConnection(CPManagedConnectionFactory.java:123)
at com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:87)
at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:919)
at com.sun.enterprise.resource.pool.ConnectionPool.createResource(ConnectionPool.java:1209)
at com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:98)
at com.sun.enterprise.resource.pool.ConnectionPool.addResource(ConnectionPool.java:288)
at com.sun.enterprise.resource.pool.ConnectionPool.createResourceAndAddToPool(ConnectionPool.java:1532)
at com.sun.enterprise.resource.pool.ConnectionPool.createResources(ConnectionPool.java:957)
at com.sun.enterprise.resource.pool.ConnectionPool.initPool(ConnectionPool.java:236)
at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:527)
at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:388)
at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:244)
at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:171)
at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:360)
at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:307)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:196)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:171)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:166)
at com.sun.gjc.spi.base.AbstractDataSource.getConnection(AbstractDataSource.java:113)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:138)
at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:172)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.setOrDetectDatasource(DatabaseSessionImpl.java:225)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:809)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:256)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:772)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:222)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:330)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:350)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:313)
at org.glassfish.persistence.jpa.JPADeployer$2.visitPUD(JPADeployer.java:507)
at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:571)
at org.glassfish.persistence.jpa.JPADeployer.iterateInitializedPUsAtApplicationPrepare(JPADeployer.java:553)
at org.glassfish.persistence.jpa.JPADeployer.event(JPADeployer.java:454)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepare(ApplicationLifecycle.java:564)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:576)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:556)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:552)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/javax.security.auth.Subject.doAs(Subject.java:361)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:551)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:582)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:574)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/javax.security.auth.Subject.doAs(Subject.java:361)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:573)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1497)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:120)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1879)
at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:149)
at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:532)
at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:437)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:371)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:362)
at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:231)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.IllegalArgumentException: URL invalid dvndbsimpledvndbsimple
at org.postgresql.ds.common.BaseDataSource.setUrl(BaseDataSource.java:1273)
at org.postgresql.ds.common.BaseDataSource.setURL(BaseDataSource.java:1289)
... 69 more
]]

[2021-06-29T18:35:49.039+0000] [Payara 5.2021.4] [WARNING] [] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.allocator] [tid: _ThreadID=134 _ThreadName=payara-executor-service-scheduled-task] [timeMillis: 1624991749039] [levelValue: 900] [[
RAR5038:Unexpected exception while creating resource for pool __SYSTEM/pools/__datasource_definition/dataverse-5.5/java:app/jdbc/dataverse. Exception : javax.resource.ResourceException: Access denied to execute this method : setURL]]

[2021-06-29T18:35:49.040+0000] [Payara 5.2021.4] [WARNING] [] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors] [tid: _ThreadID=134 _ThreadName=payara-executor-service-scheduled-task] [timeMillis: 1624991749040] [levelValue: 900] [[
RAR5117 : Failed to obtain/create connection from connection pool [ __SYSTEM/pools/__datasource_definition/dataverse-5.5/java:app/jdbc/dataverse ]. Reason : com.sun.appserv.connectors.internal.api.PoolingException: Access denied to execute this method : setURL]]

[2021-06-29T18:35:49.040+0000] [Payara 5.2021.4] [WARNING] [] [javax.enterprise.resource.resourceadapter.com.sun.gjc.spi] [tid: _ThreadID=134 _ThreadName=payara-executor-service-scheduled-task] [timeMillis: 1624991749040] [levelValue: 900] [[
RAR5114 : Error allocating connection : [Error in allocating a connection. Cause: Access denied to execute this method : setURL]]]

[2021-06-29T18:35:49.040+0000] [Payara 5.2021.4] [SEVERE] [] [org.eclipse.persistence.session./file:/usr/local/payara5/glassfish/domains/domain1/applications/dataverse-5.5/WEB-INF/classes/_VDCNet-ejbPU.ejb] [tid: _ThreadID=134 _ThreadName=payara-executor-service-scheduled-task] [timeMillis: 1624991749040] [levelValue: 1000] [[

Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.7.7.payara-p3): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Access denied to execute this method : setURL
Error Code: 0
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:318)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:150)
at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:172)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.setOrDetectDatasource(DatabaseSessionImpl.java:225)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:809)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:256)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:772)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:222)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:330)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:350)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:313)
at org.glassfish.persistence.jpa.JPADeployer$2.visitPUD(JPADeployer.java:507)
at org.glassfish.persistence.jpa.JPADeployer$PersistenceUnitDescriptorIterator.iteratePUDs(JPADeployer.java:571)
at org.glassfish.persistence.jpa.JPADeployer.iterateInitializedPUsAtApplicationPrepare(JPADeployer.java:553)
at org.glassfish.persistence.jpa.JPADeployer.event(JPADeployer.java:454)
at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)
at com.sun.enterprise.v3.server.ApplicationLifecycle.prepare(ApplicationLifecycle.java:564)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:576)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:556)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:552)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/javax.security.auth.Subject.doAs(Subject.java:361)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:551)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:582)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:574)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/javax.security.auth.Subject.doAs(Subject.java:361)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:573)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1497)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:120)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1879)
at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:149)
at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:532)
at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:437)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:371)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:362)
at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:231)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.sql.SQLException: Error in allocating a connection. Cause: Access denied to execute this method : setURL
at com.sun.gjc.spi.base.AbstractDataSource.getConnection(AbstractDataSource.java:119)
at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:138)
... 41 more
Caused by: javax.resource.spi.ResourceAllocationException: Error in allocating a connection. Cause: Access denied to execute this method : setURL
at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:319)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:196)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:171)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:166)
at com.sun.gjc.spi.base.AbstractDataSource.getConnection(AbstractDataSource.java:113)
... 42 more
Caused by: com.sun.appserv.connectors.internal.api.PoolingException: Access denied to execute this method : setURL
at com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:103)
at com.sun.enterprise.resource.pool.ConnectionPool.addResource(ConnectionPool.java:288)
at com.sun.enterprise.resource.pool.ConnectionPool.createResourceAndAddToPool(ConnectionPool.java:1532)
at com.sun.enterprise.resource.pool.ConnectionPool.createResources(ConnectionPool.java:957)
at com.sun.enterprise.resource.pool.ConnectionPool.initPool(ConnectionPool.java:236)
at com.sun.enterprise.resource.pool.ConnectionPool.internalGetResource(ConnectionPool.java:527)
at com.sun.enterprise.resource.pool.ConnectionPool.getResource(ConnectionPool.java:388)
at com.sun.enterprise.resource.pool.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:244)
at com.sun.enterprise.resource.pool.PoolManagerImpl.getResource(PoolManagerImpl.java:171)
at com.sun.enterprise.connectors.ConnectionManagerImpl.getResource(ConnectionManagerImpl.java:360)
at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:307)
... 46 more
Caused by: com.sun.appserv.connectors.internal.api.PoolingException: Access denied to execute this method : setURL
at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:932)
at com.sun.enterprise.resource.pool.ConnectionPool.createResource(ConnectionPool.java:1209)
at com.sun.enterprise.resource.pool.datastructure.RWLockDataStructure.addResource(RWLockDataStructure.java:98)
... 56 more
Caused by: com.sun.appserv.connectors.internal.api.PoolingException: Access denied to execute this method : setURL
at com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:110)
at com.sun.enterprise.resource.pool.ConnectionPool.createSingleResource(ConnectionPool.java:919)
... 58 more
Caused by: javax.resource.ResourceException: Access denied to execute this method : setURL
at com.sun.gjc.util.MethodExecutor.runMethod(MethodExecutor.java:157)
at com.sun.gjc.common.DataSourceObjectBuilder.constructDataSourceObject(DataSourceObjectBuilder.java:118)
at com.sun.gjc.spi.ManagedConnectionFactoryImpl.getDataSource(ManagedConnectionFactoryImpl.java:1384)
at com.sun.gjc.spi.CPManagedConnectionFactory.getDataSource(CPManagedConnectionFactory.java:91)
at com.sun.gjc.spi.CPManagedConnectionFactory.createManagedConnection(CPManagedConnectionFactory.java:123)
at com.sun.enterprise.resource.allocator.LocalTxConnectorAllocator.createResource(LocalTxConnectorAllocator.java:87)
... 59 more

@poikilotherm
Copy link
Contributor Author

Sorry @kcondon I really can't recall this issue. Looked around in #7419 and in issues, but could not find that.

I'm really wondering how the URL could be set to sth like "dvndbsimpledvndbsimple" as it should contain more than just that looking at http://github.com/IQSS/dataverse/blob/4c7d0afd7a9a643e4e79888e5a0feae9275f400f/src/main/java/edu/harvard/iq/dataverse/util/DataSourceProducer.java#L21-L21

You are sure that this env is clean? This looks completely random to me. 😞

@poikilotherm
Copy link
Contributor Author

Holy moly, was this from payara/Payara#4864, which was why we waited for 5.2020.6?

Yes!!! #7048 (comment)

@kcondon
Copy link
Contributor

kcondon commented Jun 29, 2021

@poikilotherm The previously encountered errors were ones we had discussed personally, I was looking for a record but cannot find them yet, unfortunately. The environment is a "real world" environment -my build box actually. It is a legitimate test and a necessary upgrade at any rate. I will also test a fresh install but this is the one I'm dealing with at the moment, the problem I'm reporting.

@poikilotherm
Copy link
Contributor Author

There is what you did last time 😄 #7048 (comment)

But these vars should be around now, right?

@kcondon
Copy link
Contributor

kcondon commented Jun 29, 2021

Yes!!! Thanks for finding it. I'd thought it had something to do with the driver (pr anyway) ;)

@poikilotherm
Copy link
Contributor Author

BTW: my deepest respect for your good memories with this one! 🙏 I completely forgot about it.

@poikilotherm
Copy link
Contributor Author

poikilotherm commented Jun 29, 2021

As we are upgrading to a very recent version, we can now include actually working defaults in the data source definition.
Should we do that @kcondon? (see #7695 for examples)

We could use a sane hostname like "postgresql" for the hostname (the default from the container images) and "5432" for the port. If "postgresql" could not be resolved as a hostname, the error message should be much more understandable.

BTW you should have some log messages about missing MPCONFIG values. I added this to Payara 5.2021.1 IIRC

@kcondon
Copy link
Contributor

kcondon commented Jun 29, 2021

I do not have those vars in my domain.xml, not sure why. I'm also running on .6 payara. I suppose I'd done a clean install at some point? Regardless, adding host and port vars corrected the problem. So in terms of upgrade, can we assume those vars will be in place? Also, why does it work without those with develop branch? 5.3 release notes say: (If you are using a PostgreSQL server on localhost:5432, you can omit dataverse.db.host and dataverse.db.port.) . That is my config so I shouldn't need them but my note in the driver pr says I needed them anyway. Not sure how this discrepancy remained unresolved, unless it is an initial deployment issue only?

@poikilotherm
Copy link
Contributor Author

poikilotherm commented Jun 29, 2021

clears throat
hushy voice

I have more intel about the correct timings now. I learned that vars living inside microprofile-config.properties can never ever be used in var expansion inside annotation based resources or other stuff happening before the application has started / CDI context is fully initialized / startup beans do their jobs.

🥺 It might be a good idea to correct the 5.3 release notes...

@poikilotherm
Copy link
Contributor Author

@pdurbin says on Matrix we should focus on Payara in this PR.
But I might create an issue to change the 5.3 release notes and discuss the defaults thing further.

@pdurbin
Copy link
Member

pdurbin commented Jun 29, 2021

Yeah, I figure we'll have a chance to revisit stuff beyond the Payara upgrade in pull request #7695 (which depends on the upgrade).

@kcondon
Copy link
Contributor

kcondon commented Jun 29, 2021

OK, so assuming we fix the v5.3 notes, we can then count on host and port to be there after an upgrade? Should be mention them in passing in these notes as a reminder: make sure you followed the v5.3 db conn update if upgrading from earlier version, particularly, user, password, host, port? or is that overkill? Meanwhile I've smoke tested and all is good. Will now do a clean install and perhaps merge unless there is some further clarification in docs/notes needed? Opinions?

@poikilotherm
Copy link
Contributor Author

poikilotherm commented Jun 29, 2021

I'd be fine with using "localhost" as a default for the server part. Should serve lots of people, devs & admins alike, good things. It's easy to switch for me in the container images by setting an default env var.

@kcondon
Copy link
Contributor

kcondon commented Jun 29, 2021

@poikilotherm Not sure what you mean -are they needed in domain.xml because there are no defaults? In that case we'd need both localhost and 5432, just tested ;)

I need to leave soon to be somewhere but will do a quick installation test. After that, assuming it works we could merge unless there are other changes being discussed.

And since I'm here, this is still broken
make: *** No rule to make target ../../conf/solr/8.8.1/schema_dv_mdb_copies.xml', needed by dvinstall/schema.xml'. Stop.

@poikilotherm
Copy link
Contributor Author

poikilotherm commented Jun 29, 2021

Yes, there are no defaults in place as is.

(Regarding Solr: I wasn't the one who broke that. There is WIP in #7904)

@kcondon
Copy link
Contributor

kcondon commented Jun 29, 2021

OK, the new install worked fine, do we merge or make changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update to Payara 5.2021.3

6 participants