[問題] web server上建立r-leaflet套件(趴吐)

看板R_Language作者 (rlearner)時間9年前 (2016/12/14 11:05), 編輯推噓1(1017)
留言18則, 3人參與, 最新討論串1/1
小弟我實在找不出辦法,想再請大大們幫忙QQ [環境架設/問題簡敘] 我在實體機上ubuntu上架設了shiny server 測試用的shiny範例程式所放路徑: $cd /opt/shiny-server/samples/sample-apps 並放了幾個範例程式,如下 http://140.128.197.58:3838/sample-apps/ (問題所在!!!!)但在嘗試leaflet地圖套件時出錯: http://140.128.197.58:3838/sample-apps/leaflet1/ ps.不過leaflet應用在js上就可以了@_@ http://140.128.197.58:3838/sample-apps/html-samples/leaflet.html [程式碼] 以下是 http://140.128.197.58:3838/sample-apps/leaflet1/ 的程式碼,直接放上rstudio跑是沒問題的 ui.R------------------------------------------ library(leaflet) library(shiny) fluidPage( h1("hpc map test"), leafletOutput('map',width = "100%",height = 800) ) server.R---------------------------------- library(shiny) library(leaflet) function(input,output){ output$map <- renderLeaflet({ leaflet() %>% addTiles() %>% setView(lng=120.601,lat=24.179,zoom=16) }) } [錯誤訊息] 1.網頁訊息 點入剛剛講的 http://140.128.197.58:3838/sample-apps/leaflet1/ 的網址會出現如下的錯誤訊息: ERROR: An error has occurred. Check your logs or contact the app author for clarification. 2.按F12選console,出現錯誤訊息 Failed to load resource: the server responded with a status of 500 (Internal Server Error) 3.去伺服器進入cd /var/log/shiny-server 並無leaflet相關的錯訊息訊 [環境版本] ubuntu 14.04.05 shiny-server 1.5.1 R 3.3.2 leaflet 1.0.1 不知道該如何處理,求解QQ!! -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.128.101.143 ※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1481684706.A.3AD.html

12/14 12:17, , 1F
你的程式我放在自己的server可以run 你按照下面這篇看
12/14 12:17, 1F

12/14 12:17, , 2F
能否找到err msg: https://goo.gl/jz12pQ
12/14 12:17, 2F

12/14 16:23, , 3F
感謝,我試試看,
12/14 16:23, 3F

12/14 16:23, , 4F
另外請問 你自己的server是指ubuntu server嗎?@@
12/14 16:23, 4F

12/14 16:51, , 5F
ubuntu14.04 and centos6.5 both ok~~
12/14 16:51, 5F

12/14 17:09, , 6F
!!你是怎麼建立的?是用shiny server嗎?
12/14 17:09, 6F

12/14 17:28, , 7F
是啊 就照官網步驟裝設而已 一樣在/srv/shiny-server
12/14 17:28, 7F

12/14 17:54, , 8F
真假!!??我重裝看看
12/14 17:54, 8F

12/15 08:59, , 9F
我的也正常 centos7 ~~
12/15 08:59, 9F

12/15 14:25, , 10F
!!!是在VM上跑的嗎?@@!!
12/15 14:25, 10F

12/15 14:43, , 11F
是用這官網的步驟嗎?
12/15 14:43, 11F

12/15 15:12, , 13F
我用ubuntu 14還是不行
12/15 15:12, 13F

12/15 15:54, , 14F
沒有進一步訊息很難知道,如果google你的錯誤訊息,可以
12/15 15:54, 14F

12/15 15:55, , 15F
找到一開始我推的回應,另外有https://goo.gl/DDYffH
12/15 15:55, 15F

12/15 15:56, , 16F
這篇文中寫此錯誤來自shiny-server can't load lib與解法
12/15 15:56, 16F

12/15 15:59, , 17F
你前面問好像也有這樣的推文?anyway,google may helps
12/15 15:59, 17F

12/15 20:21, , 18F
好的,謝謝 我研究一下
12/15 20:21, 18F
文章代碼(AID): #1OKBRYEj (R_Language)
文章代碼(AID): #1OKBRYEj (R_Language)