Open GRADeS-Gwen opened 2 years ago
@GRADeS-Gwen We would have a look at this next week, hope this is not too late for you. In the meantime, can you build and test from the development branch?
I have en error similar to one I already got in #132 :
Error in library(attempt) : there is no package called 'attempt'
Calls: runApp ... ..stacktraceon.. -> source -> withVisible -> eval -> eval -> library
Execution halted
I corrected by adding this lines to the Dockerfile
:
# install attempt package
RUN Rscript -e 'install.packages("attempt")'
It seem the base image does not contain it : FROM hzibraunschweig/sormas-stats-base:${BRANCH}
I now have some problem to connect to the base, but it seem to be due tu the "&" char in the password. I will correct it.
and nope, still have the database error with a better password (whithout &)
Error in postgresqlNewConnection(drv, ...) : RS-DBI driver: (<a0><a5>:<9a> V)
And I discovered why : a line in global.R
DB_NAME= "sormas"
==>
DB_NAME = "sormas"
if there is no space, the raplace in run-app.sh
will not work.
But still got a error that remember me something :
Error : C stack usage 9016188 is too close to the limit
I think it is linked to the ulimit
@GRADeS-Gwen This may be a RAM limitation, Maybe you can reduce the value for delay to about 20 in global.r and see it it works
I added 8 GB RAM to test, but got the same limit error ... I changed to 90days and it got further with this error :
Error : Problem with `mutate()` column `age`. i `age = floor(as.numeric(round((reportdate - date_of_birth)/365)))`. x / not defined for "Date" objects
any idea ?
@GRADeS-Gwen
I have upgraded my local sormas instance to 1.70.4 and I found no error, so I would suspect that this is caused by not using the right renv.lock file when building the image
Please can you use this file to build the image and let me know if it works? https://github.com/hzi-braunschweig/SORMAS-Stats-next-gen/blob/development/sormas-stats-shinyapp/stats.Dockerfile
The lock file contains all the right packages, so you would need to remove the additional line that you added in the docker file RUN Rscript -e 'install.packages("attempt")'
I suspect line 32 in the base image is not applying the right lock file https://github.com/hzi-braunschweig/SORMAS-Stats-next-gen/blob/development/docker-base/Dockerfile My colleague would have a look at it and let us know.
I used the file "stats.Dockerfile" in the folder "sormas-stats-shinyapp" to build the image. After the long compilation, I started it and saw this error :
sormas-stats_1 | sed: can't read /app/sormas-stats-app/global.R: No such file or directory
sormas-stats_1 | sed: can't read /app/sormas-stats-app/global.R: No such file or directory
sormas-stats_1 | sed: can't read /app/sormas-stats-app/global.R: No such file or directory
sormas-stats_1 | sed: can't read /app/sormas-stats-app/global.R: No such file or directory
sormas-stats_1 | sed: can't read /app/sormas-stats-app/global.R: No such file or directory
So I corrected the "run_app.sh" since the files are not copied in "/app/sormas-stats-app/", but "/app/" and recompiled.
This second attempt got further, but an error again in the logs :
[2022-06-13T13:25:23.335] [INFO] shiny-server - [/app:56] Attaching package: ‘attempt’
[2022-06-13T13:25:23.335] [INFO] shiny-server - [/app:56]
[2022-06-13T13:25:23.336] [INFO] shiny-server - [/app:56] The following objects are masked from ‘package:dplyr’:
[2022-06-13T13:25:23.336] [INFO] shiny-server - [/app:56]
[2022-06-13T13:25:23.336] [INFO] shiny-server - [/app:56] if_all, if_any, if_else
[2022-06-13T13:25:23.336] [INFO] shiny-server - [/app:56]
[2022-06-13T13:25:24.500] [INFO] shiny-server - [/app:56] Warning in rgdal::readOGR(dsn = file.path("./data/shapefiles"), layer = "LGAs_Aug28") :
[2022-06-13T13:25:24.501] [INFO] shiny-server - [/app:56] Dropping null geometries: 773
[2022-06-13T13:25:27.307] [INFO] shiny-server - [/app:56] Warning in OGRSpatialRef(dsn, layer, morphFromESRI = morphFromESRI, dumpSRS = dumpSRS, :
[2022-06-13T13:25:27.308] [INFO] shiny-server - [/app:56] Discarded datum Reseau_Geodesique_Francais_1993 in Proj4 definition: +proj=lcc +lat_0=46.5 +lon_0=3 +lat_1=49 +lat_2=44 +x_0=700000 +y_0=6600000 +ellps=GRS80 +units=m +no_defs
[2022-06-13T13:25:29.177] [INFO] shiny-server - [/app:56] Warning in OGRSpatialRef(dsn, layer, morphFromESRI = morphFromESRI, dumpSRS = dumpSRS, :
[2022-06-13T13:25:29.178] [INFO] shiny-server - [/app:56] Discarded datum Reseau_Geodesique_Francais_1993 in Proj4 definition: +proj=lcc +lat_0=46.5 +lon_0=3 +lat_1=49 +lat_2=44 +x_0=700000 +y_0=6600000 +ellps=GRS80 +units=m +no_defs
[2022-06-13T13:25:31.217] [INFO] shiny-server - [/app:56] Warning in OGRSpatialRef(dsn, layer, morphFromESRI = morphFromESRI, dumpSRS = dumpSRS, :
[2022-06-13T13:25:31.218] [INFO] shiny-server - [/app:56] Discarded datum Reseau_Geodesique_Francais_1993 in Proj4 definition: +proj=lcc +lat_0=46.5 +lon_0=3 +lat_1=49 +lat_2=44 +x_0=700000 +y_0=6600000 +ellps=GRS80 +units=m +no_defs
[2022-06-13T13:25:37.054] [INFO] shiny-server - [/app:56]
[2022-06-13T13:25:37.055] [INFO] shiny-server - [/app:56] Listening on http://127.0.0.1:33385
[2022-06-13T13:25:37.602] [INFO] shiny-server - [/app:56] Warning in min(eventData$n_ep) :
[2022-06-13T13:25:37.602] [INFO] shiny-server - [/app:56] no non-missing arguments to min; returning Inf
[2022-06-13T13:25:37.602] [INFO] shiny-server - [/app:56] Warning in max(eventData$n_ep) :
[2022-06-13T13:25:37.602] [INFO] shiny-server - [/app:56] no non-missing arguments to max; returning -Inf
[2022-06-13T13:25:37.603] [INFO] shiny-server - [/app:56] Warning in min(x, na.rm = na.rm) :
[2022-06-13T13:25:37.603] [INFO] shiny-server - [/app:56] no non-missing arguments to min; returning Inf
[2022-06-13T13:25:37.603] [INFO] shiny-server - [/app:56] Warning in max(x, na.rm = na.rm) :
[2022-06-13T13:25:37.603] [INFO] shiny-server - [/app:56] no non-missing arguments to max; returning -Inf
[2022-06-13T13:25:37.604] [INFO] shiny-server - [/app:56] Warning: In sliderInput(): `value` should be greater than or equal to `min` (value = Inf, -Inf, min = Inf).
[2022-06-13T13:25:37.604] [INFO] shiny-server - [/app:56] Warning: In sliderInput(): `value` should be less than or equal to `max` (value = Inf, -Inf, max = -Inf).
[2022-06-13T13:25:37.630] [INFO] shiny-server - [/app:56] Warning: Navigation containers expect a collection of `bslib::nav()`/`shiny::tabPanel()`s and/or `bslib::nav_menu()`/`shiny::navbarMenu()`s. Consider using `header` or `footer` if you wish to place content above (or below) every panel's contents.
[2022-06-13T13:25:43.644] [INFO] shiny-server - [/app:56]
[2022-06-13T13:25:43.644] [INFO] shiny-server - [/app:56]
[2022-06-13T13:25:43.647] [INFO] shiny-server - [/app:56] Execution halted
[2022-06-13T13:25:43.701] [INFO] shiny-server - [/app:56]
@GRADeS-Gwen I think you were building the image from a different root directory that does not contain the global.r. This is what you can do:
/app/sormas-stats-app/global.R
should probably be /app/sormas-stats-shinyapp/sormas-stats-app/global.R
Bug Description
When starting the docker build from the main branch, I can not access the "/sormas-stats-shinyapp/" (the shiny defautl page in "/" is okay). While checking the logs in the docker, I got theses lines :
Steps to Reproduce
Expected Behavior
Should see Sormas-Stats IHM
System Details