Rstudio Server cannot connect to R session

I am using CentOS 8. My Rstudio-Server stopped working after a reboot. So I ran the following:

 sudo rstudio-server verify-installation

And it showed that "no version information available". I tried many things to fix it, including removing version 10 of postgressql, installing verison 13, and un-installing and re-installing rstudio-server.

It still shows the same problem:

usd1sapp101 opt]$ sudo rstudio-server verify-installation
/usr/lib/rstudio-server/bin/rserver: /usr/pgsql-13/lib/libpq.so.5: no version information available (required by /usr/lib/rstudio-server/bin/rserver)
/usr/lib/rstudio-server/bin/rsession: /usr/pgsql-13/lib/libpq.so.5: no version information available (required by /usr/lib/rstudio-server/bin/rsession)

I know postfres sql is installed properly via this command:

[bosr opt]$ psql --version
psql (PostgreSQL) 13.3

I used this link this link to configure postgres sql for rstudio-server.

What else can I try?

Also, why did the uninstall and re-install of rstudio server not fix the issue? If I wanted to uninstall rstudio server and start from scratch, what would be the best method? Thanks in advance.

Hey @rogerjbos! Can you share the output of yum list installed? Specifically those that are postgres related?

I haven't seen this issue before, but it looks like you may be missing a system library (like yum install postgresql-devel, perhaps?).

It surprises me that this issue would surface on a reboot though, unless an upgrade was included in the process recently. Have you recently upgraded RStudio Server Pro? What is the output of rstudio-server version?

If we don't make headway here quickly, it might be worth reaching out to our support team at support@rstudio.com and sending a diagnostic bundle to help us get a head start on the resolution!

Also, I'm not super optimistic that a complete reinstallation will help, since it may be related to a requirement on the newest version of the product.

I noticed that postgresql version 10.6 was the latest version on my app stream, so I removed version 13 and re-install 10.6. At you suggestion, I installed devel as well, so now here are the three that are installed:

postgresql.x86_64                                                           10.6-1.module_el8.0.0+15+f57f353b                                           @InstallMedia-AppStream                  
postgresql-server.x86_64                                                    10.6-1.module_el8.0.0+15+f57f353b                                           @InstallMedia-AppStream                  
postgresql-server-devel.x86_64                                              10.6-1.module_el8.0.0+15+f57f353b                                           @InstallMedia-AppStream                  

Checking the version still shows the missing information, but it does show version 10.6 as well:

[bosr rstudio]$ psql --version
psql: /lib64/libpq.so.5: no version information available (required by psql)
psql: /lib64/libpq.so.5: no version information available (required by psql)
psql (PostgreSQL) 10.6

I am using the open source version BTW, and my version is:

1.4.1717 (Juliet Rose) for CentOS 8

If I check the status of rstudio-server, it is running, but it still complains about the missing version information:

● rstudio-server.service - RStudio Server
   Loaded: loaded (/usr/lib/systemd/system/rstudio-server.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2021-06-22 14:13:39 EDT; 8min ago
  Process: 108234 ExecStop=/usr/bin/killall -TERM rserver (code=exited, status=0/SUCCESS)
  Process: 108236 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited, status=0/SUCCESS)
 Main PID: 108237 (rserver)
    Tasks: 3 (limit: 49630)
   Memory: 8.8M
   CGroup: /system.slice/rstudio-server.service
           └─108237 /usr/lib/rstudio-server/bin/rserver

Jun 22 14:13:39 usd1sapp101.rth.ad.rothschild.com systemd[1]: Starting RStudio Server...
Jun 22 14:13:39 usd1sapp101.rth.ad.rothschild.com rserver[108236]: /usr/lib/rstudio-server/bin/rserver: /lib64/libpq.so.5: no version information available (required by /usr/lib/rstudio-server>
Jun 22 14:13:39 usd1sapp101.rth.ad.rothschild.com systemd[1]: Started RStudio Server.

and of course I still get the error message "Could not connect to the rsession on Rstudio server."

BTW, run-diagnostics does not seem to work for the open-source version and is not listed as one of the available commands:

[bosr rstudio]$ sudo rstudio-server run-diagnostics
Usage: rstudio-server {status|start|stop|restart|test-config|verify-installation|suspend-session|suspend-all|force-suspend-session|force-suspend-all|kill-session|kill-all|offline|online|active-sessions|version}

Ohh sorry about that! I missed that you were using the open source version :see_no_evil: This is definitely the right place to be asking then!! :grinning_face_with_smiling_eyes:

It does look like some type of sysdep issue. I am not super familiar with the centos8 package names, but it looks like libpq is the one that RStudio needs, and is the one that is having trouble in your system.

On a docker container I just started:

[root@90e8d9b8b2fa /]# yum list installed | grep pq
Failed to set locale, defaulting to C.UTF-8
libpq.x86_64                      13.3-1.el8_4                        @appstream
[root@90e8d9b8b2fa /]# find / -name libpq.so.5
/usr/lib64/libpq.so.5

It may be worth starting a new shell / checking your LD_LIBRARY_PATH to see what is getting picked up? You could also look at the /lib64/libpq.so.5 file - it looks like something weird is going on with it.

I removed libpq and re-installed it and here are the two folders where the file is located:

bosr lib64]$ ls -l /usr/lib64/libpq*
lrwxrwxrwx. 1 root root      13 May 13 10:19 /usr/lib64/libpq.so -> libpq.so.5.13
lrwxrwxrwx. 1 root root      13 May 13 10:19 /usr/lib64/libpq.so.5 -> libpq.so.5.13
-rwxr-xr-x. 1 root root 1380680 May 13 10:19 /usr/lib64/libpq.so.5.13
[bosr lib64]$ ls -l /lib64/libpq*
lrwxrwxrwx. 1 root root      13 May 13 10:19 /lib64/libpq.so -> libpq.so.5.13
lrwxrwxrwx. 1 root root      13 May 13 10:19 /lib64/libpq.so.5 -> libpq.so.5.13
-rwxr-xr-x. 1 root root 1380680 May 13 10:19 /lib64/libpq.so.5.13

I don't know if it is a binary file, but I cannot really open it to look at it. It has mostly characters that cannot be displayed.

Oops! Totally missed this message, sorry about that!

Maybe a better path is to ldd the rstudio-server binary to see what it is linked against?

# ldd /usr/lib/rstudio-server/bin/rserver
	linux-vdso.so.1 (0x00007ffe1c34d000)
	libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007fde09aec000)
	libpq.so.5 => /usr/lib/x86_64-linux-gnu/libpq.so.5 (0x00007fde098a3000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fde0969f000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fde09480000)
	libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007fde0927d000)
	libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007fde09076000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fde08e6e000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fde08c51000)
	libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007fde089c4000)
	libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007fde084f9000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fde08170000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fde07dd2000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fde07bba000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fde077c9000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fde0a7f4000)
	libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007fde0757e000)
	libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007fde0732c000)
	libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007fde07056000)
	libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007fde06e24000)
	libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007fde06c20000)
	libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007fde06a15000)
	liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007fde06807000)
	libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007fde065ec000)
	libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007fde063d1000)
	libgssapi.so.3 => /usr/lib/x86_64-linux-gnu/libgssapi.so.3 (0x00007fde06190000)
	libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007fde05e2a000)
	libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007fde05c26000)
	libheimntlm.so.0 => /usr/lib/x86_64-linux-gnu/libheimntlm.so.0 (0x00007fde05a1d000)
	libkrb5.so.26 => /usr/lib/x86_64-linux-gnu/libkrb5.so.26 (0x00007fde05790000)
	libasn1.so.8 => /usr/lib/x86_64-linux-gnu/libasn1.so.8 (0x00007fde054ee000)
	libhcrypto.so.4 => /usr/lib/x86_64-linux-gnu/libhcrypto.so.4 (0x00007fde052b8000)
	libroken.so.18 => /usr/lib/x86_64-linux-gnu/libroken.so.18 (0x00007fde050a2000)
	libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007fde04d73000)
	libidn2.so.0 => /usr/lib/x86_64-linux-gnu/libidn2.so.0 (0x00007fde04b56000)
	libunistring.so.2 => /usr/lib/x86_64-linux-gnu/libunistring.so.2 (0x00007fde047d8000)
	libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007fde045c5000)
	libnettle.so.6 => /usr/lib/x86_64-linux-gnu/libnettle.so.6 (0x00007fde0438f000)
	libhogweed.so.4 => /usr/lib/x86_64-linux-gnu/libhogweed.so.4 (0x00007fde04159000)
	libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007fde03ed8000)
	libwind.so.0 => /usr/lib/x86_64-linux-gnu/libwind.so.0 (0x00007fde03caf000)
	libheimbase.so.1 => /usr/lib/x86_64-linux-gnu/libheimbase.so.1 (0x00007fde03aa0000)
	libhx509.so.5 => /usr/lib/x86_64-linux-gnu/libhx509.so.5 (0x00007fde03856000)
	libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007fde0361e000)
	libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007fde03416000)

@cole, just thought I would let you know that my problem was resolved by disabling selinux, which I learned about in this post: rserver[1692]: ERROR system error 13 (Permission denied) - #10 by ArchosaurRise

Thanks again for your help. Roger

1 Like

Glad to hear!! Well done resolving, and thanks for coming back here to share!!

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.