- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2022 07:42 PM
I recently posted this in Stack Overflow. I'm using R in Databricks. R Studio runs fine and executes from the Databricks cluster. I would like to transition from R Studio to notebooks. When I start the cluster, R seems to run fine from notebooks. I would like to run an Rmarkdown file. When I render the Rmarkdown file, it seems to run fine but throws the error below when it is done. If I run the Rmarkdown again, it throws the error immediately. R will not run after throwing this error once - it just repeats, even for the simplest of scripts. Any help is greatly appreciated!
Error in writeLines(DB_STREAM_BEACON_STRING_START__, DATABRICKS_STDERRCONNSTREAM__) :
invalid connection
Some(<code style = 'font-size:10p'> </code>)
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2022 07:51 AM
Figured it out after several hours of research and troubleshooting. This problem arises from Rmarkdown failing to write various types of common Rmarkdown output (most likely viewer output) to stdout. Rather than directly running
rmarkdown::render()
from the notebook, run
R -e 'rmarkdown::render()' > out.txt
as a shell script in the notebook, redirecting output to a text file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2022 07:51 AM
Figured it out after several hours of research and troubleshooting. This problem arises from Rmarkdown failing to write various types of common Rmarkdown output (most likely viewer output) to stdout. Rather than directly running
rmarkdown::render()
from the notebook, run
R -e 'rmarkdown::render()' > out.txt
as a shell script in the notebook, redirecting output to a text file.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2022 08:15 AM
@Paul Evangelista - Thank you for letting us know. You did great!
Would you be happy to mark your answer as best so that others can find your solution more easily?

