Posit Connect wont start - temp directory error

Follow

Problem

On a fresh installation of Posit Connect, you may see an error similar to the following:

Error: Unable to run an executable program as 'rstudio-connect' within the Server.TempDir='/tmp'; this directory may be mounted 'noexec': Unable to run validator /tmp/tempdir-validator-00000 as rstudio-connect: exit status 1

This error usually occurs when the /tmp directory is mounted as noexec.

 

Solution

First, you could start by remounting the tmp directory with the following command:

sudo mount -o remount,exec /tmp

From there, restart Connect so that it can see these changes:

sudo systemctl restart rstudio-connect

 

Alternative Solution

Failing the above, you will need to adjust the TMP directory Connect uses:
https://docs.rstudio.com/connect/admin/process-management/#temp-directory

For example, with this addition below to your/etc/rstudio-connect/rstudio-connect.gcfgconfiguration file in the[Server]section:

;/etc/rstudio-connect/rstudio-connect.gcfg
[Server]
TempDir = /rstudio-connect-tmp/


RStudio Connect will now use this directory below instead of/tmp:

TempDir = /rstudio-connect-tmp/


With that change, you'll also need to make the directory specified and allow access:

mkdir /rstudio-connect-tmp/
chmod 1777 /rstudio-connect-tmp/


Once complete, a restart of the Connect service is needed:

sudo systemctl restart rstudio-connect

 

Support Ticket

If you still have issues after completing the above, you can always lodge a support ticket, where our group of friendly, and incredibly knowledgeable staff can assist with any issues that you may be having. You can submit a ticket here:

https://support.posit.co/hc/en-us/requests/new

Comments