Javascript required
Skip to content Skip to sidebar Skip to footer

How to Upload Required Documents Using Rsconnect

Publishing#

Note

You must configure your RStudio Connect account earlier attempting to publish with the RStudio IDE. Run across the Connecting department for information on configuring your Connect account. If you practise not have at least the Publisher role within Connect, then you can asking permission to publish your own content via the link under Info on the Content folio.

Link to request Publisher permissions

General Publishing Instructions#

RStudio Connect accepts publishing Shiny applications, R Markdown documents, plots, graphs, websites, TensorFlow models, Jupyter Notebooks, and APIs. The blue publishing icon in the RStudio IDE indicates built-in support for publishing this slice of content.

The RStudio publishing icon

You can find the blue publishing icon at the following locations:

  • The upper correct of the file editor
  • The document viewer when viewing a document
  • The embedded viewer when running a Shiny application
  • The plots pane

Note

The functionality to publish Jupyter Notebooks to RStudio Connect is provided past a notebook extension. See the publishing Jupyter Notebooks department for details.

Click on this icon to open a publishing dialog where you tin can name your content and select additional files to include in the deployment. Past default, RStudio will endeavour to infer the information files and scripts are used in your content. This window lets you refine those file selections.

RStudio publishing dialog

Virtually of the time, RStudio is able to determine automatically which files are needed to return your document on RStudio Connect. However, there are situations in which information technology will miss a file (for instance, if it isn't referenced directly in your certificate). The Add More... button lets you add files to the bundle that will be sent to RStudio Connect and then that they volition be available on the server when your certificate is rendered. You lot tin can also use the resource_files field in your document's YAML header to add additional files.

Deployed data files must exist in the same directory as your Shiny application or R Markdown document. Files stored elsewhere on your calculator (C:\Users\me\mydata.csv) will not be available on the remote server.

Click Publish after verifying your settings.

Your first deployment may take a few minutes, as RStudio Connect attempts to recreate the R library you utilise locally -- referenced packages are downloaded and installed. These packages are buried on the server; subsequent deployments volition exist faster.

Non all of your IDE surroundings can be replicated on the server. Different operating systems or versions of R can occasionally brand content behave differently. Package installation failures may crave the installation of boosted arrangement libraries on RStudio Connect.

When the deployment completes, the RStudio Connect Settings page for your content is displayed. You should see your deployed content alongside its settings -- a rendered version of the certificate or a alive instance of your Shiny application, for example.

Example of a running application

This page allows y'all to verify the sharing and visibility of your deployed content. Run across the Content Settings Panel department for additional data.

Collaboration#

Some data products will have multiple authors and collaborators who are responsible for managing the content deployed to RStudio Connect. The commencement step to collaboration is sharing and working together on code. We recommend using a version control tool like Git to coordinate collaboration across many users. General information near getting started with git is available elsewhere.

The second footstep is collaborating on the published data product. To enable multiple users to maintain and update a single piece of content on RStudio Connect, all users should be listed every bit collaborators on the content.

Content showing multiple  collaborators

When content is published to RStudio Connect for the first time, an rsconnect folder is created in the directory where your content was published from.

Note

This rsconnect folder should be added and committed into version command. It does not contain any private or secure information. Notwithstanding, it does incorporate the URL for the RStudio Connect server and the content URL. This information allows future publications to easily target the aforementioned endpoint.

A collaborator, so, would clone or check out the code to their development organization and make any changes or improvements are necessary. When finished, they will click the Publish push button in the RStudio IDE, which will use the rsconnect binder to determine where the content should be published. During the publishing process, RStudio Connect checks that the authenticated user has collaborator access for this piece of content.

RStudio IDE showing collaborative publishing

If the publisher wants to publish to a new location, this option is surfaced in the RStudio IDE every bit well. This will create a second deployment location on RStudio Connect and volition go out the original content deployment unmodified. If you want to surface a single URL for your users despite publishing to a new location, continue in mind that you can assign a custom content URL to the original deployment location, then later assign it to a different piece of content on the server.

RStudio IDE option to create a new endpoint

Proceed in mind that package environments may exist dissimilar on each developer's computer. The original writer and a collaborator may be using different computers, operating systems, or R versions with different package versions installed. RStudio Connect will attempt to reproduce the environment of whoever is publishing the content. Keeping developer environments in sync is non a problem solved by RStudio Connect. Rather, the renv parcel and RStudio Workbench accost this problem more than straight.

Info

Watch a video demonstration of basic button-push button publishing with collaboration hither.

Publishing Plumber APIs#

Plumber APIs take the following known restrictions:

  • Push-button publishing is bachelor but with RStudio IDE version ane.2 and greater
  • Server-side latency is non tracked

To go started with publishing Plumber API endpoints, create a directory with a plumber.R file defining your endpoints. From the R console, execute the following, replacing <project-dir> with your project'due south directory:

                                            rsconnect                ::                deployAPI                (                api                =                '<projection-dir>'                )                          

In one case alive, the results of your @get / endpoint are displayed. If @get / is non defined, you volition see a "Swagger UI" presentation of your API. Swagger is an API documentation format; Plumber can automatically generate a swagger.json definition for your API past inspecting your endpoints. The "Swagger UI" page offers an interactive portal into your API that allows you to exam your endpoints directly from the browser.

To make a call to your new API yourself, you lot're going to need the target URL. You tin find it past looking at the bottom of the Access tab in your API's settings, or past clicking the "Open Solo" button in the upper-correct of the content view. (Note: on narrow screens, the "Open up Solo" button might be located in the ... menu in the upper-right of the content view.)

"Open Solo" button.

The URL opened by your browser should look similar the following: https://rsc.company.com/content/42/.

All calls can be made relative to this path. For example, if you want to make a request to /volcano, the location in the to a higher place example would be https://rsc.company.com/content/42/volcano, like and then:

                            roll -XPOST --data-binary                '{ "line_plot": true }'                \                https://rsc.company.com/content/42/volcano                          

If your API restricts access to a particular set up of users, and so RStudio Connect requires that incoming requests cosign the user making the asking. The best approach for authenticating a asking targeting an API is to apply API Keys.

Alternatively, if your server is configured to utilise proxied authentication, yous should ask your IT Ambassador about ways to make API calls through that proxy.

If yous want to perform admission command in your Plumber API itself, or if yous want to allow anyone to access your API, open up the application settings, then the "Access" tab, and gear up "Sharing settings" to "Anyone".

Note

Some configurations may prohibit the "Anyone" access blazon.

Hither is an example showing a simple style to restrict access:

                                            #* @filter shared-hush-hush-auth                keyAuth                <-                function                (                res                ,                secret                =                NULL                )                {                if                (                is.null                (                secret                )                ||                secret                !=                'mySecret'                )                {                res                $                status                <-                401                # 401 UNAUTHORIZED                list                (                error                =                "Authentication Failed"                )                }                else                {                plumber                ::                frontwards                ()                }                }                          

Come across the Plumber documentation for more data on @filter methods, and how they can be skipped in your route with @preempt.

Security is hard. The example to a higher place might be good enough for some purposes, but is unsuitable in cases where yous need multiple keys you tin invalidate arbitrarily. In those cases, API Keys would exist preferable. Inquire your Information technology Administrator for guidance if you demand help choosing a suitable hallmark scheme.

Publishing TensorFlow Model APIs#

Annotation

TensorFlow Saved Models upwards to TensorFlow version 1.13.i are supported. To observe out what version of TensorFlow is installed, you can run the following in the R panel: tensorflow::tf_version().

If your installed TensorFlow version is greater than i.13.1, you tin install TensorFlow 1.13.1 by running the post-obit in the R panel: tensorflow::install_tensorflow(version = "1.13.1")".

TensorFlow Model APIs are easy to deploy to RStudio Connect. Export your model

from R:

                                            # `library(tensorflow)` version                export_savedmodel                (                session                ,                "mysavedmodel"                )                # `library(keras)` version                export_savedmodel                (                model                ,                "mysavedmodel"                )                          

or from Python:

                                            # Keras version                tf                .                keras                .                models                .                save_model                (                model                ,                "mysavedmodel"                )                # Low-level TensorFlow version                tf                .                saved_model                .                relieve                (                model                ,                "mysavedmodel"                )                          

Then deploy it to RStudio Connect using the rsconnect parcel:

                                            rsconnect                ::                deployTFModel                (                "mysavedmodel"                ,                business relationship                =                "myaccount"                ,                server                =                "myserver"                )                          

The home page on your new TensorFlow Model API will explain how information technology can be used. Much like Plumber, you can employ RStudio Connect admission controls and RStudio Connect API Keys to secure your Model API, or to let everyone to use it.

All TensorFlow Model API requests are mostly the same. For the following examples, assume that your TensorFlow Model API is running open to the public at: https://localhost:3939/content/12. Assume likewise that your TensorFlow model accepts equally input a 2-tensor (matrix) of floating point values with dimensions Infinity by two.

You lot could telephone call your TensorFlow Model API similar so:

                            curl https://localhost:3939/content/12/serving_default/predict -XPOST --data-binary=                '\                { \                "instances": [\                                  [[5.4, 3.ii]]\                ]\                }'                          

Note that the TensorFlow Model API is strict about the number of dimensions passed in instances. The instances assortment does not count towards tensor dimensions:

  • "instances": [[[2.four]]] is ane example of a 2-tensor (matrix) with dimensions 1x1
  • "instances": [[[[2.iii, 4.five],[5.six, vii.8]]]] is one instance of a 3-tensor with dimensions 1x2x2

Your TensorFlow Model API will render the predicted values as you lot configured it. For example, if your model was configured to answer with a 0-tensor (scalar) of floats, yous might become the following:

The rstudio/tfdeploy repository contains some case scripts for building and exporting simple models, and then you lot can endeavor them before you upload some of your ain. For example:

                                            business relationship                <-                "supercede me with your username"                server                <-                "replace me with your server host"                # the `keras` package must be installed for models/keras-mnist.R                install.packages                (                "keras"                )                devtools                ::                install_github                (                "rstudio/tfdeploy"                )                source                (                system.file                (                "models"                ,                "keras-mnist.R"                ,                bundle                =                "tfdeploy"                ))                rsconnect                ::                deployTFModel                (                "keras-mnist"                ,                account                =                business relationship                ,                server                =                server                )                          

Publishing with rsconnect-python#

rsconnect-python is a CLI deployment tool written in Python which can be used directly to deploy Jupyter notebooks, Python APIs (Flask, Bottle, FastAPI, etc), and interactive applications (Dash, Bokeh, and Streamlit).

Installing#

Installing the rsconnect-python command line interface is piece of cake using pip:

                            pip install rsconnect-python                          

Once rsconnect-python is installed, the rsconnect command line utility will be bachelor in your python binaries directory. In many cases, it will exist on your PATH and accessible by executing rsconnect on the command line.

Adding a Server#

To add together a server for deployment, you will demand:

  1. Your server URL (--server/-southward)
  2. Your API key (--api-fundamental/-thou)
  3. A nickname for the server that yous provide (--proper name/-due north)
                            rsconnect add --server https://my.connect.server/ --name myServer --api-key                $CONNECT_API_KEY                          

One time the server is added, rsconnect deploy commands can reference that server by using the -north or --name flag, followed by the nickname.

Agreement entrypoints#

APIs and Dash Apps#

When deploying a FastAPI or Flask API, or a Dash app, RStudio Connect needs to locate the application object. The location of the application object is chosen the entrypoint and is specified in ii parts, separated past a colon: the module name and the object proper noun (optional). For example, app:app if both are specified; or simply app if only the module name is specified.

The module proper noun is the name of a Python module that contains the application. For example, if your application code is in a file named example.py in the awarding directory, then the module proper name would exist example.

The object name is the name of the application object in your Python code. In a Flask API, for example, the application is typically created by a line of lawmaking that looks like:

                                            # example.py                # ...                app                =                Flask                (                __name__                )                          

In this case, the application object is named app, and the entrypoint would be instance:app.

If the object_name is omitted, Connect volition effort to detect a default application in the post-obit guild:

  • app
  • application
  • create_app
  • make_app

    create_app and make_app are expected to be factory functions, which should take no arguments and should return a valid application object.

If you lot are using rsconnect-python, the default entrypoint is app. If yous put your code in app.py and your application object is one of the defaults listed higher up, the default entrypoint volition work.

Otherwise, specify the entrypoint on the control line using the --entrypoint option. For case, if your code is in the file instance.py and your awarding object is named myapp, utilize:

For Flask:

                            rsconnect deploy api -north <saved server proper noun> --entrypoint example:myapp ...                          

For FastAPI:

                            rsconnect deploy fastapi -n <saved server name> --entrypoint example:myapp ...                          

If you lot are creating a manifest.json file for later deployment, you tin use:

                            rsconnect write-manifest api --entrypoint example:myapp ...                          

or

                            rsconnect write-manifest fastapi --entrypoint case:myapp ...                          

Streamlit and Bokeh Apps#

For Streamlit and Bokeh apps, the entrypoint is the name of the Python file containing your app. For case, if your streamlit app'south source file is named main.py, use:

                            rsconnect deploy streamlit -n <saved server name> --entrypoint main.py ...                          

Python APIs#

  • If y'all have not already, install rsconnect-python using the instructions here.

  • Verify that you have activated the virtual environment that you wish to reproduce on the RStudio Connect server. rsconnect-python will freeze your electric current python environment unless it finds a requirements.txt file in the same directory.

  • Ensure that you lot have added the target server to the rsconnect-python command line interface. Your target server should exist in the list when you execute:

  • Once your server is added, you can deploy your Flask API using the following command:

                                        rsconnect deploy api -northward myServer MyApiPath/                                  

    or deploy a FastAPI-based API with:

                                        rsconnect deploy fastapi -northward myServer MyApiPath/                                  

    The command line interface will attempt to infer your entry indicate, but if you would like to specify one, utilize the --entrypoint command line flag. Learn more than virtually Python APIs and entrypoints hither.

  • Once complete, the control line interface will return a link to your content.

Dash#

  • If you have not already, install rsconnect-python using the instructions here.

  • Verify that you have activated the virtualenv or conda environs that you wish to reproduce on the RStudio Connect server. rsconnect-python will freeze your current python environment unless it finds a requirements.txt or environs.yml file in the projection directory.

  • Ensure that you lot have added the target server to the rsconnect-python command line interface. Your target server should exist in the list when you execute:

  • One time your server is added, you can deploy your app using the post-obit command:

                                        rsconnect deploy dash -due north myServer MyApiPath/                                  
  • Once complete, the command line interface will return a link to your deployed app.

Publishing Documents#

When publishing documents to RStudio Connect, you may encounter other deployment options depending on your content. These options are discussed below.

Publishing Destination#

Publish to RPubs or  Connect

RPubs is a service for easily sharing R Markdown documents. RPubs is not related to RStudio Connect, and you should e'er choose "RStudio Connect" if you wish to publish your content to RStudio Connect.

RPubs documents are (1) ever public, (2) always self-contained, and (3) and cannot incorporate any Shiny content. You lot volition see the choice to publish to RPubs if your certificate is self-independent and does not require Shiny. Some organizations want to prohibit publishing to RPubs to reduce the take chances that sensitive information will be accidentally made public; publishing to RPubs (and shinyapps.io) tin be disabled if desired using an RStudio Server or RStudio Workbench option.

Publish Source Code#

Dialog to publish source code

These options display when publishing from the document viewer.

Publishing the document with source code ways that your R Markdown file (.Rmd) volition be deployed to RStudio Connect. This file is rendered (usually to HTML) on the server.

Publishing only the finished certificate ways that the HTML file yous rendered locally is deployed to RStudio Connect.

We recommend publishing your documents with source code, as it allows y'all to re-render the document with RStudio Connect (on a weekly schedule, for instance). If the document cannot be rendered by RStudio Connect considering of files or data sources that are unavailable on the server, choose "Publish finished certificate merely" then others tin can view your piece of work.

Document Option#

Dialog to publish one or all documents

When publishing an R Markdown document from a directory that contains more one R Markdown certificate, these options display. It is possible to link together multiple R Markdown documents to make a multi-page certificate, then this is your chance to indicate that yous've done this, and to publish all the documents at once. In nearly cases however you'll desire to publish merely the current document.

Publishing Jupyter Notebooks#

Publishing from the rsconnect-jupyter Notebook Extension#

The functionality to publish Jupyter Notebooks to RStudio Connect is provided by a notebook extension.

Follow the steps in the rsconnect-jupyter User Guide to install and configure Jupyter Notebook with the power to publish to RStudio Connect:

  • Install the rsconnect-jupyter packet
  • Enable the rsconnect-jupyter notebook extension
  • Generate an RStudio Connect API Key (instructions in the API Keys section)
  • Use push-button publishing to publish your Jupyter Notebooks to RStudio Connect

Publishing from the rsconnect-python Command Line Interface#

Installing the rsconnect-python control line interface is easy using pip:

                            pip install rsconnect-python                          

Once rsconnect-python is installed, the rsconnect control line utility will be bachelor in your python binaries directory. In many cases, it will exist on your PATH and accessible by executing rsconnect on the command line.

To publish a notebook using the command line interface:

  • Verify that y'all have activated the virtualenv or conda environment that you wish to reproduce on the RStudio Connect server. rsconnect-python will freeze your electric current python environment unless it finds a requirements.txt or environs.yml file in the same directory.

  • Ensure that you accept added the target server to the rsconnect-python command line interface. Your target server should be in the listing when you execute:

  • If y'all accept not ready up the target server, you can create an entry using the following command:
                            rsconnect add --server https://my.connect.server/ --proper noun myServer --api-primal                $RSTUDIO_CONNECT_API_KEY                          
  • When the server is added, you lot are ready to deploy your notebook:
                            rsconnect deploy notebook -n MyServer MyNotebook.ipynb                          
  • In one case complete, the command line interface will return a link to your content.

Publishing Pins#

The pins packet can be used to share data resources on RStudio Connect.

The pins R packet provides the board_register_rsconnect role to place your RStudio Connect server and the pin function to publish resources:

                                            board_register_rsconnect                (                server                =                "https://connect.example.com"                )                iris                %>%                filter                (                Species                ==                "Setosa"                )                %>%                pin                (                "s_iris"                ,                board                =                "rsconnect"                )                          

The pins package documentation has additional details most publishing and consuming pinned resource hosted by RStudio Connect.

Publishing Content that uses Python and R#

The reticulate package allows users to create projects that contain R and Python lawmaking. Reticulate tin be used across content types including Shiny applications, R Markdown documents, and plumber APIs.

RStudio Connect can deploy and host this content, and will automatically restore both the R and Python environments. To deploy:

  1. Ensure your server administrator has enabled Python in the RStudio Connect configuration, and double check that your projection uses a version of Python bachelor on RStudio Connect.

  2. Projects deployed to RStudio Connect should utilize the RETICULATE_PYTHON environment variable and should not include any references to reticulate::use_python, reticulate::use_virtualenv, or reticulate::use_conda. Encounter an example of switching to RETICULATE_PYTHON.

  3. Check to be sure you are using rsconnect version 0.8.13 or in a higher place: packageVersion('rsconnect')

  4. Follow the publishing instructions that are specific to the type of content you are deploying. During deployment, the listing of necessary Python packages are sent to Connect. Connect installs these packages into an isolated virtual surroundings, similar to the approach used for R packages.

Deployment Logs for Content with R and Python Dependencies#

When you deploy this type of content, yous will run across additional logs in both the RStudio Deploy pane and the RStudio Connect logs pane.

In RStudio, you will see something like the post-obit in the Deploy pane, typically after a series of log lines detailing the R environment restore:

                            Completed packrat build against R version: '3.four.4' Packet requested Python version iii.6.7; using /opt/Python/three.6.7/bin/python3.6 which has version three.six.7 2019/03/05 22:31:15.585067606 Running with python "3.vi.seven (default, Dec 11 2018, 22:03:l)  [GCC four.8.4]" at /opt/Python/3.6.seven/bin/python3.vi                          

The first line signals that RStudio Connect has completed restoring the R environment. The 2nd line indicates the version of Python discovered in RStudio besides as the matched version available on RStudio Connect. These lines volition be followed by logging that indicates RStudio Connect's progress in re-creating the Python environment. In some cases, these environments may be cached. For example:

                            2019/03/05 22:31:15.586051939 Using cached environment: eTZbLgG9EAv8_Nfcrq7LYw 2019/03/05 22:31:16.025098703 Packages in the surroundings: numpy==i.xvi.2, pandas==0.24.1, python-dateutil==2.8.0, pytz==2018.9, six==1.12.0, Completed python build confronting Python version: 'iii.6.7'                          

In RStudio Connect, yous will see two log entries each with a unique Job ID, 1 entry volition exist titled "R snapshot restore" and the second will be titled "Python surroundings restore".

Switching to RETICULATE_PYTHON#

If your reticulate code currently uses use_conda, use_virtualenv, or use_python, y'all'll need to switch to using the RETICULATE_PYTHON environment variable in order for push-button publishing to work. Any of the reticulate::use functions can be replaced using the environment variable. For example, if you are using a virtual environment located in the project subfolder ./env:

  1. Remove the code reticulate::use_virtualenv("./env")
  2. Create a .Renviron file in your project containing the line: RETICULATE_PYTHON=./env/bin/python
  3. Restart your R session
  4. You can employ reticulate::py_config() to ostend the correct environment is in use

After following these steps you will be able to push-button publish the content to RStudio Connect. You can continue projection development using the environment variable, yous do non demand to undo the change to keep working on your lawmaking.

During push button-button publishing, do Not include the .Renviron file.

Publishing from Git#

Whatever of the content types that are described above may be deployed directly from a Git repository. Run into the Git-Backed Publishing section for details.

Troubleshooting Publishing Bug#

RStudio Connect includes extra information in the packrat restore, content build, and content execution logs that may assistance diagnose mutual problems with publishing content. For instance:

  • RStudio Connect will log the distribution of Linux used by the server. If at that place are issues related to shared object files used past R, this may help to diagnose them.

  • RStudio Connect will log whatever overrides to the repos pick set by your server administrator. This may occur when your organization has a security policy that permits you to apply a item public repository on your workstation only requires a secure private repository on the RStudio Connect server. If at that place are problems related to packages not being nowadays in repositories, this may help to diagnose them.

  • RStudio Connect will log the URL of all requests made to fetch packages. If you accept multiple repos set in options(repos), Packrat's beliefs on restore may exist hard to visualize. If there are issues related to this behavior, this information may aid diagnose them.

  • If no version of R on the RStudio Connect server matches the version of R that you used to deploy your content, RStudio Connect volition detect the closest available R version and log that you requested a specific R version merely that it is using some other specific R version because the requested 1 is non available.

  • RStudio Connect volition scan your logs for common errors and advise troubleshooting steps if an error is plant. If you take encountered an fault that RStudio Connect is not detecting or for which RStudio Connect is not providing adequate troubleshooting steps, you may wish to contact your administrator or your RStudio Back up representative.

Mistake Codes#

RStudio Connect analyzes the log output and recognizes a set of common errors. These are assigned error codes, which are listed below forth with possible causes and solutions.

r-cannot-access-repo#

RStudio Connect cannot download a packet because the R bundle repository (for case, CRAN or RStudio Bundle Manager) cannot be accessed.

Possible causes

  • At that place is a network problem preventing the Connect server from connecting to the package repository.
  • The parcel repository may be downwards.
  • The parcel repository must be accessed through a proxy server, but no proxy server is configured in the Connect configuration file.
  • The customer computer that published the content is using a unlike package repository from the Connect server, and that parcel repository is not accessible from the Connect server.
  • The package repository has moved to a dissimilar URL since the content was published.

Possible solutions

  • Verify that the package repository is reachable from the RStudio Connect server.
  • If necessary, modify the Packages.HTTPProxy and Packages.HTTPSProxy configuration settings to point to your outbound proxy server.
  • Configure the customer with a package repository that is attainable via http(southward) from the Connect server, such as CRAN or RStudio Packet Managing director. Reinstall the affected packages from the new repository and publish the content again.

References

  • Admin Guide / R / Package Direction / Proxy Configuration
  • Admin Guide / Appendix / Configuration / Packages.HTTPProxy
  • https://support.rstudio.com/hc/en-united states/articles/360004067074-Managing-Packages-with-RStudio

r-proxy-unreachable#

The proxy server specified in Packages.HTTPProxy or Packages.HTTPSProxy could not be reached.

Possible causes

  • The proxy server configuration in Connect is incorrect.
  • The proxy server is not working or cannot be reached on the network.

Possible solutions

  • Verify that the proxy server is working and is reachable from the RStudio Connect server.
  • If necessary, change the Packages.HTTPProxy and Packages.HTTPSProxy configuration settings to bespeak to the correct proxy server.

References

  • https://support.rstudio.com/hc/en-united states of america/manufactures/226914208-Installing-packages-on-RStudio-Connect-from-backside-a-proxy
  • Admin Guide / R / Packet Management / Proxy Configuration

r-packet-not-available#

An R parcel required by the content cannot be establish in the package repository.

Possible causes

  • The R package being installed is not bachelor for the version of R configured at Connect.
  • The R package being installed is not bachelor for linux.
  • The client calculator that published the content is using a different packet repository from the Connect server, and the R package being installed is not available in the repository configured at the Connect server.
  • The package repository moved to a new URL after the content was published, and Connect is now attempting to rebuild the surround using the old bundle repository URL.

Possible solutions

  • Install a version of R on the Connect server that matches the one being used by the client computer. You lot can identify the required R version from the deployment logs, which will contain an entry similar to this:

    Packet requested R version three.5.0; using /usr/lib/R/bin/R which has version iii.4.4

    In this example, the customer reckoner has R 3.5.0 and the Connect server has R version 3.4.4. The recommended solution would exist to install R version 3.5.0 on the Connect server alongside the existing iii.four.4 installation.

  • Replace usage of Windows-specific R packages with ones bachelor for linux.

  • Configure the client with a package repository that is accessible via http(s) from the Connect server, such as CRAN or RStudio Parcel Director. Reinstall the afflicted packages from the new repository and publish the content again.

References

  • Admin Guide / Getting Started / Installation
  • https://back up.rstudio.com/hc/en-us/articles/360004067074-Managing-Packages-with-RStudio

r-packet-installed-direct#

A package was installed improperly on the client computer.

Possible causes

  • On the client estimator publishing the content, the R package was installed directly from a download URL. For instance, using install.packages("https://.../packagename.tar.gz").

Possible solutions

  • Reinstall the affected packet on the client computer from a configured repository such as CRAN or an instance of RStudio Parcel Manager. For case, install.packages("packagename"). Then publish the content once again.

References

  • Admin Guide / R / Packet Management

r-gcc-too-one-time#

An R parcel must be compiled using a newer version of GCC.

Possible causes

  • The R bundle being installed is a compiled C++ bundle which requires support for a specific language standard such equally C++xiv, and the installed version of gcc does not back up that linguistic communication standard.

Possible solutions

  • Install a version of GCC which supports the required language features, as described at https://gcc.gnu.org/projects/cxx-status.html.

References

  • https://gcc.gnu.org/projects/cxx-status.html
  • https://support.rstudio.com/hc/en-us/articles/360006142673-RStudio-Connect-with-devtoolset-enabled

r-build-need-cxx-defined#

The R package existence installed is a compiled C++ package which requires support for a specific language standard such as C++14, and that support is not properly configured in the toolchain.

Possible causes

  • A previous update to your R installation did not update the Makeconf file. This can happen if the file has been modified and you updated R using a package manager such as yum.

Possible solutions

  • Install R from precompiled binaries as recommended in the RStudio Connect Admin Guide. Installing from these binaries allows you to easily make multiple versions of R available as your users upgrade or install R on their computers.
  • Install a version of GCC which supports the required language features, equally described at https://gcc.gnu.org/projects/cxx-status.html.
  • The CXX11 or CXX14-related variables must be divers in the Makeconf file located at $(R RHOME)/etc/Makeconf for all installed versions of R. If a Makeconf.rpmnew file exists in this location, copy the values from in that location to Makeconf. Otherwise, edit the file to ensure that the required variables are divers.

References

  • https://cran.r-project.org/doc/manuals/r-release/R-admin.html#C_002b_002b-Support
  • https://gcc.gnu.org/projects/cxx-status.html
  • Admin Guide / Getting Started / Installation

r-cannot-access-local-repo#

A local package repository could not be accessed.

Possible causes

  • A local packet repository was in utilize on the customer which published the content, and the path to that parcel repository is not valid on the server.

Possible solutions

  • Configure the client with a package repository that is accessible via http(s) from the Connect server, such every bit CRAN or RStudio Package Director. Reinstall the afflicted packages from the new repository and publish the content again.

References

  • https://support.rstudio.com/hc/en-us/manufactures/360004067074-Managing-Packages-with-RStudio

r-invalid-packet-repository-document#

There is a trouble with the TLS certificate for the package repository (eastward.g. CRAN or RStudio Package Manager) or outbound proxy server.

Possible causes

  • The server uses a cocky-signed certificate, and your RStudio Connect server is not configured to trust the certificate.
  • The server document is signed by a private document authority (CA), and your RStudio Connect server is not configured to trust the CA certificate.
  • The server document is expired.

Possible solutions

  • For self-signed or private-CA certificates, install a trusted certificate into the arrangement trust store.

References

  • https://ubuntu.com/server/docs/security-certificates
  • https://admission.redhat.com/documentation/en-us/red_hat_enterprise_linux/vii/html/security_guide/sec-using_openssl#sec-Verifying_Certificates

r-package-version-not-available#

A required R package was found in the bundle repository, just the specified version is not available.

Possible causes

  • The client computer that published the content is using a unlike packet repository from the Connect server, and the bundle repository that Connect is using does non have the requested version of the parcel.
  • The Connect server is using a CRAN mirror that is out of date.
  • The package repository moved to a new URL subsequently the content was published, and Connect is now attempting to rebuild the environment using the old package repository URL.

Possible solutions

  • Configure the client with a package repository that is accessible via http(due south) from the Connect server, such as CRAN or RStudio Package Managing director. Reinstall the afflicted packages from the new repository and publish the content again.

  • Update the packages on the CRAN mirror.

    • If this is a local instance of RStudio Parcel Director, see the Package Managing director documentation for instructions on how to update the mirrored packages.
    • If this is a public CRAN mirror, it may be experiencing technical problems. Choose a different CRAN mirror.

References

  • https://docs.rstudio.com/rspm/admin/repositories/#sync-schedule
  • https://docs.rstudio.com/rspm/admin/appendix/airgapped-installs/#air-gapped-updates
  • https://support.rstudio.com/hc/en-us/articles/360004067074-Managing-Packages-with-RStudio

r-missing-system-library#

An R parcel cannot be installed because a required system-level dependency is missing.

Possible causes

  • An R package requires a system-level dependency, such as a library or executable, which is not installed on the Connect server.

Possible solutions

  • Install the required package using your organisation package manager (such as apt or yum).
  • Use your on-premise example of RStudio Packet Manager or the publicly provided example and open the information folio for the affected R package. Installation instructions for the bundle'south system-level dependencies are included nether the Install System Prerequisites heading.
  • Use the letters in the deployment log to place which system packet yous demand to install.

References

  • https://packagemanager.rstudio.com/client/#/repos/2/packages/

return-missing-r-packet#

A package is missing from the R environment.

Possible causes

  • The packet is referenced indirectly in the R code, without an explicit library() or require() call.

Possible solutions

  • Import required libraries directly. For example, using "library(tidyverse)".

References

  • https://www.rdocumentation.org/packages/base/versions/3.6.i/topics/library
  • https://back up.rstudio.com/hc/en-us/articles/229998627-Why-does-my-app-work-locally-but-not-on-my-RStudio-Connect-server

render-r-code-fault#

An error occurred while running R code.

Possible causes

  • At that place is a issues in the R code beingness deployed.
  • The R lawmaking depends on weather that are not present in Connect.
  • The R lawmaking depends on a version of R that is not configured in Connect.

Possible solutions

  • Right bugs in the R lawmaking, then deploy the corrected content.

    • The document rendering log in Connect contains details of the fault.
    • Knitting the document in the RStudio IDE may as well exist helpful for debugging.
  • Install a version of R on the Connect server that matches the one being used by the client computer, so redeploy the content. You can place the required R version from the log messages above, which volition contain an entry similar to this:

    Note

    Bundle requested R version 3.5.0; using /usr/lib/R/bin/R which has version 3.4.4

    In this example, the client computer has R iii.5.0 and the Connect server has R version iii.4.iv. The recommended solution would exist to install R version 3.5.0 on the Connect server alongside the existing 3.four.4 installation.

  • If yous have previously published this content, viewers volition continue to encounter the last successful output until the error is resolved past republishing.

References

  • https://docs.rstudio.com/connect/user/content-settings/#content-logs
  • https://back up.rstudio.com/hc/en-us/articles/205612627-Debugging-with-RStudio
  • https://back up.rstudio.com/hc/en-us/articles/229998627-Why-does-my-app-work-locally-but-not-on-my-RStudio-Connect-server
  • Admin Guide / Getting Started / Installation

python-cannot-admission-repo#

RStudio Connect cannot download a bundle because the Python bundle repository (for example, PyPI) cannot exist accessed.

Possible causes

  • There is a network problem preventing the Connect server from connecting to the package repository.
  • The parcel repository may be down.
  • The package repository must be accessed through a proxy server, but no proxy server is configured in the Connect configuration file.
  • You lot have a individual package repository or PyPI mirror, but RStudio Connect is non configured to utilize it.

Possible solutions

  • Verify that the package repository is reachable from the Connect server.
  • If necessary, change the Packages.HTTPProxy and Packages.HTTPSProxy configuration settings to point to your outbound proxy server.
  • If necessary, configure /etc/pip.conf on the Connect server to provide access to your packet repository.

References

  • Admin Guide / Appendix / Configuration / Packages.HTTPProxy
  • https://pip.pypa.io/en/stable/user_guide/#config-file

python-proxy-unreachable#

The proxy server specified in Packages.HTTPProxy or Packages.HTTPSProxy could not exist reached.

Possible causes

  • The proxy server configuration in Connect is incorrect.
  • The proxy server is not working or cannot exist reached on the network.

Possible solutions

  • Verify that the proxy server is working and is reachable from the RStudio Connect server.
  • If necessary, change the Packages.HTTPProxy and Packages.HTTPSProxy configuration settings to signal to the correct proxy server.

References

  • Admin Guide / R / Package Management / Proxy Configuration

python-invalid-package-repository-certificate#

There is a problem with the TLS document for the Python parcel repository (e.g. PyPI) or outbound proxy server.

Possible causes

  • The server uses a self-signed certificate, and your RStudio Connect server is not configured to trust the certificate.
  • The server certificate is signed by a individual certificate authorisation (CA), and your RStudio Connect server is not configured to trust the CA certificate.
  • The server certificate is expired.

Possible solutions

  • For self-signed or individual-CA certificates, install a trusted certificate into the organisation trust store.

References

  • https://ubuntu.com/server/docs/security-certificates
  • https://access.redhat.com/documentation/en-united states/red_hat_enterprise_linux/7/html/security_guide/sec-using_openssl#sec-Verifying_Certificates

python-packet-non-bachelor#

A Python package required by the content cannot be found in the package repository.

Possible causes

  • The Python parcel being installed is not available for the version of Python configured at Connect.
  • The Python packet beingness installed is not available for linux.
  • The client figurer that published the content is using a different packet repository from the Connect server, and the Python parcel being installed is not available in the repository configured at the Connect server.
  • The packet repository moved to a new URL afterward the content was published, and Connect is at present attempting to rebuild the environs using the sometime package repository URL.

Possible solutions

  • Install a version of Python on the Connect server that matches the i beingness used by the client figurer. You can identify the required Python version from the deployment logs, which will contain an entry similar to this:

    Bundle requested Python version three.7.0; using /opt/python/3.5.7/bin/python which has version 3.5.7

    In this case, the customer computer has Python 3.7.0 and the Connect server has Python version iii.5.vii. The recommended solution would be to install Python version three.7.0 on the Connect server alongside the existing 3.5.vii installation.

  • Supersede usage of Windows-specific Python packages with ones available for linux.

  • Configure the client with a package repository that is also configured at the Connect server, such as PyPI. Reinstall the affected packages from the new repository and publish the content again.
  • Configure the RStudio Connect server's /etc/pip.conf to use a bundle repository that is attainable via http(due south) from the Connect server, such every bit PyPI. Reinstall the affected packages from the new repository and publish the content once again.

References

  • Admin Guide / Getting Started / Installation
  • https://pip.pypa.io/en/stable/user_guide/#config-file

python-packet-version-non-bachelor#

A required Python package was plant in the package repository, only the specified version is not bachelor.

Possible causes

  • The client figurer that published the content is using a different package repository from the Connect server, and the bundle repository that Connect is using does not have the requested version of the package.
  • The Connect server is using a PyPI mirror that is out of engagement.
  • The packet repository moved to a new URL later the content was published, and Connect is now attempting to rebuild the environment using the quondam bundle repository URL.

Possible solutions

  • Configure the client with a packet repository that is too configured at the Connect server, such as PyPI. Reinstall the affected packages from the new repository and publish the content again.
  • Configure the RStudio Connect server'due south /etc/pip.conf to use a package repository that is accessible via http(due south) from the Connect server, such every bit PyPI. Reinstall the afflicted packages from the new repository and publish the content again.
  • Update the packages on the PyPI mirror.

    • If this is a local package repository, see its documentation for instructions on how to update the mirrored packages.
    • If this is a public PyPI mirror, it may exist experiencing technical problems. Choose a different PyPI mirror.

References

  • https://pip.pypa.io/en/stable/user_guide/#config-file

python-missing-system-library#

A Python bundle cannot be installed considering a required arrangement-level dependency is missing.

Possible causes

  • A Python bundle requires a system-level dependency, such every bit a library or executable, which is not installed on the Connect server.

Possible solutions

  • Install the required package using your arrangement package manager (such as apt or yum).
  • Use the messages in the deployment log to identify which system package you need to install.

render-python-lawmaking-error#

An error occurred while running Python code.

Possible causes

  • In that location is a bug in the Python lawmaking being deployed.
  • The Python code depends on conditions that are non nowadays in Connect.
  • The Python code depends on a version of Python that is not configured in Connect.

Possible solutions

  • Right bugs in the Python code, then deploy the corrected content.

    • The document rendering log in Connect contains details of the error.
    • For content published from the RStudio IDE, knitting the certificate in the IDE may too be helpful for debugging.
    • For content published from Jupyter, running the notebook locally may help to isolate the problem.
  • Install a version of Python on the Connect server that matches the one beingness used by the client computer, and so redeploy the content. You can place the required Python version from the log messages above, which will contain an entry like to this:

    Bundle requested Python version 3.7.0; using /opt/python/three.5.7/bin/python which has version three.v.7

    In this example, the client estimator has Python 3.7.0 and the Connect server has Python version 3.5.vii. The recommended solution would be to install Python version iii.vii.0 on the Connect server alongside the existing 3.5.7 installation.

  • If y'all have previously published this content, viewers will continue to come across the final successful output until the fault is resolved by republishing.

References

  • https://docs.rstudio.com/connect/user/content-settings/#content-logs
  • https://support.rstudio.com/hc/en-us/articles/205612627-Debugging-with-RStudio
  • https://back up.rstudio.com/hc/en-u.s./manufactures/229998627-Why-does-my-app-work-locally-but-not-on-my-RStudio-Connect-server
  • Admin Guide / Getting Started / Installation
  • https://docs.rstudio.com/rsconnect-jupyter/index.html

espieroustich.blogspot.com

Source: https://docs.rstudio.com/connect/user/publishing/