0
當我嘗試連接到我的網絡服務器的任何閃亮的應用程序,我收到以下錯誤:閃亮服務器無法打開連接到任何閃亮的應用
ERROR: cannot open the connection
我目前存儲在/ SRV /閃亮的應用服務器上的服務器文件夾和該文件夾當前具有正確的讀/寫權限。早些時候,當我上傳我的應用程序時,它運行沒有問題,但我做了幾處更改,當我更新文件時,我突然開始出現此錯誤。我嘗試回滾所有更改,但錯誤仍然存在,因此最終我嘗試從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")
}
})
}