[問題] 無法用shiny server執行leaflet套件

看板R_Language作者 (rlearner)時間9年前 (2016/11/20 16:44), 編輯推噓0(0011)
留言11則, 2人參與, 最新討論串1/1
[問題類型]: 程式諮詢(我想用R 做某件事情,但是我不知道要怎麼用R 寫出來) [軟體熟悉度]: 入門(寫過其他程式,只是對語法不熟悉) [問題敘述]: 我想在一台Ubuntu server的機子上執行shiny (測試一)這是在那台機子上測試的shiny頁面: http://140.128.197.58:3838/sample-apps/shiny1/ (測試二)也可以用javascrip 去執行 leaflet頁面 http://140.128.197.58:3838/sample-apps/html-samples/leaflet.html 問題在這↓↓ !!!!!!!!!(問題頁面)但在一台Ubuntu server的機子上執行shiny 中的leaflet互動地圖套件,卻無法呈現頁面 http://140.128.197.58:3838/sample-apps/leaflet1/ (頁面錯誤訊息)(請複製網頁用google chrom開啟) ERROR: An error has occurred. Check your logs or contact the app author for clarification. [程式範例]:(leaflet測試碼) 程式是用shiny的方法測試的,會分成ui和server兩部份 不會太複雜,在rstudio上可成功運作 (請先在rstudio上下載shiny 和leaflet套件) --[ui.R]-------------------------------------------------- library(leaflet) library(shiny) fluidPage( h1("hpc map test"), leafletOutput('map',width = "100%",height = 400) ) --[server.R]----------------------------------------------- library(shiny) library(leaflet) function(input,output){ output$map <- renderLeaflet({ leaflet() %>% addTiles() %>% setView(lng=120.601,lat=24.179,zoom=16) }) } [環境敘述]: 本機win7 伺服器:ubuntu server 14.04 shiny server [關鍵字]: shiny server ,ubuntu server leaflet -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.128.101.143 ※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1479631449.A.61F.html

11/20 18:22, , 1F
在瀏覽器中執行SHINY出問題按F12看console有何錯誤訊息?
11/20 18:22, 1F

11/20 21:45, , 2F
按f12 console有兩個錯誤訊息:
11/20 21:45, 2F

11/20 21:45, , 3F
第一個錯誤訊息
11/20 21:45, 3F

11/20 21:46, , 4F
failed to load resource: the serverV http://140.128.
11/20 21:46, 4F

11/20 21:46, , 5F
responded with a status of 404
11/20 21:46, 5F

11/20 21:47, , 6F
和第二個錯誤訊息
11/20 21:47, 6F

11/20 21:47, , 7F
failed load resource: http://140.128.197.58:3838/sam
11/20 21:47, 7F

11/20 21:47, , 8F
the server responded with a status of 500(internal s
11/20 21:47, 8F

11/20 21:48, , 9F
請問該如何處理 ??@@
11/20 21:48, 9F

11/20 22:29, , 10F
先check一下你放shiny app路徑對、資源等可讀?比如chmod
11/20 22:29, 10F

11/20 22:30, , 11F
your ui.R, server.R to 755..
11/20 22:30, 11F
文章代碼(AID): #1OCM9POV (R_Language)
文章代碼(AID): #1OCM9POV (R_Language)