Open-EO / openeo-r-client

R client package for working with openEO backends
https://open-eo.github.io/openeo-r-client
Apache License 2.0
61 stars 17 forks source link

connection problem to openeocubes container #134

Closed edzer closed 2 years ago

edzer commented 2 years ago

I was testing https://hub.docker.com/r/brianpondi/openeocubes - it runs remotely, but not locally; when the container runs locally, I run

docker run -p 8000:8000  --rm brianpondi/openeocubes

in one terminal, in another R:

> library(openeo)

Attaching package: ‘openeo’

The following objects are masked from ‘package:base’:

    capabilities, debug

> con = connect("http://0.0.0.0:8000")
$ operator is invalid for atomic vectorsInvalid openEO host stated. Please use an URL pointing to a valid openEO web service implementation.
Warning message:
In value[[3L]](cond) : HTTP 500 Internal Server Error.
• SERVER-ERROR: object 'errors' not found
> sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 22.04.1 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_GB.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_GB.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_GB.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_GB.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] openeo_1.2.1  remotes_2.4.2

loaded via a namespace (and not attached):
 [1] magrittr_2.0.3    rappdirs_0.3.3    R6_2.5.1          rlang_1.0.6      
 [5] fastmap_1.1.0     fansi_1.0.3       httr2_0.2.2       tools_4.2.1      
 [9] pkgbuild_1.3.1    utf8_1.2.2        cli_3.4.0.9000    withr_2.5.0      
[13] htmltools_0.5.3   rprojroot_2.0.3   digest_0.6.29     lifecycle_1.0.2  
[17] crayon_1.5.1      processx_3.7.0    IRdisplay_1.1     callr_3.7.1      
[21] repr_1.1.4        vctrs_0.4.1       base64enc_0.1-3   ps_1.7.1         
[25] curl_4.3.2        glue_1.6.2        pillar_1.8.1      compiler_4.2.1   
[29] generics_0.1.3    prettyunits_1.1.1 jsonlite_1.8.0    lubridate_1.8.0  
> 
edzer commented 2 years ago

Also:

> con = connect("http://127.0.0.1:8000")
$ operator is invalid for atomic vectorsInvalid openEO host stated. Please use an URL pointing to a valid openEO web service implementation.
Warning message:
In value[[3L]](cond) : HTTP 500 Internal Server Error.
• SERVER-ERROR: object 'errors' not found
flahn commented 2 years ago

I remember having problems with plumbeR in this regard. I could not use multiple endpoints at one service. Ideally you would have "http://127.0.0.1:8000" handle the service capabilities and then you have other endpoints like /processes, /jobs and so. And if I recall correctly, then I needed to end the capabilities query with /. But I need to run the container first to check, then I will report back.

flahn commented 2 years ago

See https://github.com/Open-EO/openeo-r-backend/issues/17 for more

edzer commented 2 years ago

But the same container works on the AWS instance, right?

edzer commented 2 years ago

... and with the R client in version 1.1-0!

flahn commented 2 years ago

I found out that there was an issue with the capabilities request, which not only affected the openeocubes container, but also openeo.cloud. However, on the latter it did not result in an error. The fix for this was already contained in Matthias' PR.