Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

recently plan(multisession) fails, workers failed to connect

Chiusa
#837 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
r

Direzione di ricerca

Start by reproducing plan(multisession, workers = 20) on Windows with the attached working and non-working renv.lock files. Compare the future, parallelly, R, and renv versions shown in the session information and inspect the worker connection failure. Done means the regression is explained and multisession connects successfully in the affected environment.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

Describe the bug

I have this problem across multiple machines and multiple projects.

I am using renv to handle the package environment. When updating to the newest package versions with renv::update() the multisession plan fails.

> plan(multisession, workers = 20)
Error:
! Cluster setup failed (connectTimeout=125.0 seconds). 19 of 20 workers failed to connect.
     ▆
  1. ├─source("myscript.R", echo = TRUE) at [myscript.R:1:1](vscode-file://vscode-app/c:/Program%20Files/Positron/resources/app/out/vs/code/electron-browser/workbench/workbench.html#)
  2. │ └─base (local) original_source(...)
  3. │   ├─base::withVisible(eval(ei, envir))
  4. │   └─base::eval(ei, envir)
  5. │     └─base::eval(ei, envir)
  6. ├─future::plan(multisession, workers = 20) at [myscript.R:2270:1](vscode-file://vscode-app/c:/Program%20Files/Positron/resources/app/out/vs/code/electron-browser/workbench/workbench.html#)
  7. │ └─future (local) plan_set(...)
  8. │   └─future:::plan_init(stack[[1]], debug = debug)
  9. │     └─future:::makeFutureBackend(evaluator, debug = debug)
 10. │       └─base::do.call(factory, args = args, envir = envir)
 11. └─future (local) `<fn>`(workers = 20)
 12.   └─future::ClusterFutureBackend(...)
 13.     └─clusterRegistry$startCluster(...)
 14.       └─future (local) makeCluster(workers, ...)
 15.         ├─base::do.call(makeClusterPSOCK, args = args, quote = TRUE)
 16.         └─parallelly (local) `<fn>`(base::quote(20L), rscript_libs = base::quote(`<chr>`))

When rolling back to the previous snapshot with renv::restore() the same line of code starts working again.

Reproduce example

For reproducibility I attached the working and non-working renv.lock files as txt-files

renv.lock_not-working.txt
renv.lock_working.txt

Expected behavior

plan(multisession, workers = 20) should execute without error.

Session information

Here is the info for the non-working environment

> sessionInfo()
R version 4.6.1 (2026-06-24 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 26200)

Matrix products: default
  LAPACK version 3.12.1

locale:
[1] LC_COLLATE=German_Germany.utf8  LC_CTYPE=German_Germany.utf8    LC_MONETARY=German_Germany.utf8 LC_NUMERIC=C                    LC_TIME=German_Germany.utf8    

time zone: Europe/Berlin
tzcode source: internal

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

other attached packages:
 [1] furrr_0.4.0        future_1.76.0      conflicted_1.2.0   htmltools_0.5.9    ST.toolbox.R_1.7.1 ssh_0.9.4          readxl_1.5.0.1     haven_2.5.5        rmapshaper_0.6.1   sf_1.1-3           pointblank_0.12.4  modules_0.13.0     tictoc_1.2.1       RPostgres_1.4.10  
[15] DBI_1.3.0          glue_1.8.1         lubridate_1.9.5    forcats_1.0.1      stringr_1.6.0      dplyr_1.2.1        purrr_1.2.2        readr_2.2.0        tidyr_1.3.2        tibble_3.3.1       ggplot2_4.0.3      tidyverse_2.0.0    here_1.0.2        

loaded via a namespace (and not attached):
  [1] RColorBrewer_1.1-3  sys_3.4.3           rstudioapi_0.19.0   jsonlite_2.0.0      wk_0.9.5            magrittr_2.0.5      farver_2.1.2        rmarkdown_2.32      vctrs_0.7.3         memoise_2.0.1       askpass_1.2.1       base64enc_0.1-6     terra_1.9-50        janitor_2.2.1      
 [15] leafsync_0.1.0      curl_8.0.0          raster_3.6-32       cellranger_1.1.0    s2_1.1.12           parallelly_1.48.0   KernSmooth_2.23-26  htmlwidgets_1.6.4   cachem_1.1.0        stars_0.7-3         igraph_2.3.3        lifecycle_1.0.5     pkgconfig_2.0.3     cols4all_0.10      
 [29] R6_2.6.1            fastmap_1.2.0       snakecase_0.11.1    digest_0.6.39       colorspace_2.1-3    rprojroot_2.1.1     leafem_0.2.5        textshaping_1.0.5   crosstalk_1.2.2     lwgeom_0.2-17       progressr_1.0.0     spacesXYZ_1.6-0     timechange_0.4.0    abind_1.4-8        
 [43] compiler_4.6.1      proxy_0.4-29        bit64_4.8.6         withr_3.0.3         S7_0.2.2            logger_0.4.3        maptiles_0.12.0     openssl_2.4.2       tmaptools_3.3       leaflet_2.2.3       classInt_0.4-11     tools_4.6.1         units_1.0-1         otel_0.2.0         
 [57] reactable_0.4.5     tmap_4.4-1          leaflegend_1.3.0    zip_3.0.2           future.apply_1.20.2 grid_4.6.1          generics_0.1.4      gtable_0.3.6        tzdb_0.5.0          class_7.3-23        data.table_1.18.6.1 hms_1.1.4           sp_2.2-3            xml2_1.6.0         
 [71] pillar_1.11.1       vroom_1.7.1         lattice_0.22-9      renv_1.2.4          bit_4.6.0           tidyselect_1.2.1    knitr_1.52          V8_8.2.0            svglite_2.2.2       xfun_0.61           credentials_2.0.3   stringi_1.8.9       geojsonsf_2.0.5     yaml_2.3.12        
 [85] kableExtra_1.4.1    evaluate_1.0.5      codetools_0.2-20    cli_3.6.6           blastula_0.3.6      systemfonts_1.3.2   Rcpp_1.1.2          globals_0.19.1      dbplyr_2.6.0        png_0.1-9           XML_3.99-0.25       parallel_4.6.1      blob_1.3.0          listenv_1.0.0      
 [99] viridisLite_0.4.3   scales_1.4.0        e1071_1.7-17        crayon_1.5.3        openxlsx_4.2.9      rlang_1.3.0        



> future:futureSessionInfo()
*** Package versions
future 1.76.0, parallelly 1.48.0, parallel 4.6.1, globals 0.19.1, listenv 1.0.0

*** Allocations
availableCores():
           system /proc/self/status 
               32                32 
availableWorkers():
$system
 [1] "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost"
[24] "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost"


*** Settings
- future.plan=<not set>
- future.fork.multithreading.enable=<not set>
- future.globals.maxSize=<not set>
- future.globals.onReference=<not set>
- future.resolve.recursive=<not set>
- future.rng.onMisuse=<not set>
- future.wait.timeout=<not set>
- future.wait.interval=<not set>
- future.wait.alpha=<not set>
- future.startup.script=<not set>

*** Backends
Error:
! Cluster setup failed (connectTimeout=125.0 seconds). 20 of 20 workers failed to connect.

     ▆
  1. ├─future::futureSessionInfo()
  2. │ ├─future:::msgf("Number of workers: %d\n", nbrOfWorkers())
  3. │ │ ├─base::message(sprintf(fmt, ...), appendLF = appendLF, domain = domain)
  4. │ │ └─base::sprintf(fmt, ...)
  5. │ ├─future::nbrOfWorkers()
  6. │ └─future:::nbrOfWorkers.NULL()
  7. │   └─future::plan("backend")
  8. │     └─future:::plan_init(strategy, debug = debug)
  9. │       └─future:::makeFutureBackend(evaluator, debug = debug)
 10. │         └─base::do.call(factory, args = args, envir = envir)
 11. └─future (local) `<fn>`(workers = 20)
 12.   └─future::ClusterFutureBackend(...)
 13.     └─clusterRegistry$startCluster(...)
 14.       └─future (local) makeCluster(workers, ...)
 15.         ├─base::do.call(makeClusterPSOCK, args = args, quote = TRUE)
 16.         └─parallelly (local) `<fn>`(base::quote(20L), rscript_libs = base::quote(`<chr>`))

and here for the working environment:

> sessionInfo()
R version 4.6.0 (2026-04-24 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 26200)

Matrix products: default
  LAPACK version 3.12.1

locale:
[1] LC_COLLATE=German_Germany.utf8  LC_CTYPE=German_Germany.utf8    LC_MONETARY=German_Germany.utf8 LC_NUMERIC=C                    LC_TIME=German_Germany.utf8    

time zone: Europe/Berlin
tzcode source: internal

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

other attached packages:
 [1] furrr_0.4.0        future_1.70.0      conflicted_1.2.0   htmltools_0.5.9    ST.toolbox.R_1.7.1 ssh_0.9.4          readxl_1.5.0       haven_2.5.5        rmapshaper_0.6.1   sf_1.1-1           pointblank_0.12.3  modules_0.13.0     tictoc_1.2.1       RPostgres_1.4.10  
[15] DBI_1.3.0          glue_1.8.1         lubridate_1.9.5    forcats_1.0.1      stringr_1.6.0      dplyr_1.2.1        purrr_1.2.2        readr_2.2.0        tidyr_1.3.2        tibble_3.3.1       ggplot2_4.0.3      tidyverse_2.0.0    here_1.0.2        

loaded via a namespace (and not attached):
  [1] RColorBrewer_1.1-3  sys_3.4.3           rstudioapi_0.18.0   jsonlite_2.0.0      wk_0.9.5            magrittr_2.0.5      farver_2.1.2        rmarkdown_2.31      vctrs_0.7.3         memoise_2.0.1       askpass_1.2.1       base64enc_0.1-6     terra_1.9-27        janitor_2.2.1      
 [15] leafsync_0.1.0      curl_7.1.0          raster_3.6-32       cellranger_1.1.0    s2_1.1.11           parallelly_1.47.0   KernSmooth_2.23-26  htmlwidgets_1.6.4   cachem_1.1.0        stars_0.7-2         igraph_2.3.2        lifecycle_1.0.5     pkgconfig_2.0.3     cols4all_0.10      
 [29] R6_2.6.1            fastmap_1.2.0       snakecase_0.11.1    digest_0.6.39       colorspace_2.1-2    rprojroot_2.1.1     leafem_0.2.5        textshaping_1.0.5   crosstalk_1.2.2     lwgeom_0.2-16       progressr_0.19.0    spacesXYZ_1.6-0     timechange_0.4.0    abind_1.4-8        
 [43] compiler_4.6.0      proxy_0.4-29        bit64_4.8.2         withr_3.0.2         S7_0.2.2            logger_0.4.2        maptiles_0.11.0     openssl_2.4.2       tmaptools_3.3       leaflet_2.2.3       classInt_0.4-11     tools_4.6.0         units_1.0-1         otel_0.2.0         
 [57] reactable_0.4.5     tmap_4.3            leaflegend_1.2.8    zip_2.3.3           future.apply_1.20.2 grid_4.6.0          generics_0.1.4      gtable_0.3.6        tzdb_0.5.0          class_7.3-23        data.table_1.18.4   hms_1.1.4           sp_2.2-1            xml2_1.5.2         
 [71] pillar_1.11.1       vroom_1.7.1         lattice_0.22-9      renv_1.2.3          bit_4.6.0           tidyselect_1.2.1    knitr_1.51          V8_8.2.0            svglite_2.2.2       xfun_0.58           credentials_2.0.3   stringi_1.8.7       geojsonsf_2.0.5     yaml_2.3.12        
 [85] kableExtra_1.4.0    evaluate_1.0.5      codetools_0.2-20    cli_3.6.6           blastula_0.3.6      systemfonts_1.3.2   Rcpp_1.1.1-1.1      globals_0.19.1      dbplyr_2.5.2        png_0.1-9           XML_3.99-0.23       parallel_4.6.0      blob_1.3.0          listenv_0.10.1   


> future::futureSessionInfo()
*** Package versions
future 1.70.0, parallelly 1.47.0, parallel 4.6.0, globals 0.19.1, listenv 0.10.1

*** Allocations
availableCores():
           system /proc/self/status 
               32                32 
availableWorkers():
$system
 [1] "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost"
[24] "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost" "localhost"


*** Settings
- future.plan=<not set>
- future.fork.multithreading.enable=<not set>
- future.globals.maxSize=<not set>
- future.globals.onReference=<not set>
- future.resolve.recursive=<not set>
- future.rng.onMisuse=‘ignore’
- future.wait.timeout=<not set>
- future.wait.interval=<not set>
- future.wait.alpha=<not set>
- future.startup.script=<not set>

*** Backends
Number of workers: 20
List of future strategies:
1. multisession:
   - args: function (..., workers = 20)
   - tweaked: TRUE
   - call: plan(multisession, workers = 20)

*** Basic tests
Main R session details:
    pid     r sysname release     version nodename machine   login    user effective_user udomain
1 13632 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
Worker R session details:
   worker   pid     r sysname release     version nodename machine   login    user effective_user udomain
1       1 26532 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
2       2 25200 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
3       3  9168 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
4       4 26856 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
5       5  6352 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
6       6 12536 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
7       7  9972 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
8       8  5388 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
9       9 26240 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
10     10 26720 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
11     11 27644 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
12     12 26732 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
13     13 27256 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
14     14  7636 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
15     15 20104 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
16     16 19148 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
17     17 26908 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
18     18 23308 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
19     19 15648 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
20     20 26928 4.6.0 Windows  10 x64 build 26200  host001  x86-64 user001 user001        user001      ST
Number of unique worker PIDs: 20 (as expected)

Lingua principale
R
Stelle
1k
Fork
93
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di futureverse/future

Tutte le issue di futureverse/future

Issue simili

Altre issue su R

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.