Hi @jcheng,
Thank you for your time and help with this. I am getting the log files and checked the location you suggested. I am getting a segmentation fault. I have added my log file below... I am not sure what is causing this issue? I updated all my packages, including rmarkdown, prior to installing shiny.
sdunaj@eblackburn /var/log/shiny-server $ sudo more rmd-shiny-20180921-082315-37673.log
Listening on http://127.0.0.1:37673
^L
processing file: index.Rmd
output file: /tmp/RtmpFo2t0A/index.knit.md
Output created: /tmp/RtmpFo2t0A/file1d5e441e4408.html
*** caught segfault ***
address 0xbd, cause 'memory not mapped'
Traceback:
1: .External("cairo_create_new_device", as.character(ctype), file, width, height, pointsize, bg, canvas, umpl, dpi, ..., PACKAGE = "Cairo")
2: Cairo(width, height, type = "png", file = filename, pointsize = pointsize, bg = bg, res = res, ...)
3: pngfun(filename = filename, width = width, height = height, res = res, ...)
4: startPNG(outfile, width * pixelratio, height * pixelratio, res = res * pixelratio, ...)
5: drawPlot(name = "phonePlot", session = <environment>, func = function (...) { if (..stacktraceon) ..stacktraceon..(renderPlot(...)) else renderPlot(...)}, width = 196L, height = 2
70L, pixelratio = 1L, res = 72)
6: do.call("drawPlot", c(list(name = outputName, session = session, func = func, width = dims$width, height = dims$height, pixelratio = pixelratio, res = res), args))
7: force(expr)
8: withVisible(force(expr))
9: withCallingHandlers(expr, error = doCaptureStack)
10: globals$domain$wrapSync(expr)
11: promises::with_promise_domain(createStackTracePromiseDomain(), expr)
12: captureStackTraces({ result <- withVisible(force(expr)) if (promises::is.promising(result$value)) { p <- promise_chain(setVisible(result), ..., catch = catch, finally =
finally) runFinally <- FALSE p } else { result <- Reduce(function(v, func) { if (".visible" %in% names(formals(func))) { withVisible(func(v$val
ue, .visible = v$visible)) } else { withVisible(func(v$value)) } }, list(...), result) setVisible(result) }})
13: doTryCatch(return(expr), name, parentenv, handler)
14: tryCatchOne(expr, names, parentenv, handlers[[1L]])
15: tryCatchList(expr, classes, parentenv, handlers)
16: tryCatch({ captureStackTraces({ result <- withVisible(force(expr)) if (promises::is.promising(result$value)) { p <- promise_chain(setVisible(result), ..., catch = ca
tch, finally = finally) runFinally <- FALSE p } else { result <- Reduce(function(v, func) { if (".visible" %in% names(f
ormals(func))) { withVisible(func(v$value, .visible = v$visible)) } else { withVisible(func(v$value)) } },
list(...), result) setVisible(result) } })}, error = function(e) { if (!is.null(catch)) catch(e) else stop(e)}, finally = if (runFinally && !is.null(finally)) fin
ally())
17: do()
18: hybrid_chain({ dims <- if (execOnResize) getDims() else isolate(getDims()) pixelratio <- session$clientData$pixelratio %OR% 1 do.call("drawPlot", c(list(name = outputName, s
ession = session, func = func, width = dims$width, height = dims$height, pixelratio = pixelratio, res = res), args))}, catch = function(reason) { getDims() stop(reason)})
19: `<reactive:plotObj>`(...)
20: ..stacktraceon..(`<reactive:plotObj>`(...))
21: .func()
22: withVisible(.func())
23: withCallingHandlers({ .error <<- FALSE withVisible(.func())}, error = function(cond) { .value <<- cond .error <<- TRUE .visible <<- FALSE})
24: contextFunc()
25: env$runWith(self, func)
26: force(expr)
27: globals$domain$wrapSync(expr)
28: promises::with_promise_domain(createVarPromiseDomain(.globals, "domain", domain), expr)
29: withReactiveDomain(.domain, { env <- .getReactiveEnvironment() .graphEnterContext(id) on.exit(.graphExitContext(id), add = TRUE) env$runWith(self, func)})
30: globals$domain$wrapSync(expr)
31: promises::with_promise_domain(reactivePromiseDomain(), { withReactiveDomain(.domain, { env <- .getReactiveEnvironment() .graphEnterContext(id) on.exit(.graphExitContext(
id), add = TRUE) env$runWith(self, func) })})
32: ctx$run(function() { result <- withCallingHandlers({ .error <<- FALSE withVisible(.func()) }, error = function(cond) { .value <<- cond .error <<- TRUE .
visible <<- FALSE }) .value <<- result$value .visible <<- result$visible})
33: self$.updateValue()
34: ..stacktraceoff..(self$.updateValue())
35: drawReactive()
36: force(expr)
37: withVisible(force(expr))
38: withCallingHandlers(expr, error = doCaptureStack)
39: globals$domain$wrapSync(expr)
40: promises::with_promise_domain(createStackTracePromiseDomain(), expr)
41: captureStackTraces({ result <- withVisible(force(expr)) if (promises::is.promising(result$value)) { p <- promise_chain(setVisible(result), ..., catch = catch, finally =
finally) runFinally <- FALSE p } else { result <- Reduce(function(v, func) { if (".visible" %in% names(formals(func))) { withVisible(func(v$val
ue, .visible = v$visible)) } else { withVisible(func(v$value)) } }, list(...), result) setVisible(result) }})
42: doTryCatch(return(expr), name, parentenv, handler)
43: tryCatchOne(expr, names, parentenv, handlers[[1L]])
44: tryCatchList(expr, classes, parentenv, handlers)
45: tryCatch({ captureStackTraces({ result <- withVisible(force(expr)) if (promises::is.promising(result$value)) { p <- promise_chain(setVisible(result), ..., catch = ca
tch, finally = finally) runFinally <- FALSE p } else { result <- Reduce(function(v, func) { if (".visible" %in% names(f
ormals(func))) { withVisible(func(v$value, .visible = v$visible)) } else { withVisible(func(v$value)) } },
list(...), result) setVisible(result) } })}, error = function(e) { if (!is.null(catch)) catch(e) else stop(e)}, finally = if (runFinally && !is.null(finally)) fin
ally())
46: do()
47: hybrid_chain(drawReactive(), function(result) { dims <- getDims() pixelratio <- session$clientData$pixelratio %OR% 1 do.call("resizeSavedPlot", c(list(name, shinysession, result,
dims$width, dims$height, pixelratio, res), args))})
48: origRenderFunc(...)
49: `output$phonePlot`(...)
50: ..stacktraceon..(`output$phonePlot`(...))
51: orig(name = name, shinysession = self)
52: func()
53: withCallingHandlers(expr, error = doCaptureStack)
54: globals$domain$wrapSync(expr)
55: promises::with_promise_domain(createStackTracePromiseDomain(), expr)
56: captureStackTraces(expr)
57: withCallingHandlers(captureStackTraces(expr), error = function(e) { if (inherits(e, "shiny.silent.error")) return() handle <- getOption("shiny.error") if (is.function(handle))
handle()})
58: shinyCallingHandlers(func())
59: force(expr)
60: withVisible(force(expr))
61: withCallingHandlers(expr, error = doCaptureStack)
62: globals$domain$wrapSync(expr)
63: promises::with_promise_domain(createStackTracePromiseDomain(), expr)
64: captureStackTraces({ result <- withVisible(force(expr)) if (promises::is.promising(result$value)) { p <- promise_chain(setVisible(result), ..., catch = catch, finally =
finally) runFinally <- FALSE p } else { result <- Reduce(function(v, func) { if (".visible" %in% names(formals(func))) { withVisible(func(v$val
ue, .visible = v$visible)) } else { withVisible(func(v$value)) } }, list(...), result) setVisible(result) }})
65: doTryCatch(return(expr), name, parentenv, handler)
66: tryCatchOne(expr, names, parentenv, handlers[[1L]])
67: tryCatchList(expr, classes, parentenv, handlers)
68: tryCatch({ captureStackTraces({ result <- withVisible(force(expr)) if (promises::is.promising(result$value)) { p <- promise_chain(setVisible(result), ..., catch = ca
tch, finally = finally) runFinally <- FALSE p } else { result <- Reduce(function(v, func) { if (".visible" %in% names(f
ormals(func))) { withVisible(func(v$value, .visible = v$visible)) } else { withVisible(func(v$value)) } },
list(...), result) setVisible(result) } })}, error = function(e) { if (!is.null(catch)) catch(e) else stop(e)}, finally = if (runFinally && !is.null(finally)) fin
ally())
69: do()
70: hybrid_chain(shinyCallingHandlers(func()), catch = function(cond) { if (inherits(cond, "shiny.custom.error")) { if (isTRUE(getOption("show.error.messages"))) printError(co
nd) structure(list(), class = "try-error", condition = cond) } else if (inherits(cond, "shiny.output.cancel")) { structure(list(), class = "cancel-output") } else if (inhe
rits(cond, "shiny.silent.error")) { structure(list(), class = "try-error", condition = cond) } else { if (isTRUE(getOption("show.error.messages"))) printError(cond)
if (getOption("shiny.sanitize.errors", FALSE)) { cond <- simpleError(paste("An error has occurred. Check your", "logs or contact the app author for", "clarificatio
n.")) } invisible(structure(list(), class = "try-error", condition = cond)) }})
71: force(expr)
72: withVisible(force(expr))
73: withCallingHandlers(expr, error = doCaptureStack)
74: globals$domain$wrapSync(expr)
75: promises::with_promise_domain(createStackTracePromiseDomain(), expr)
76: captureStackTraces({ result <- withVisible(force(expr)) if (promises::is.promising(result$value)) { p <- promise_chain(setVisible(result), ..., catch = catch, finally =
finally) runFinally <- FALSE p } else { result <- Reduce(function(v, func) { if (".visible" %in% names(formals(func))) { withVisible(func(v$val
ue, .visible = v$visible)) } else { withVisible(func(v$value)) } }, list(...), result) setVisible(result) }})
77: doTryCatch(return(expr), name, parentenv, handler)
78: tryCatchOne(expr, names, parentenv, handlers[[1L]])
79: tryCatchList(expr, classes, parentenv, handlers)
80: tryCatch({ captureStackTraces({ result <- withVisible(force(expr)) if (promises::is.promising(result$value)) { p <- promise_chain(setVisible(result), ..., catch = ca
tch, finally = finally) runFinally <- FALSE p } else { result <- Reduce(function(v, func) { if (".visible" %in% names(f
ormals(func))) { withVisible(func(v$value, .visible = v$visible)) } else { withVisible(func(v$value)) } },
list(...), result) setVisible(result) } })}, error = function(e) { if (!is.null(catch)) catch(e) else stop(e)}, finally = if (runFinally && !is.null(finally)) fin
ally())
81: do()
82: hybrid_chain(hybrid_chain(shinyCallingHandlers(func()), catch = function(cond) { if (inherits(cond, "shiny.custom.error")) { if (isTRUE(getOption("show.error.messages")))
printError(cond) structure(list(), class = "try-error", condition = cond) } else if (inherits(cond, "shiny.output.cancel")) { structure(list(), class = "cancel-output") }
else if (inherits(cond, "shiny.silent.error")) { structure(list(), class = "try-error", condition = cond) } else { if (isTRUE(getOption("show.error.messages"))) prin
tError(cond) if (getOption("shiny.sanitize.errors", FALSE)) { cond <- simpleError(paste("An error has occurred. Check your", "logs or contact the app author for",
"clarification.")) } invisible(structure(list(), class = "try-error", condition = cond)) }}), function(value) { self$requestFlush() private$sendMessage(recalculating = list(n
ame = name, status = "recalculated")) if (inherits(value, "cancel-output")) { return() } private$invalidatedOutputErrors$remove(name) private$invalidatedOutputValues$remove(name)
if (inherits(value, "try-error")) { cond <- attr(value, "condition") type <- setdiff(class(cond), c("simpleError", "error", "condition")) private$invalidatedOut
putErrors$set(name, list(message = cond$message, call = utils::capture.output(print(cond$call)), type = if (length(type)) type)) } else private$invalidatedOutputValues$set(name, v
alue)})
83: `<observer:output$phonePlot>`(...)
84: contextFunc()
85: env$runWith(self, func)
86: force(expr)
87: globals$domain$wrapSync(expr)
88: promises::with_promise_domain(createVarPromiseDomain(.globals, "domain", domain), expr)
89: withReactiveDomain(.domain, { env <- .getReactiveEnvironment() .graphEnterContext(id) on.exit(.graphExitContext(id), add = TRUE) env$runWith(self, func)})
90: globals$domain$wrapSync(expr)
91: promises::with_promise_domain(reactivePromiseDomain(), { withReactiveDomain(.domain, { env <- .getReactiveEnvironment() .graphEnterContext(id) on.exit(.graphExitContext(
id), add = TRUE) env$runWith(self, func) })})
92: ctx$run(.func)
93: run()
94: withCallingHandlers(expr, error = doCaptureStack)
95: globals$domain$wrapSync(expr)
96: promises::with_promise_domain(createStackTracePromiseDomain(), expr)
97: captureStackTraces(expr)
98: withCallingHandlers(captureStackTraces(expr), error = function(e) { if (inherits(e, "shiny.silent.error")) return() handle <- getOption("shiny.error") if (is.function(handle))
handle()})
99: shinyCallingHandlers(run())
100: force(expr)
101: withVisible(force(expr))
102: withCallingHandlers(expr, error = doCaptureStack)
103: globals$domain$wrapSync(expr)
104: promises::with_promise_domain(createStackTracePromiseDomain(), expr)
105: captureStackTraces({ result <- withVisible(force(expr)) if (promises::is.promising(result$value)) { p <- promise_chain(setVisible(result), ..., catch = catch, finally
= finally) runFinally <- FALSE p } else { result <- Reduce(function(v, func) { if (".visible" %in% names(formals(func))) { withVisible(func(v$va
lue, .visible = v$visible)) } else { withVisible(func(v$value)) } }, list(...), result) setVisible(result) }})
106: doTryCatch(return(expr), name, parentenv, handler)
107: tryCatchOne(expr, names, parentenv, handlers[[1L]])
108: tryCatchList(expr, classes, parentenv, handlers)
109: tryCatch({ captureStackTraces({ result <- withVisible(force(expr)) if (promises::is.promising(result$value)) { p <- promise_chain(setVisible(result), ..., catch = c
atch, finally = finally) runFinally <- FALSE p } else { result <- Reduce(function(v, func) { if (".visible" %in% names(
formals(func))) { withVisible(func(v$value, .visible = v$visible)) } else { withVisible(func(v$value)) } },
list(...), result) setVisible(result) } })}, error = function(e) { if (!is.null(catch)) catch(e) else stop(e)}, finally = if (runFinally && !is.null(finally)) fi
nally())
110: do()
111: hybrid_chain({ if (!.destroyed) { shinyCallingHandlers(run()) }}, catch = function(e) { if (inherits(e, "shiny.silent.error")) { return() } printError(e) if (!i
s.null(.domain)) { .domain$unhandledError(e) }}, finally = .domain$decrementBusyCount)
112: flushCallback()
113: FUN(X[[i]], ...)
114: lapply(.flushCallbacks, function(flushCallback) { flushCallback()})
115: ctx$executeFlushCallbacks()
116: .getReactiveEnvironment()$flush()
117: flushReact()
118: serviceApp()
119: ..stacktracefloor..(serviceApp())
120: withCallingHandlers(expr, error = doCaptureStack)
121: globals$domain$wrapSync(expr)
122: promises::with_promise_domain(createStackTracePromiseDomain(), expr)
123: captureStackTraces({ while (!.globals$stopped) { ..stacktracefloor..(serviceApp()) Sys.sleep(0.001) }})
124: ..stacktraceoff..(captureStackTraces({ while (!.globals$stopped) { ..stacktracefloor..(serviceApp()) Sys.sleep(0.001) }}))
125: (function (appDir = getwd(), port = getOption("shiny.port"), launch.browser = getOption("shiny.launch.browser", interactive()), host = getOption("shiny.host", "127.0.0.1"), workerId =
"", quiet = FALSE, display.mode = c("auto", "normal", "showcase"), test.mode = getOption("shiny.testmode", FALSE)) { on.exit({ handlerManager$clear() }, add = TRUE) if (.glo
bals$running) { stop("Can't call `runApp()` from within `runApp()`. If your ", "application code contains `runApp()`, please remove it.") } .globals$running <- TRUE on.e
xit({ .globals$running <- FALSE }, add = TRUE) oldOptionSet <- .globals$options on.exit({ .globals$options <- oldOptionSet }, add = TRUE) ops <- options(warn = max(1, g
etOption("warn", default = 1)), pool.scheduler = scheduleTask) on.exit(options(ops), add = TRUE) appParts <- as.shiny.appobj(appDir) appOps <- appParts$options findVal <- functi
on(arg, default) { if (arg %in% names(appOps)) appOps[[arg]] else default } if (missing(port)) port <- findVal("port", port) if (missing(launch.browser))
launch.browser <- findVal("launch.browser", launch.browser) if (missing(host)) host <- findVal("host", host) if (missing(quiet)) quiet <- findVal("quiet", quiet) if
(missing(display.mode)) display.mode <- findVal("display.mode", display.mode) if (missing(test.mode)) test.mode <- findVal("test.mode", test.mode) if (is.null(host) || is.na(
host)) host <- "0.0.0.0" workerId(workerId) if (inShinyServer()) { ver <- Sys.getenv("SHINY_SERVER_VERSION") if (utils::compareVersion(ver, .shinyServerMinVersion) <
0) { warning("Shiny Server v", .shinyServerMinVersion, " or later is required; please upgrade!") } } setShowcaseDefault(0) .globals$testMode <- t
est.mode if (test.mode) { message("Running application in test mode.") } if (is.character(appDir)) { desc <- file.path.ci(if (tolower(tools::file_ext(appDir)) ==
"r") dirname(appDir) else appDir, "DESCRIPTION") if (file.exists(desc)) { con <- file(desc, encoding = checkEncoding(desc)) on.exit(close(con), add =
TRUE) settings <- read.dcf(con) if ("DisplayMode" %in% colnames(settings)) { mode <- settings[1, "DisplayMode"] if (mode == "Showcase") {
setShowcaseDefault(1) if ("IncludeWWW" %in% colnames(settings)) { .globals$IncludeWWW <- as.logical(settings[1, "IncludeWWW"])
if (is.na(.globals$IncludeWWW)) { stop("In your Description file, `IncludeWWW` ", "must be set to `True` (default) or `False`")
} } else { .globals$IncludeWWW <- TRUE } } } } } if (is.null(.globals$Inclu
deWWW) || is.na(.globals$IncludeWWW)) { .globals$IncludeWWW <- TRUE } display.mode <- match.arg(display.mode) if (display.mode == "normal") { setShowcaseDefault(0) } el
se if (display.mode == "showcase") { setShowcaseDefault(1) } require(shiny) if (is.null(port)) { for (i in 1:20) { if (!is.null(.globals$lastPort)) {
port <- .globals$lastPort .globals$lastPort <- NULL } else { while (TRUE) { port <- p_randomInt(3000, 8000) i
f (!port %in% c(3659, 4045, 6000, 6665:6669, 6697)) { break } } } tmp <- try(startServer(host, port, lis
t()), silent = TRUE) if (!inherits(tmp, "try-error")) { stopServer(tmp) .globals$lastPort <- port break } } } on.exit
({ .globals$onStopCallbacks$invoke() .globals$onStopCallbacks <- Callbacks$new() }, add = TRUE) unconsumeAppOptions(appParts$appOptions) if (!is.null(appParts$onStop))
on.exit(appParts$onStop(), add = TRUE) if (!is.null(appParts$onStart)) appParts$onStart() server <- startApp(appParts, port, host, quiet) on.exit({ stopServer(server) }
, add = TRUE) if (!is.character(port)) { browseHost <- if (identical(host, "0.0.0.0")) "127.0.0.1" else host appUrl <- paste("http://", browseHost, ":", port, se
p = "") if (is.function(launch.browser)) launch.browser(appUrl) else if (launch.browser) utils::browseURL(appUrl) } else { appUrl <- NULL }
callAppHook("onAppStart", appUrl) on.exit({ callAppHook("onAppStop", appUrl) }, add = TRUE) .globals$reterror <- NULL .globals$retval <- NULL .globals$stopped <- FALSE ..st
acktraceoff..(captureStackTraces({ while (!.globals$stopped) { ..stacktracefloor..(serviceApp()) Sys.sleep(0.001) } })) if (isTRUE(.globals$reterror)) {
stop(.globals$retval) } else if (.globals$retval$visible) .globals$retval$value else invisible(.globals$retval$value)})(appDir = list(httpHandler = function (req) { if (!id
entical(req$REQUEST_METHOD, "GET")) return(NULL) if (!isTRUE(grepl(uiPattern, req$PATH_INFO))) return(NULL) textConn <- file(open = "w+") on.exit(close(textConn)) showca
seMode <- .globals$showcaseDefault if (.globals$showcaseOverride) { mode <- showcaseModeOfReq(req) if (!is.null(mode)) showcaseMode <- mode } testMode <- .globals
$testMode %OR% FALSE bookmarkStore <- getShinyOption("bookmarkStore", default = "disable") if (bookmarkStore == "disable") { restoreContext <- RestoreContext$new() } else {
restoreContext <- RestoreContext$new(req$QUERY_STRING) } withRestoreContext(restoreContext, { uiValue <- NULL if (is.function(ui)) { if (length(formals(ui)) > 0) {
uiValue <- ..stacktraceon..(ui(req)) } else { uiValue <- ..stacktraceon..(ui()) } } else { if (getCurrentRest
oreContext()$active) { warning("Trying to restore saved app state, but UI code must be a function for this to work! See ?enableBookmarking") } uiValue <- ui
} }) if (is.null(uiValue)) return(NULL) renderPage(uiValue, textConn, showcaseMode, testMode) html <- paste(readLines(textConn, encoding = "UTF-8"), collapse = "\n") retu
rn(httpResponse(200, content = enc2utf8(html)))}, serverFuncSource = function () { server}, onStart = function () { global_r <- file.path.ci(dir, "global.R") if (file.exists(global_r)) {
source(global_r, local = FALSE) } shiny::addResourcePath("rmd_resources", rmarkdown_system_file("rmd/h/rmarkdown"))}, options = list(), appOptions = list(appDir = "/opt/shiny-server/sam
ples/sample-apps/rmd", bookmarkStore = NULL)), port = 37673L, launch.browser = FALSE)
126: do.call(shiny::runApp, shiny_args)
127: rmarkdown::run(file = NULL, dir = Sys.getenv("SHINY_APP"), shiny_args = list(port = port, launch.browser = FALSE), auto_reload = FALSE)
An irrecoverable exception occurred. R is aborting now ...
-su: line 1: 7518 Segmentation fault (core dumped) R --no-save --slave -f \/opt\/shiny-server\/R\/SockJSAdapter\.R
Thank you,
Sara