excepção java na instalação da Platform Server 5.0.2.51 for Java

excepção java na instalação da Platform Server 5.0.2.51 for Java

  
Boas,

Estou a criar o ambiente de desenvolvimento em OutSystems e para isso estou a usar uma máquina virtual de 64bits, com CentOS 5.7, JBoss Community Application Server 5.1.0 GA, Oracle 11g XE, JDK6u27, Apache Ant 1.8.2 e Platform Server 5.0.2.51 for Java.

Segui a "Checklist for Agile Platform Server Installation" e no final da mesma, na fase de configuração da plataforma ágil, deparo com um erro (uma excepção JAVA):

"Exception in thread "main" java.sql.SQLException: Cannot get Connection from Datasource With errorcode : 45257"

Já durante a configuração da plataforma, no item relativo ao Session Database, ocorre a mesma falha de ligação:

"Session username [OSSTATE]: OSSTATE
Session password (Enter to keep current one):
ERROR: Could not connect to database with the given credentials.
Cannot get Connection from Datasource With errorcode : 45257"

Em anexo tenho todo o processo tirado da consola.

Agradeço ajuda,
Rui Pereira
Hi Rui, welcome to the OutSystems Community
 
Apparently either the database is not running or you missed something in the database configuration.
 
I had the same problem with 11g the scripts provided by Oracle to start and stop the database didn't work (dbstart and dbshut) so I had to made my own scripts and set them in the init.d to ensure the database was up before the OutSystems processes started.
 
Best regards,
PC
Hi Pedro and thanks for the answer,

I´m not sure I understand your post, since my problem occurs when using the configurationTool, and the database was up and running (I had just re-runned one of the scripts).

Could it be that some boot problem (or the order of the boot)  is affecting the deployment of the platfform?

Thanks again,
Rui Pereira
Rui,

I'm taking then, that you can connect via sqlplus in the console to access the database (and that specific schema)

Can you check the file /etc/sysconfig/outsystems and check that the JAVA_HOME, JBOSS_HOME, ANT_HOME, OUTSYSTEMS_HOME and CURRENTHOSTIP exist and are correctly filled?

Best regards,
PC
I can confirm that I can connect via sqlplus via console, and outside with sql developer. I've tried all users the scripts create, and checked the tablespaces exist.

And the JAVA_HOME, JBOSS_HOME, ANT_HOME, OUTSYSTEMS_HOME and CURRENTHOSTIP exist and are correctly filled in the /etc/sysconfig/outsystems.

I've also TNSpinged, to make sure it wasn't there either.

Thanks again for your time, if you have any more ideas, I would be grateful.

Rui Pereira
Now that I look to the log you provided you have alot of errors like:
ERROR: Could not connect to database with the given credentials.
Cannot get Connection from Datasource With errorcode : 45257
Are you sure users and schemas were created sucessfully and you can connect using those users?

Best regards,
PC
Another thing you may want to check:
Database SID [localhost]: xe
Session Database SID [localhost]:
Are you using 2 different SID's? Is the SID really localhost? I'm pretty sure the error is here.

Best regards,
PC
Thanks a million Pedro Coelho, you were right, the definition of two SID was the issue.

Got another issue with a timeout, re-ran the configuration tool and changed the default query timeout and it solved it.

I do have another problem now, but the error doesn't give much information:

Creating ServiceCenter default tenant...
Message 1
  Id         : InternalError_GenericException
  Type       : [Error]
  Message    : Error publishing in node localhost (127.0.0.1): Internal Error
  Submitable : true
  Details    :

No idea here, help accepted,

Rui Pereira

Hello,

This usually happens for one of two reasons:
 - The Deploy service is down or in a error state. Do a service outsystems restart deployer
 - The Jboss service is down or in a error state. Do a service jboss-outsystems restart.
If the error persists, you can have more information on the Jboss log, in the $JBOSS_HOME/server/outsystems/log/server.log file.

Best Regards,
Rui,

Try to check the directory /var/lib/jbossas/server/outsystems/log to see what the logs mention

jbossas could be jbosseap I'm not sure the directory Jboss comunity is installed (/var/lib/jbossas it's the $JBOSS_HOME in the enterprise edition default install)

Best regards,
PC
Hi again,

Got the server.log from /opt/jboss-5.1.0.GA/server/outsystems/log/ as you asked.

Tried what Rui Eugénio said and restarted both outsystems and jboss, ran SCInstall again and this time still error, but somewhat different:

Compiling ServiceCenter eSpace...
Message 1
  Id         : InternalError_Exception
  Type       : [Error]
  Message    : Internal Error
  Submitable : true
  Details    :
Invalid compiler output.
java.sql.SQLTimeoutException: ORA-01013: user requested cancel of current operation

  HelpRef    : 2063
  ExtraInfo  :
Exception Details:
[1] Internal Error: Invalid compiler output.
java.sql.SQLTimeoutException: ORA-01013: user requested cancel of current operation

So I´m guessing a timeout again, but I had already changed de default query timeout to 90 s. Isn´t increasing any more exagerating?

Back at you,

Rui Pereira

Rui,

If you do a service jboss-outsystems status is it up? And a service outsystems status also everything is up?

Best regards,
PC
Hello Rui,

I think I know what the problem is.

By checking the server.log you provided, I can see that the port 8080 is already being used.

I also saw that you're using Oracle XE, which by default (unless you say so) uses the port 8080 as well.

You can check which application is using that port by running: netstat -anp
(check the PID associated with the port 8080 which is in LISTEN state)

If this is the case, I suggest to change the port used by Oracle XE (re-configure it / reinstall it)
since the JBOSS needs that port  (I think that it is a requirement, you can confirm in the checklist).


Cheers,

Pedro
Hi,

Pedro Manuel was correct, changing the http listener port of XE was the last step on this long walk.

Thank you all for your help, really couldn't have done it without you.

Many thanks,

Rui Pereira
Hi guys, (yes, I'm new in the community), and I'm working around, as hobbie, inside Agile Platform, almost a year, in Windows version;

This is my first post, since there is no much information about AgilePlatform+jboss+Oracle+Linux(RH based distros).

I'm trying to get Platform working too, on this side, with CentOS 6, Oracle 11g Standard, jboss 1.5.0 GA, ant 1.8.2, jdk 1.6.22, everything was done like in the checklist.

I concluded the whole installation process except the license part.

As you guys can see:

....
Start installing Service Center v5.0.2.51...
 
Publishing Extension(s)...
Publishing Extension 'OMLProcessor'...
Publishing Extension 'IntegrationStudio'...
Reading ServiceCenter.oml oml file information...
Adding ServiceCenter eSpace to database...
Compiling ServiceCenter eSpace...
Preparing ServiceCenter eSpace deployment...
Deploying ServiceCenter eSpace...
Creating ServiceCenter default tenant...
Preparing database...
Initializing Service Center...
Validating license...
Licensing Error: Cannot fix the features usage. No license was found for this server.
Finished installing Service Center v5.0.2.51!
 
Done!
Service Center Installer v5.0.2.51
 
Publishing Extension(s)...
Publishing Extension 'RichMail'...
Done!
....

With this problem I can't access to ServiceCenter since there is no "admin" user created. Does anyone knows some soluction to get this working?


PS.: everytime I acess to http://server_host/ServiceCenter, it redirect's me to: http://server_host/customHandlers/internalerror.jsp, showing the message: " There was an error processing your request. Please try again later...".. even if I restart the whole instances (DB+outsystems+jboss)...


Thank you, Outsystems and Community, for this abusive, massive and wonderfull platform,
Regards,
André Pinela
 
Hi André,

You probably got a bootstrap error during SCinstall. The error should have been logged/printed.

Anyway, try to run SCinstall again, to see if the problem is solved.


Cheers,

Pedro
Hi,

I've already tried that, 2 our 3 times, without success, I will try to clear OSSYS_ACTIVATION table... and publish SC again.

Regards,
André Pinela
Hello,

Just to inform you that this won't do any good. This error in the SCInstall is expected on the first install since no licensing file is present in the first installation.
The problem may be in the deployment or in the bootstrap. Please check the contents of the /opt/jboss-5.1.0.GA/server/outsystems/log/server.log to see more information about the error.

Hope this helps,
Rui Eugénio
Hi,

From  /opt/jboss-5.1.0.GA/server/outsystems/log/server.log I got this:

2011-11-03 17:43:14,478 ERROR [outsystems.hubedition.util.ServerLog] (http-0.0.0.0-8080-2) Error openning connection to the database: Error during pool creation in Universal Connection Pool Manager With errorcode : 45385
The retrying was unsuccessful.
 
   at outsystems.hubedition.runtimeplatform.db.ojdbcpool.OJDBCPoolAux.<init>(Unknown Source)
   at outsystems.hubedition.runtimeplatform.db.ojdbcpool.OJDBCPool.getConnection(Unknown Source)
   at outsystems.hubedition.runtimeplatform.db.ojdbcpool.OJDBCPool.connect(Unknown Source)
   at outsystems.hubedition.runtimeplatform.db.RtDbHelper.getConnection(Unknown Source)
.....
Caused by: oracle.ucp.UniversalConnectionPoolException: Universal Connection Pool already exists in the Universal Connection Pool Manager. Universal Connection Pool cannot be added to the Universal Connection Pool Manager
        at oracle.ucp.util.UCPErrorHandler.newUniversalConnectionPoolException(UCPErrorHandler.java:421)
        at oracle.ucp.util.UCPErrorHandler.newUniversalConnectionPoolException(UCPErrorHandler.java:389)
        at oracle.ucp.util.UCPErrorHandler.newUniversalConnectionPoolException(UCPErrorHandler.java:403)
        at oracle.ucp.admin.UniversalConnectionPoolManagerBase.setConnectionPool(UniversalConnectionPoolManagerBase.java:614)
        at oracle.ucp.admin.UniversalConnectionPoolManagerBase.createConnectionPool(UniversalConnectionPoolManagerBase.java:571)
        ... 56 more

So? :\

Best Regards,

André Pinela
Hello,

Did you try to restart the JBoss prior to do another SCInstall?
Also, are you using different Oracle user names for the Admin, Runtime, Log and Session? They must be different in order for the platform to work correctly.

Best Regards,
Hello again,

Did you try to restart the JBoss prior to do another SCInstall?
Yes.
Also, are you using different Oracle user names for the Admin, Runtime, Log and Session? They must be different in order for the platform to work correctly.
I'm using the default ones.

I'm attaching the jboss server.log...

Rgs,
APinela
Hello André,


Based on your logs, seems that you're having a trouble with the LOG and the SESSION users.

Could you try to run configuration tool again, and insert the credentials for those users again (don't bypass the steps).


After that restart jboss and the outsystems services, and try to run scinstall.

I'm not sure that this will solve your problem, since the configuration tool didn't show any errors, but you could give it a try.

Let me know if it solve your problem.


Cheers,

Pedro
Hi Pedro,

Still not working with that change.

What i've done?
sh configurationtool.sh (reconfigured OSLOG user + pw)
 /etc/init.d/jboss-outsystems restart
 /etc/init.d/outsystems restart 
sh scinstall.sh

Got the same  problem!

I think I found the problem but I don't know how to solve it.
In LogServer.log, I noticed an error related with MessageQueue in LogServer.

More details in the attached log.

Thank you Pedro for all the help!

Cheers,
André Pinela
Hi André. I have been looking at the log you attached. Are you performing a clean installation? Did you install some old agile plaform rpm in this machine?
I would like you to send me the file $JBOSS_HOME/server/outsystems/deploy/outsystems.hubedition.ojdbcpool.war and the contents of $JBOSS_HOME/server/outsystems/tmp (if it isn't too large). I suspect that there's a mismatch on these files. Can you provide us with that?

Thanks,
Leonardo Fernandes
Hi Leonardo,

Thank you for your help.

It's the 3rd clean installation. Always the same issue, in the console, the error is the same, "Validation license... ERROR..", in the logs, the error turns into a failure on  pool connections... the oracle users are well created, the default ones, as the checklist says. It's very strange.

Here they are.

Regards,
André Pinela
Hi. Your file indeed mismatches with the version of the agile platform you have installed. We detected this inconsistency and will fix it in a future release.

However, it should be easy to fix your installation. Just copy the file $OUTSYSTEMS_HOME/outsystems.hubedition.ojdbcpool.war into $JBOSS_HOME/server/outsystems/deploy/outsystems.hubedition.ojdbcpool.war and restart JBoss (service jboss-outsystems restart). Then perform another sh scinstall.sh, and it should work.

Regarding the error that appears in your scinstall - it's because you don't have any license yet. It will continue to appear, until you upload a license in ServiceCenter. If you don't have a license, please contact our support.

Thanks,
Leonardo Fernandes
Hi again Leonardo,

Thank you, it's working!

Cps,
André Pinela
I have the same problem!

"Cannot get Connection from Datasource With errorcode : 45257"

The license expired and now cant access anything! 
Leonardo

v8.0.1.7

Unable to find  $OUTSYSTEMS_HOME/outsystems.hubedition.ojdbcpool.war 

Where is the default path $OUTSYSTEMS_HOME?
/opt/outsystems/platform/ ?

Hi Robert.
This thread is very old, so I would not assume that you're having the exact same problem as the thread is describing.

The OUTSYSTEMS_HOME is indeed /opt/outsystems/platform

The "cannot get connection from datasource" is an error happening in the oracle database driver. I would first make sure that the database is healthy, and that the front end can reach the database.
The expired license may be a false alarm, just a symptom that happens when the platform cannot reach the database to validate the license.

Let me know if it helps you.
Leonardo Fernandes
Leonardo

Refer to https://www.outsystems.com/SupportPortal/case-698178-283B068

I have 3 servers, all 3 servers was once fully functional, no changes were made to these servers. Suddenly all 3 servers stopped working, all 3 servers now have the same issue.

?I'm unable to upload a new license since Service Center is no longer accessible.

(These servers are temportary, I only require access to the app and app data for migration)

---------
Cannot get Connection from Datasource With errorcode : 45257

java.sql.SQLException: Cannot get Connection from Datasource With errorcode : 45257
	at outsystems.runtimeservices.db.ojdbcpool.OJDBCPoolAux.



Robert, your symptoms point to something wrong with the database. That would explain all the nodes stopping at the same time. It's also the cause of that error.
Do a sanity check on your database configurations (run /opt/outsystems/platform/configurationtool.sh and see if the database options are correct). Also check the connectivity from your front ends to your database.
Any idea how to fix this? 

I'm unable to find in 8.0.1.7
$OUTSYSTEMS_HOME/outsystems.hubedition.ojdbcpool.war



Note: Outsystems, java, jboss have all been installed in its the default location.

Leonardo Fernandes wrote:
Robert, your symptoms point to something wrong with the database. That would explain all the nodes stopping at the same time. It's also the cause of that error.
Do a sanity check on your database configurations (run /opt/outsystems/platform/configurationtool.sh and see if the database options are correct). Also check the connectivity from your front ends to your database.
 I ran /opt/outsystems/platform/configurationtool.sh, its unable to connect to the database, the database is on the local machine (localhost).

Which is strange since the settings have not been modified. 

The database is up and running, im able to connect to the database via sqlplus and running the command "connect sys as sysdba"
 
The platform was installed with the following community installer http://www.outsystems.com/forums/discussion/10772/community-installer-for-java/


Robert, no doubt that you have something wrong with your database. Although I didn't understand one thing.
You said that you have 3 servers, but the database is local. So you have 3 different servers, with 3 different databases and 3 different platforms? And all of them stopped working at the same time?

I am not an Oracle expert. But I remember that Oracle is specially sensitive to changes in IP addresses. Check your configuration files in /usr/lib/oracle/xe/app/oracle/product/11.2.0/server/network/admin if they are using an old IP address, or a hostname that is no more. Source: http://docs.oracle.com/cd/E26996_01/E18548/html/CHDEIIAI.html

You may also try restarting oracle: /etc/init.d/oracle-xe restart
Issue found, I logged in using sqlplus, and found that the password has expired.

It prompt me to enter a new password and now everything works again!