Shinydashboard无法在AWS Shiny-Server上正确呈现UI

时间:2019-03-29 17:40:12

标签: r shiny shinydashboard shiny-server

当我运行以下app.R文件时,一切运行正常。

library(shinydashboard)

ui <- dashboardPage(
  dashboardHeader(title = "Basic dashboard"),
  dashboardSidebar(),
  dashboardBody(
    # Boxes need to be put in a row (or column)
    fluidRow(
      box(plotOutput("plot1", height = 250)),

      box(
        title = "Controls",
        sliderInput("slider", "Number of observations:", 1, 100, 50)
      )
    )
  )
)

server <- function(input, output) {
  set.seed(122)
  histdata <- rnorm(500)

  output$plot1 <- renderPlot({
    data <- histdata[seq_len(input$slider)]
    hist(data)
  })
}

shinyApp(ui, server)

它看起来像这样: enter image description here

但是,当我将其部署到在AWS实例上运行的shiny-server时,它无法正确呈现。我认为shinydashboard一定有问题,因为我在服务器上运行了其他闪亮的应用程序,并且它们运行正常。唯一出现此问题的应用是我正在尝试使用shinydashboard进行部署的应用。它已安装在服务器上,所以我不确定可能会丢失什么。这是服务器上的外观: enter image description here

编辑:: 它似乎也可以在shinyapps.io上完美运行。因此,必须与我的AWS Ubuntu服务器和shinydashboard配合使用。我已经安装了它及其‘0.7.1’软件包版本。这可能是什么?

闪亮服务器日志中没有任何内容。这是应用程序日志 enter image description here

1 个答案:

答案 0 :(得分:0)

服务器/应用程序日志中是否有任何内容?

/var/log/shiny-server.log
/var/log/shiny-server/*.log

我认为直方图框也应该呈现,除非缺少括号/逗号?