[英]Shiny Server unable to open connection to any shiny application
When I attempt to connect to any shiny application on my webserver I receive the following error: 当我尝试连接到Web服务器上的任何闪亮应用程序时,都会收到以下错误消息:
ERROR: cannot open the connection
I am currently storing the application within the /srv/shiny-server folder on the server and the folder does currently have the correct read/write permissions. 我当前将应用程序存储在服务器上的/ srv / shiny-server文件夹中,并且该文件夹当前具有正确的读/写权限。 Earlier when I uploaded my application it ran without issue but I made several changes and when I updated the files I suddenly started getting this error.
早些时候,当我上传我的应用程序时,它没有问题,但是做了一些更改,并且当我更新文件时,突然开始出现此错误。 I tried rolling back all of the changes but the error persisted and so eventually I attempted uploading an example application from the Shiny Website and that also gets the same error.
我尝试回滚所有更改,但错误仍然存在,因此最终我尝试从Shiny网站上载示例应用程序,并且也收到相同的错误。
Here is the code for the sample application I'm currently trying to get working but I do not think that it is the issue: 这是我当前正在尝试工作的示例应用程序的代码,但我认为这不是问题所在:
ui.R 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 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")
}
})
}
I opened up the logs for the application located in /var/log/shiny-server and it turned out that permission was being denied to the folder. 我打开了位于/ var / log / shiny-server中的应用程序的日志,结果是该文件夹的权限被拒绝。 After googling the problem I found this question which helped me solve the issue
谷歌搜索问题后,我发现了这个问题 ,可以帮助我解决问题
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.