Skip to Main Content

Data Science & Machine Learning

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-28575: unable to open RPC connection to external procedure agent

Penny CooksonApr 17 2020 — edited May 7 2020

Hi

Any help appreciated - trying to get Oracle Enterprise R working

I have installed R 3.3.0 with OML4R 1.5 on a Windows 10 server.  I have not done the client install as I am just working on the server.

Oracle 19 database with the OML4R install done into a PDB called ORA19PDB.

I used the downloaded R-3.3.0-win.exe for R, and ran C:\orabase\ORA19c\WINDOWS\R\server\rqcfg/.ql for the server instal

Connection works fine:

> ore.connect(user="OML4R", conn_string="ORA19PDB", password="OML4R", all=TRUE)

> ore.is.connected()

[1] TRUE

Call to OML4SQL works fine:

> example("ore.odmAI")

or.dAI>   IRIS <- ore.push(iris)

or.dAI>   ore.odmAI(Species ~ ., IRIS)

Call:

ore.odmAI(formula = Species ~ ., data = IRIS)

Importance:

              importance rank

Petal.Width   0.75224037    1

Petal.Length  0.50083423    2

Sepal.Length  0.04311746    3

Sepal.Width  -0.09256225    4

Call to any library fails:

> example("ore.glm")

or.glm> ## Don't show:

or.glm> if (!interactive())

or.glm+     ore.connect(user     = Sys.getenv("ORE_USERNAME", "rquser"),

or.glm+                 sid      = Sys.getenv("ORACLE_SID"),

or.glm+                 host     = Sys.getenv("HOST"),

or.glm+                 password = Sys.getenv("ORE_PASSWORD", "rquser"),

or.glm+                 port  = if (.Platform$OS.type == "windows")

or.glm+                            Sys.getenv("ORACLE_PORT")

or.glm+                         else

or.glm+                            Sys.getenv("TCPPORT"),

or.glm+                 all = TRUE)

or.glm> ## End(Don't show)

or.glm>   # Load libraries for examples

or.glm>   library(OREstats)

or.glm>   library(rpart)   # kyphosis and solder data sets

or.glm>   # Logistic regression

or.glm>   KYPHOSIS <- ore.push(kyphosis)

or.glm>   kyphFit1 <- ore.glm(Kyphosis ~ ., data = KYPHOSIS, family = binomial())

Error in .oci.GetQuery(conn, statement, data = data, prefetch = prefetch,  :

  ORA-28575: unable to open RPC connection to external procedure agent

ORA-06512: at line 11

ORA-06512: at "RQSYS.RQEVALIMPL", line 17

ORA-06512: at "RQSYS.RQEVALIMPL", line 14

ORA-06512: at line 6

Listener has no entries for extproc:

------------------------------------------------------------------------------------------------------------------------------

c:\orabase\ORA19c\WINDOWS\network\admin\listener.ora

# listener.ora Network Configuration File: C:\orabase\ORA19c\WINDOWS\NETWORK\ADMIN\listener.ora

# Generated by Oracle configuration tools.

LISTENER =

  (DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = TCP)(HOST = WIN10VM1)(PORT = 1521))

    )

  )

------------------------------------------------------------------------------------------------------------------------------

Tnsnames has no entries for extproc:

c:\orabase\ORA19c\WINDOWS\network\admin and

c:\orabase\ORA19c\WINDOWS\hs\admin

------------------------------------------------------------------------------------------------------------------------------

# tnsnames.ora Network Configuration File: C:\orabase\ORA19c\WINDOWS\NETWORK\ADMIN\tnsnames.ora

# Generated by Oracle configuration tools.

ORA19 =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = WIN10VM1)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = ORA19)

    )

  )

ORA19PDB =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = WIN10VM1)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = ORA19PDB)

    )

  )

PDB2 =

  (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = WIN10VM1)(PORT = 1521))

    (CONNECT_DATA =

      (SERVER = DEDICATED)

      (SERVICE_NAME = PDB2)

    )

  )

LISTENER_ORA19 =

  (ADDRESS = (PROTOCOL = TCP)(HOST = WIN10VM1)(PORT = 1521))

------------------------------------------------------------------------------------------------------------------------------

Extproc.ora has the following entries:

SET EXTPROC_DLLS=ANY

SET TRACE_LEVEL=ON

I have removed any other older oracle folders from the path to avoid picking up and old tnsnames

Environment Variables:

ORACLE_HOME   C:\orabase\ORA19c\WINDOWS

ORACLE_ID  ORA19

Path   C:\orabase\ORA19c\WINDOWS\bin;C:\Program Files\R\R-3.3.0\bin\x64;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%SYSTEMROOT%\System32\OpenSSH\;

2 Trace files produced when getting the ORA-28575 error :

------------------------------------------------------------------------------------------------------------------------------

Oracle Corporation --- 2020-04-18 09:25:34.896000000

Heterogeneous Agent Release

19.0.0.0.0

Oracle Corporation --- 2020-04-18 09:25:34.895000000

    Version 19.0.0.0.0

HOA 04/18 09:25:34.898000000: (horcrase_AllocStackElt) Entered!

HOA 04/18 09:25:34.898000000: (horcrase_AllocStackElt) Exiting...

HOA 04/18 09:25:34.899000000: (horcrpuoe_PushOciEnv) Entered!

HOA 04/18 09:25:34.899000000: (horcrpuoe_PushOciEnv) Exiting...

HOA 04/18 09:25:34.900000000: (horcries_InitExtprocSession) Exiting...

HOA 04/18 09:25:34.900000000: (hotkisc_InitSessionContext) Exiting...

HOA 04/18 09:25:34.901000000: (hotkec_EstablishConnection) Entered!

2020/04/18-09:25:34.902000000: Entered shorcsje_spawn_jssu_extproc

  HS: Parent extproc received the IN param, flags_horrx = 0x1000

  HS: Parent extproc is falling back to the old behavior with connect string = (ADDRESS=(PROTOCOL=BEQ)(PROGRAM=C:\orabase\ORA19c\WINDOWS\bin\extproc)(ARGV0=C:\orabase\ORA19c\WINDOWS\bin\extproc)(ARGS='(DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=BEQ)))'))

  HS: Parent extproc called nsbequeath! status = 0

2020/04/18-09:25:34.964000000: Exiting shorcsje_spawn_jssu_extproc, rc=0

  HS: Parent extproc is calling exit(0)!!!

HOA 04/18 09:25:34.965000000: (hotkec_EstablishConnection) Parent extproc called shorcsje_spawn_jssu_extproc, status = 0

------------------------------------------------------------------------------------------------------------------------------

second trace file

------------------------------------------------------------------------------------------------------------------------------

Oracle Corporation --- 2020-04-18 09:25:34.955000000

Heterogeneous Agent Release

19.0.0.0.0

Oracle Corporation --- 2020-04-18 09:25:34.955000000

    Version 19.0.0.0.0

HOA 04/18 09:25:34.956000000: (horcrase_AllocStackElt) Entered!

HOA 04/18 09:25:34.957000000: (horcrase_AllocStackElt) Exiting...

HOA 04/18 09:25:34.957000000: (horcrpuoe_PushOciEnv) Entered!

HOA 04/18 09:25:34.958000000: (horcrpuoe_PushOciEnv) Exiting...

HOA 04/18 09:25:34.958000000: (horcries_InitExtprocSession) Exiting...

HOA 04/18 09:25:34.959000000: (hotkisc_InitSessionContext) Exiting...

HOA 04/18 09:25:34.959000000: (hotkec_EstablishConnection) Entered!

2020/04/18-09:25:34.961000000: Entered shorcppt_print_pid_tid

  HS: extproc is writing [12988/12256] to stdout!

  HS: Null stdout handle! extproc failed to write.

2020/04/18-09:25:34.962000000: Exiting shorcppt_print_pid_tid

HOA 04/18 09:25:34.964000000: (hotkec_EstablishConnection) Child extproc called nsinherit, status = 0

------------------------------------------------------------------------------------------------------------------------------

This post has been answered by Sherry Lamonica-Oracle on Apr 22 2020
Jump to Answer

Comments

843859
Blob is the datatype you use as database column type to store binary data. You use PreparedStatement#setBinaryStream() to set it in a SQL query and you use ResultSet#getBinaryStream() to obtain it from the SQL result.
796254
i'd recommend storing the path to a file in the database and putting the images themselves on the file system.

%
843859
thank you for your kind answer.
So I did a mistake: 'do not exists a BinaryStream column type!!!!
....and the statement: setBlob(), setBinaryStream() both work with the only Blob colum type...
If I good unsertood, you recomended me to use the setBinaryStream() statement with a blob column, saving
before the file on the file system, and not to store it directly in the database...
Of course, in this case the program have also the duty of saving and the deleting the files on the hard disk.

Could you you show me a sinthetic code example about the sintax to use to indicate the saved file inside the setBinaryStream() statement ?


------
About the other solution: (to use resultSet.setBlob() statement).
(I saw it is used too, I think with java - byte[] type to store directly binary informations in the database).
I could do it trasforming the image in array of byte and store it directly in the database.
It should be possible to do it ?

Perhaps yes, but you didn't suggest me to do it..

-------
Excuse me if I asked you again ...but I would have a complete understanding of the problem....

thank you very much
regards
tonyMrsangelo
843859
Duffymo rather meant that the preferred approach is to write the file to the server's disk system using java.io API and to store its path in the database as a simple varchar field (use setString() and getString() to do that).
843859
thank you to answering me,

as I said, I don't have any experience working with Blob;
I got some information about this on the forum but no example is right for my purpose.
 
"I am working with a standalone application where a dentist, using a camera, can save images and see them again later or delete them too." 
I need to store Blob in the same way that is used to do with string, integer
or float type..., but as I understand to store Blobs it is not the same as store
on a database primitive type of data.
 
I should like have some general information how to do it before to write a 
complex as well as wrong code.. 
To work in this way gives very much disappointment ... :-).

thank you very much
regards

tonyMrsangelo
843859
As said before, use PreparedStatement#setBinaryStream().

If your problem is rather that you don't understand how to use PreparedStatement, then start reading its section in the JDBC tutorial here at Sun.com.
843859
thank you for answering me ,

I am able to use PreparedStatement(), but I should like to know what parameter put inside
the function :
preparedStatement.setBinaryStream(1 , xxx);

What is xxx in my case ??? ....

I understand that, perhaps, I ask a stupid thing ... but I am confuse...

I yet am thinking if I have to store the file on the hard disk passing a link
of the his path to the database..., or if I have to store really the stream inside the database.

in the docomentation I read:
By default drivers implement Blob using an SQL locator(BLOB), which means that a Blob object 
contains a logical pointer to the SQL BLOB data rather than the data itself.
Really I am not sure what this exactly can means and I see they are more than one way to store big objects..

I excuse if I am bothering you but I would not try wrong, ...doing it with database is complex for understand possible errors....

thank you
regards
843859
Just read the API docs whenever you want a clear explanation of the purpose of the class, what methods it all provides and how to use them all.

[http://java.sun.com/javase/6/docs/api/java/sql/PreparedStatement.html].
1 - 8

Post Details

Added on Apr 17 2020
6 comments
2,577 views