" /> [UCS] Could not create datasource - Genesys CTI User Forum

Author Topic: [UCS] Could not create datasource  (Read 62994 times)

This topic contains a post which is marked as Best Answer. Press here if you would like to see it.

Offline qoternaud

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
[UCS] Could not create datasource
« on: July 10, 2018, 12:20:37 PM »
Advertisement
Hello and thanks for the time you'll take to read this,

So i'm trying to install an universal contact server (UCS) and when i start it, i get the error :
[i]Initialization of UCS DAP Failed, reason 'Could not create datasource'.[/i]

I checked the configuration of my DAP and the login/password are correct (same for the DB name and ID)
So i have no ideas where this error is comming from.

If anyone has an idea please let me know.

Database used : Oracle 11g

Thanks !  :)
« Last Edit: July 10, 2018, 12:24:31 PM by qoternaud »

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: [UCS] Could not create datasource
« Reply #1 on: July 10, 2018, 01:36:00 PM »
Permissions on that user?
You can create the DB manually as well by running the scripts at the install folder


Enviado de meu E6633 usando o Tapatalk


Offline qoternaud

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Re: [UCS] Could not create datasource
« Reply #2 on: July 10, 2018, 01:41:05 PM »
[quote author=cavagnaro link=topic=11046.msg50209#msg50209 date=1531229760]
Permissions on that user?
You can create the DB manually as well by running the scripts at the install folder


Enviado de meu E6633 usando o Tapatalk
[/quote]

I created the tables by running the script in the install folder and i was using the user my UCS is using(through the DAP).
So the rights should be alright ?

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: [UCS] Could not create datasource
« Reply #3 on: July 10, 2018, 02:23:16 PM »
Try to check if your UCS instance is configured to be running under specific account with sufficient privileges (for example under "default" account or similiar one)

Offline gen_den

  • Full Member
  • ***
  • Posts: 176
  • Karma: 0
Re: [UCS] Could not create datasource
« Reply #4 on: July 11, 2018, 05:42:42 AM »
Are you using JDBC DAP or a normal DAP  with DB server?

Offline qoternaud

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Re: [UCS] Could not create datasource
« Reply #5 on: July 11, 2018, 12:41:10 PM »
[quote author=AK link=topic=11046.msg50214#msg50214 date=1531287762]
Are you using JDBC DAP or a normal DAP  with DB server?
[/quote]

i'm using JDCB with role : Main

Thanks for your answer

Offline qoternaud

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Re: [UCS] Could not create datasource
« Reply #6 on: July 11, 2018, 12:44:39 PM »
[quote author=Kubig link=topic=11046.msg50211#msg50211 date=1531232596]
Try to check if your UCS instance is configured to be running under specific account with sufficient privileges (for example under "default" account or similiar one)
[/quote]

Yes in genesys administrator the application has has the user default with Full control.
It's the one the UCS should be using.



Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: [UCS] Could not create datasource
« Reply #7 on: July 11, 2018, 12:47:39 PM »
Don't think Genesys user will impact DB access...no sense
Now, about JDBC or DAP, UCS uses JDBC...
I do remember also creating tables manually...will test to see if it creates them automatically. What does doc says about this point?


Enviado de meu E6633 usando o Tapatalk


Offline qoternaud

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Re: [UCS] Could not create datasource
« Reply #8 on: July 11, 2018, 01:11:36 PM »
i'll give more details :


14:47:06.664 Std 21136 [Ucs-Main] Using '7200' for transaction timeout to be consistent with query and long query timeout.
14:47:06.665 Std 29997 [Ucs-Main] JDBC debug is on
14:47:06.666 Std 29997 [Ucs-Main] Checking DB schema for 'DAP_UCS' with role 'Main'
14:47:07.037 Std 05066 Initialization of UCS DAP failed, reason 'Could not create datasource'
14:47:07.041 Std 29997 [Ucs-Main] Recoverable error from SQL layer:Could not create datasource, trying again in 10000ms
java.sql.SQLException: Could not create datasource
        at com.genesyslab.icc.util.DataAccessPointUtils.configureDataSource(DataAccessPointUtils.java:195)
        at com.genesyslab.icc.contactserver.ContactServerEngine.initDataSources(ContactServerEngine.java:881)
        at com.genesyslab.icc.contactserver.ContactServerEngine.initInstance(ContactServerEngine.java:539)
        at com.genesyslab.icc.contactserver.ContactServerEngine$4.run(ContactServerEngine.java:1404)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:oracle:thin:@xxxxxxxxxx:XXXX:xxxx, username = xxxxxx. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
java.sql.SQLRecoverableException: IO Error: Got minus one from a read call, connect lapse 0 ms., Authentication lapse 0 ms.
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:794)
        at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:688)
        at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:39)

I already created my tables, i checked that previously , and i listed all of them, the doc just ask to run the scripts.

Offline hsujdik

  • Hero Member
  • *****
  • Posts: 541
  • Karma: 30
Re: [UCS] Could not create datasource
« Reply #9 on: July 11, 2018, 11:24:44 PM »
Do you have an oracle client on the UCS host? If you do, you can check if the parameters to access the database are correct and the database is accessible by the UCS host using TNSPing tool as following:

[code]tnsping <user>/<password>@<database host>:<database port>/<oracle_sid> 10[/code]

The error "Got minus one from a read call" usually means that the JDBC Driver could not read the database (maybe the port which you specified is not open, or the ORACLE_SID name is incorrect). So the commandline above could give you a hint if it is not open or if it is something else. Only works if you have Oracle Client installed on that host.

Edit: if you are running UCS in Linux, also check if the user that your UCS is running (usually the same user as LCA) has the correct Java version on the PATH variable, and if the ojdbc[b]X[/b].jar is on the CLASSPATH variable (where X depends on your JRE version).
« Last Edit: July 11, 2018, 11:29:26 PM by hsujdik »

Offline qoternaud

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Re: [UCS] Could not create datasource
« Reply #10 on: July 12, 2018, 09:24:34 AM »
[quote author=hsujdik link=topic=11046.msg50222#msg50222 date=1531351484]
Do you have an oracle client on the UCS host? If you do, you can check if the parameters to access the database are correct and the database is accessible by the UCS host using TNSPing tool as following:

[code]tnsping <user>/<password>@<database host>:<database port>/<oracle_sid> 10[/code]

The error "Got minus one from a read call" usually means that the JDBC Driver could not read the database (maybe the port which you specified is not open, or the ORACLE_SID name is incorrect). So the commandline above could give you a hint if it is not open or if it is something else. Only works if you have Oracle Client installed on that host.

Edit: if you are running UCS in Linux, also check if the user that your UCS is running (usually the same user as LCA) has the correct Java version on the PATH variable, and if the ojdbc[b]X[/b].jar is on the CLASSPATH variable (where X depends on your JRE version).
[/quote]

I think that might be the reason, i tried to use tnsping on another host(which has an oracle database on it) to connect to the other database(UCS) and nothing happens then i get a [b]failed to resolve name[/b] but that's it.
[code]I used the command ./tnsping user/pwd@host:port/XE 10[/code]
XE is my SID i checked that with [code]ps -ef|grep pmon[/code]

I changed my user's PATH variable to :
[code]PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/genesys/bin:/usr/java/jre1.8.0_171-i586/bin/java:/home/genesys/bin
JAVA_HOME=/usr/java/jre1.8.0_171-i586/bin/java
[/code]
So it should be fine on this side.

What i find strange is that i can connect on the database(UCS) using sqlplus, and i created the tables.

But thanks for the answer, i think i'm little bit closer to a solution !

Offline hsujdik

  • Hero Member
  • *****
  • Posts: 541
  • Karma: 30
Re: [UCS] Could not create datasource
« Reply #11 on: July 12, 2018, 02:26:39 PM »
Just out of curiosity, what was the exact command line you used for connecting with sqlplus?

Offline qoternaud

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Re: [UCS] Could not create datasource
« Reply #12 on: July 16, 2018, 11:36:07 AM »
[quote author=hsujdik link=topic=11046.msg50228#msg50228 date=1531405599]
Just out of curiosity, what was the exact command line you used for connecting with sqlplus?
[/quote]

I used this one and it's working now ( i used DBServer Port instead of DB Port )
[code]
sqlplus 'user/pass@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=hostname.network)(Port=1521))(CONNECT_DATA=(SID=remote_SID)))' [/code]

But UCS still not working sadly

Offline hsujdik

  • Hero Member
  • *****
  • Posts: 541
  • Karma: 30
Re: [UCS] Could not create datasource
« Reply #13 on: July 16, 2018, 11:54:49 AM »
[quote author=qoternaud link=topic=11046.msg50226#msg50226 date=1531387474]
I changed my user's PATH variable to :
[code]PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/genesys/bin:/usr/java/jre1.8.0_171-i586/bin/java:/home/genesys/bin
JAVA_HOME=/usr/java/jre1.8.0_171-i586/bin/java
[/code]
So it should be fine on this side.

What i find strange is that i can connect on the database(UCS) using sqlplus, and i created the tables.

But thanks for the answer, i think i'm little bit closer to a solution !
[/quote]

Not quite sure if it is related, but the variable JAVA_HOME shoud point to the root install directory of JDK (not the JRE binary).

Edit: also, the ojdbc driver full path (including the filename and extension) should be in the CLASSPATH variable. E.g.:
export CLASSPATH=/usr/lib/ojdbc8.jar
« Last Edit: July 16, 2018, 12:05:01 PM by hsujdik »

Offline qoternaud

  • Newbie
  • *
  • Posts: 19
  • Karma: 0
Re: [UCS] Could not create datasource
« Reply #14 on: July 16, 2018, 01:06:20 PM »
[quote author=hsujdik link=topic=11046.msg50245#msg50245 date=1531742089]
[quote author=qoternaud link=topic=11046.msg50226#msg50226 date=1531387474]
I changed my user's PATH variable to :
[code]PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/genesys/bin:/usr/java/jre1.8.0_171-i586/bin/java:/home/genesys/bin
JAVA_HOME=/usr/java/jre1.8.0_171-i586/bin/java
[/code]
So it should be fine on this side.

What i find strange is that i can connect on the database(UCS) using sqlplus, and i created the tables.

But thanks for the answer, i think i'm little bit closer to a solution !
[/quote]

Not quite sure if it is related, but the variable JAVA_HOME shoud point to the root install directory of JDK (not the JRE binary).

Edit: also, the ojdbc driver full path (including the filename and extension) should be in the CLASSPATH variable. E.g.:
export CLASSPATH=/usr/lib/ojdbc8.jar
[/quote]

Ok so , yes i was missing JDBC Drivers , but do i need to put them in the DB Host or the UCS host i'm not quite sure , thanks.
( so same for the path )