闪亮服务器无法打开与任何闪亮应用程序的连接
Shiny Server unable to open connection to any shiny application
当我尝试连接到我的网络服务器上任何闪亮的应用程序时,我收到以下错误:
ERROR: cannot open the connection
我目前将应用程序存储在服务器上的 /srv/shiny-server 文件夹中,并且该文件夹当前具有正确的 read/write 权限。早些时候,当我上传我的应用程序时,它 运行 没有问题,但我做了一些更改,当我更新文件时,我突然开始收到此错误。我尝试回滚所有更改,但错误仍然存在,因此最终我尝试从 Shiny 网站上传示例应用程序,但也遇到了同样的错误。
这是我目前正在尝试运行的示例应用程序的代码,但我认为这不是问题所在:
ui.R
library(shiny)
bootstrapPage(
selectInput(inputId = "n_breaks",
label = "Number of bins in histogram (approximate):",
choices = c(10, 20, 35, 50),
selected = 20),
checkboxInput(inputId = "individual_obs",
label = strong("Show individual observations"),
value = FALSE),
checkboxInput(inputId = "density",
label = strong("Show density estimate"),
value = FALSE),
plotOutput(outputId = "main_plot", height = "300px"),
# Display this only if the density is shown
conditionalPanel(condition = "input.density == true",
sliderInput(inputId = "bw_adjust",
label = "Bandwidth adjustment:",
min = 0.2, max = 2, value = 1, step = 0.2))
)
server.R
library(shiny)
function(input, output) {
output$main_plot <- renderPlot({
hist(faithful$eruptions,
probability = TRUE,
breaks = as.numeric(input$n_breaks),
xlab = "Duration (minutes)",
main = "Geyser eruption duration")
if (input$individual_obs) {
rug(faithful$eruptions)
}
if (input$density) {
dens <- density(faithful$eruptions,
adjust = input$bw_adjust)
lines(dens, col = "blue")
}
})
}
我打开了位于 /var/log/shiny-server 的应用程序的日志,结果发现该文件夹的权限被拒绝。谷歌搜索问题后,我发现 这帮助我解决了问题
当我尝试连接到我的网络服务器上任何闪亮的应用程序时,我收到以下错误:
ERROR: cannot open the connection
我目前将应用程序存储在服务器上的 /srv/shiny-server 文件夹中,并且该文件夹当前具有正确的 read/write 权限。早些时候,当我上传我的应用程序时,它 运行 没有问题,但我做了一些更改,当我更新文件时,我突然开始收到此错误。我尝试回滚所有更改,但错误仍然存在,因此最终我尝试从 Shiny 网站上传示例应用程序,但也遇到了同样的错误。
这是我目前正在尝试运行的示例应用程序的代码,但我认为这不是问题所在:
ui.R
library(shiny)
bootstrapPage(
selectInput(inputId = "n_breaks",
label = "Number of bins in histogram (approximate):",
choices = c(10, 20, 35, 50),
selected = 20),
checkboxInput(inputId = "individual_obs",
label = strong("Show individual observations"),
value = FALSE),
checkboxInput(inputId = "density",
label = strong("Show density estimate"),
value = FALSE),
plotOutput(outputId = "main_plot", height = "300px"),
# Display this only if the density is shown
conditionalPanel(condition = "input.density == true",
sliderInput(inputId = "bw_adjust",
label = "Bandwidth adjustment:",
min = 0.2, max = 2, value = 1, step = 0.2))
)
server.R
library(shiny)
function(input, output) {
output$main_plot <- renderPlot({
hist(faithful$eruptions,
probability = TRUE,
breaks = as.numeric(input$n_breaks),
xlab = "Duration (minutes)",
main = "Geyser eruption duration")
if (input$individual_obs) {
rug(faithful$eruptions)
}
if (input$density) {
dens <- density(faithful$eruptions,
adjust = input$bw_adjust)
lines(dens, col = "blue")
}
})
}
我打开了位于 /var/log/shiny-server 的应用程序的日志,结果发现该文件夹的权限被拒绝。谷歌搜索问题后,我发现