{"id":938,"date":"2017-04-17T21:13:57","date_gmt":"2017-04-17T21:13:57","guid":{"rendered":"http:\/\/blog.tiran.info\/?p=938"},"modified":"2017-04-17T21:13:57","modified_gmt":"2017-04-17T21:13:57","slug":"ora-20000-rquery-internal-error-rqerconnect-1-0-0","status":"publish","type":"post","link":"https:\/\/blog.tiran.stream\/?p=938","title":{"rendered":"ORA-20000: RQuery internal error [rqerConnect, 1, 0, 0]"},"content":{"rendered":"<p style=\"text-align: justify;\">J&rsquo;ai r\u00e9cemment rencontr\u00e9 un probl\u00e8me avec ORE sur une machine nouvellement install\u00e9e. Il s&rsquo;agissait d&rsquo;un syst\u00e8me OEL7.3 sur lequel l&rsquo;installation d&rsquo;ORE n&rsquo;avait pourtant pos\u00e9 aucun souci.<\/p>\n<p style=\"text-align: justify;\">Globalement, la plupart des commandes fonctionnaient correctement \u00e0 l&rsquo;exception des appels ore.doEval qui \u00e9chouaient avec la pile erreur suivante:<\/p>\n<pre class=\"brush: js; highlight: [6]; ruler: true;\">\u00a0\n&gt; ore.doEval(function() {\n+   library(ORE)\n+ }, ore.connect = TRUE)\nError in .oci.GetQuery(conn, statement, data = data, prefetch = prefetch,  : \n  ORA-20000: RQuery internal error [rqerConnect, 1, 0, 0]\nORA-06512: at &quot;RQSYS.RQEVALIMPL&quot;, line 77\nORA-06512: at &quot;RQSYS.RQEVALIMPL&quot;, line 74\n&gt; \n<\/pre>\n<p style=\"text-align: justify;\">Il faut reconna\u00eetre que c&rsquo;est assez l\u00e9ger comme message d&rsquo;erreur&#8230; Mes recherches sur MOS &amp; Google n&rsquo;ayant rien donn\u00e9, je d\u00e9crit ici\u00a0mes trouvailles. Cela pourra peut-\u00eatre servir \u00e0 quelqu&rsquo;un.<\/p>\n<p style=\"text-align: justify;\">J&rsquo;ai d&rsquo;abord commenc\u00e9 par r\u00e9installer tous les composants mais\u00a0cela n&rsquo;a rien chang\u00e9&#8230;<\/p>\n<p style=\"text-align: justify;\">Finalement, c&rsquo;est en lan\u00e7ant R directement sur le serveur de base de donn\u00e9es (via l&rsquo;alias ORE)\u00a0et en tentant de charger le package ORE que j&rsquo;ai compris l&rsquo;origine du dysfonctionnement:<\/p>\n<pre class=\"brush: js; highlight: [16]; ruler: true;\">\u00a0\n&gt; library(ORE)                                                                         \nLoading required package: OREbase                                                      \nLoading required package: OREcommon                                                    \n                                                                                       \nAttaching package: \u2018OREbase\u2019                                                           \n                                                                                       \nThe following objects are masked from \u2018package:base\u2019:                                  \n                                                                                       \n    cbind, data.frame, eval, interaction, order, paste, pmax, pmin,                    \n    rbind, table                                                                       \n                                                                                       \nLoading required package: OREembed                                                     \nError in dyn.load(file, DLLpath = DLLpath, ...) :                                      \n  unable to load shared object &#039;\/u01\/app\/12.1.0\/db_1\/R\/library\/png\/libs\/png.so&#039;:       \n  libpng12.so.0: cannot open shared object file: No such file or directory             \nError: package \u2018OREembed\u2019 could not be loaded                                          \n&gt;\n<\/pre>\n<p style=\"text-align: justify;\">On peut effectivement constater que la librairie png.so r\u00e9f\u00e9rence libpng12.so.0 qui n&rsquo;est pas pr\u00e9sente sur mon syst\u00e8me:<\/p>\n<pre class=\"brush: js; highlight: [4]; ruler: true;\">\u00a0\noracle@ec2-12cR1: \/home\/oracle [CDB121]# ldd \/u01\/app\/12.1.0\/db_1\/R\/library\/png\/libs\/png.so                               \n        linux-vdso.so.1 =&gt;  (0x00007ffe5179b000)                                                                          \n        libpng12.so.0 =&gt; not found                                                                                        \n        libz.so.1 =&gt; \/lib64\/libz.so.1 (0x00007fb222933000)                                                                \n        libm.so.6 =&gt; \/lib64\/libm.so.6 (0x00007fb222631000)                                                                \n        libR.so =&gt; \/u01\/app\/12.1.0\/db_1\/lib\/libR.so (0x00007fb222000000)                                                  \n        libc.so.6 =&gt; \/lib64\/libc.so.6 (0x00007fb221c3e000)                                                                \n        \/lib64\/ld-linux-x86-64.so.2 (0x000055d6e0452000)                                                                  \n        libdl.so.2 =&gt; \/lib64\/libdl.so.2 (0x00007fb221a3a000)                                                              \n        libpthread.so.0 =&gt; \/lib64\/libpthread.so.0 (0x00007fb22181e000)                                                    \n        libOrdBlasLoader.so =&gt; \/u01\/app\/12.1.0\/db_1\/lib\/libOrdBlasLoader.so (0x00007fb2215c9000)                          \n        libgfortran.so.3 =&gt; \/lib64\/libgfortran.so.3 (0x00007fb2212a7000)                                                  \n        libquadmath.so.0 =&gt; \/lib64\/libquadmath.so.0 (0x00007fb22106b000)                                                  \n        libreadline.so.6 =&gt; \/lib64\/libreadline.so.6 (0x00007fb220e24000)                                                  \n        libpcre.so.1 =&gt; \/lib64\/libpcre.so.1 (0x00007fb220bc3000)                                                          \n        libbz2.so.1 =&gt; \/lib64\/libbz2.so.1 (0x00007fb2209b3000)                                                            \n        librt.so.1 =&gt; \/lib64\/librt.so.1 (0x00007fb2207aa000)                                                              \n        libgomp.so.1 =&gt; \/lib64\/libgomp.so.1 (0x00007fb220584000)                                                          \n        libgcc_s.so.1 =&gt; \/lib64\/libgcc_s.so.1 (0x00007fb22036d000)                                                        \n        libtinfo.so.5 =&gt; \/lib64\/libtinfo.so.5 (0x00007fb220144000)                                                        \noracle@ec2-12cR1: \/home\/oracle [CDB121]#\n<\/pre>\n<p style=\"text-align: justify;\">Pourtant, je n&rsquo;ai eu aucun message d&rsquo;erreur \u00e0 l&rsquo;installation de ORE Server. De plus, la distribution ORE a \u00e9t\u00e9 install\u00e9e via yum ce qui aurait du mettre en place les d\u00e9pendances requises&#8230;<\/p>\n<p style=\"text-align: justify;\">J&rsquo;ai alors install\u00e9 manuellement libpng12:<\/p>\n<pre class=\"brush: js; ruler: true;\">\u00a0\n[root@ec2-12cR1 ORE]# yum install libpng12                                                                                                              \nLoaded plugins: ulninfo                                                                                                                                 \nResolving Dependencies                                                                                                                                  \n--&gt; Running transaction check                                                                                                                           \n---&gt; Package libpng12.x86_64 0:1.2.50-10.el7 will be installed                                                                                          \n--&gt; Finished Dependency Resolution                                                                                                                      \n                                                                                                                                                        \nDependencies Resolved                                                                                                                                   \n                                                                                                                                                        \n========================================================================================================================================================\n Package                                          Arch                  Version                Repository                                          Size \n========================================================================================================================================================\nInstalling:                                                                                                                                             \n libpng12                                         x86_64                1.2.50-10.el7          ol7_latest                                         171 k \n                                                                                                                                                        \nTransaction Summary                                                                                                                                     \n========================================================================================================================================================\nInstall  1 Package                                                                                                                                      \n                                                                                                                                                        \nTotal download size: 171 k                                                                                                                              \nInstalled size: 615 k                                                                                                                                   \nIs this ok [y\/d\/N]: y                                                                                                                                   \nDownloading packages:                                                                                                                                   \nlibpng12-1.2.50-10.el7.x86_64.rpm                                                                                                | 171 kB  00:00:00     \nRunning transaction check                                                                                                                               \nRunning transaction test                                                                                                                                \nTransaction test succeeded                                                                                                                              \nRunning transaction                                                                                                                                     \n  Installing : libpng12-1.2.50-10.el7.x86_64                                                                                                        1\/1 \n  Verifying  : libpng12-1.2.50-10.el7.x86_64                                                                                                        1\/1 \n                                                                                                                                                        \nInstalled:                                                                                                                                              \n  libpng12.x86_64 0:1.2.50-10.el7                                                                                                                       \n                                                                                                                                                        \nComplete!                                                                                                                                               \n[root@ec2-12cR1 ORE]#\n<\/pre>\n<p style=\"text-align: justify;\">Le message obtenu lors d&rsquo;un appel ore.doEval a alors chang\u00e9:<\/p>\n<pre class=\"brush: js; highlight: [8]; ruler: true;\">\u00a0\n&gt; ore.doEval(function() {\n+   library(ORE)\n+ }, ore.connect = TRUE)\nError in .oci.GetQuery(conn, statement, data = data, prefetch = prefetch,  : \n  ORA-20000: RQuery error\nError in .ore.embed.initCairo(pngargs, imglst.name) : \n  The package &#039;Cairo&#039; is required\nORA-06512: at &quot;RQSYS.RQEVALIMPL&quot;, line 104\nORA-06512: at &quot;RQSYS.RQEVALIMPL&quot;, line 101\n&gt;\n<\/pre>\n<p style=\"text-align: justify;\">En chargeant cette fois-ci le package Cairo depuis ORE sur le serveur de base de donn\u00e9es, on constate a nouveau un probl\u00e8me de librairie manquante:<\/p>\n<pre class=\"brush: js; highlight: [27]; ruler: true;\">\u00a0\n&gt; library(ORE)                                                                                               \nLoading required package: OREbase                                                                            \nLoading required package: OREcommon                                                                          \n                                                                                                             \nAttaching package: \u2018OREbase\u2019                                                                                 \n                                                                                                             \nThe following objects are masked from \u2018package:base\u2019:                                                        \n                                                                                                             \n    cbind, data.frame, eval, interaction, order, paste, pmax, pmin,                                          \n    rbind, table                                                                                             \n                                                                                                             \nLoading required package: OREembed                                                                           \nLoading required package: OREstats                                                                           \nLoading required package: MASS                                                                               \nLoading required package: OREgraphics                                                                        \nLoading required package: OREeda                                                                             \nLoading required package: OREmodels                                                                          \nLoading required package: OREdm                                                                              \nLoading required package: lattice                                                                            \nLoading required package: OREpredict                                                                         \nLoading required package: ORExml                                                                             \n&gt; library(Cairo)                                                                                             \nError : .onLoad failed in loadNamespace() for &#039;Cairo&#039;, details:                                              \n  call: dyn.load(file, DLLpath = DLLpath, ...)                                                               \n  error: unable to load shared object &#039;\/u01\/app\/12.1.0\/db_1\/R\/library\/Cairo\/libs\/Cairo.so&#039;:                  \n  libtiff.so.3: cannot open shared object file: No such file or directory                                    \nError: package or namespace load failed for \u2018Cairo\u2019                                                          \n&gt;    \n<\/pre>\n<p style=\"text-align: justify;\">J&rsquo;ai alors pris le parti de scanner tous les fichiers .so de l&rsquo;arborescence ORE pour trouver les d\u00e9pendances manquantes:<\/p>\n<pre class=\"brush: js; ruler: true;\">oracle@ec2-12cR1: \/u01\/app\/12.1.0\/db_1\/R\/library [CDB121]# find . -name *.so -exec ldd {} \\; | grep &quot;not found&quot;          \n        libtiff.so.3 =&gt; not found\noracle@ec2-12cR1: \/u01\/app\/12.1.0\/db_1\/R\/library [CDB121]#\n<\/pre>\n<p style=\"text-align: justify;\">Manifestement, c&rsquo;est la version de libtiff qui diverge entre ce qui est attendu et ce qui est disponible sur mon syst\u00e8me:<\/p>\n<pre class=\"brush: js; ruler: true;\">[root@ec2-12cR1 ORE]# ls -l \/usr\/lib64\/libtiff*                                                                          \nlrwxrwxrwx. 1 root root     16 Apr 11 10:01 \/usr\/lib64\/libtiff.so.5 -&gt; libtiff.so.5.2.0\n-rwxr-xr-x. 1 root root 479440 Feb  1 08:20 \/usr\/lib64\/libtiff.so.5.2.0\nlrwxrwxrwx. 1 root root     18 Apr 11 10:01 \/usr\/lib64\/libtiffxx.so.5 -&gt; libtiffxx.so.5.2.0\n-rwxr-xr-x. 1 root root  11408 Feb  1 08:20 \/usr\/lib64\/libtiffxx.so.5.2.0\n[root@ec2-12cR1 ORE]#\n<\/pre>\n<p style=\"text-align: justify;\">Ici, c&rsquo;est compat-libtiff3 qui doit \u00eatre install\u00e9 (trouv\u00e9 \u00e0 partir de yum whatprovides libtiff.so.3):<\/p>\n<pre class=\"brush: js; ruler: true;\">[root@ec2-12cR1 ORE]# yum install compat-libtiff3                                                                                                         \nLoaded plugins: ulninfo                                                                                                                                   \nResolving Dependencies                                                                                                                                    \n--&gt; Running transaction check                                                                                                                             \n---&gt; Package compat-libtiff3.x86_64 0:3.9.4-11.el7 will be installed                                                                                      \n--&gt; Finished Dependency Resolution                                                                                                                        \n                                                                                                                                                          \nDependencies Resolved                                                                                                                                     \n                                                                                                                                                          \n==========================================================================================================================================================\n Package                                                Arch                   Version                      Repository                               Size \n==========================================================================================================================================================\nInstalling:                                                                                                                                               \n compat-libtiff3                                        x86_64                 3.9.4-11.el7                 ol7_latest                              132 k \n                                                                                                                                                          \nTransaction Summary                                                                                                                                       \n==========================================================================================================================================================\nInstall  1 Package                                                                                                                                        \n                                                                                                                                                          \nTotal download size: 132 k                                                                                                                                \nInstalled size: 419 k                                                                                                                                     \nIs this ok [y\/d\/N]: y                                                                                                                                     \nDownloading packages:                                                                                                                                     \ncompat-libtiff3-3.9.4-11.el7.x86_64.rpm                                                                                            | 132 kB  00:00:00     \nRunning transaction check                                                                                                                                 \nRunning transaction test                                                                                                                                  \nTransaction test succeeded                                                                                                                                \nRunning transaction                                                                                                                                       \n  Installing : compat-libtiff3-3.9.4-11.el7.x86_64                                                                                                    1\/1 \n  Verifying  : compat-libtiff3-3.9.4-11.el7.x86_64                                                                                                    1\/1 \n                                                                                                                                                          \nInstalled:                                                                                                                                                \n  compat-libtiff3.x86_64 0:3.9.4-11.el7                                                                                                                   \n                                                                                                                                                          \nComplete!                                                                                                                                                 \n[root@ec2-12cR1 ORE]#\n<\/pre>\n<p style=\"text-align: justify;\">Une fois ce package install\u00e9, les probl\u00e8mes ont disparus!<\/p>\n<p style=\"text-align: justify;\"><span style=\"font-size: 18pt;\">\ud83d\ude42<\/span><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>J&rsquo;ai r\u00e9cemment rencontr\u00e9 un probl\u00e8me avec ORE sur une machine nouvellement install\u00e9e. Il s&rsquo;agissait d&rsquo;un syst\u00e8me OEL7.3 sur lequel l&rsquo;installation<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"colormag_page_container_layout":"default_layout","colormag_page_sidebar_layout":"default_layout","footnotes":""},"categories":[6,9],"tags":[],"class_list":["post-938","post","type-post","status-publish","format-standard","hentry","category-oracle","category-oracle-r-enterprise"],"_links":{"self":[{"href":"https:\/\/blog.tiran.stream\/index.php?rest_route=\/wp\/v2\/posts\/938","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.tiran.stream\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.tiran.stream\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.tiran.stream\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.tiran.stream\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=938"}],"version-history":[{"count":0,"href":"https:\/\/blog.tiran.stream\/index.php?rest_route=\/wp\/v2\/posts\/938\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.tiran.stream\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=938"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.tiran.stream\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=938"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.tiran.stream\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=938"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}