Rserve icon indicating copy to clipboard operation
Rserve copied to clipboard

The system daemon cannot be started in Windows via the Rserve::Rserve() script

Open benben-miao opened this issue 2 years ago • 6 comments

The system daemon cannot be started in Windows via the Rserve::Rserve() script, and trying to install a previous version of 1.8.11 will not work.

Does the author plan to optimize this issue in the next version, or how should I start the daemon in Windows (having added the R.dll directory to the system variable still doesn't work).

benben-miao avatar Dec 19 '23 07:12 benben-miao

Can you provide more details? That include sessionInfo(), versions of R, Rserve and OS, exact commands and full output including any error(s). Also note that the is no daemon on Windows due to the limitations in the Windows OS so you probably didn't mean what you said - hence the need for actual details.

s-u avatar Dec 19 '23 07:12 s-u

Thank you for your prompt reply.

  1. previously installed Rservice-1.8.11 in the Windows R-4.2.2, and then habitually started the Rserve service through R.exe -e'Rserve :: Rserve () '. At this time, my program can call Rserve at any time.

  2. Today I installed Rserve- 1.8.13 in the Windows system R-4.3.2, R.exe -e'Rserve :: Rserve () 'no longer starts the service, I noticed that you mentioned in the new version that only supports unix systems. So I re-go through devtools :: install_version ("Rserve", version = "1.8.11"), but still no longer run the Rserve service.

  3. The new version cannot satisfy my previous efforts to start external Rserve in Windows. I would like your help to see if I can get support for Windows in the new version.

image

benben-miao avatar Dec 19 '23 07:12 benben-miao

Now: R-4.3.1 and Rserve-1.8.13

(base) PS D:\3.CodeProjects\Envs\R-4.3.1\bin> .\R.exe -e 'Rserve::Rserve()'

R version 4.3.1 (2023-06-16 ucrt) -- "Beagle Scouts" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.

Rserve::Rserve() Starting Rserve... "D:\3.CodeProjects\Envs\R-4.3.1\library\Rserve\libs\x64\Rserve.exe"

(base) PS D:\3.CodeProjects\Envs\R-4.3.1\bin>

I NEED: Rserve-1.8.11

(base) PS D:\3.CodeProjects\2.OmicsSuite\OmicsSuite\envs\R-4.2.2\bin> .\R.exe -e 'Rserve::Rserve()'

R version 4.2.2 (2022-10-31 ucrt) -- "Innocent and Trusting" Copyright (C) 2022 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.

Natural language support but running in an English locale

R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.

Rserve::Rserve() Starting Rserve... "D:\3.CodeProjects\2.OmicsSuite\OmicsSuite\envs\R-4.2.2\library\Rserve\libs\x64\Rserve.exe"

(base) PS D:\3.CodeProjects\2.OmicsSuite\OmicsSuite\envs\R-4.2.2\bin> Rserve: Ok, ready to answer queries.

benben-miao avatar Dec 19 '23 07:12 benben-miao

I still want to start Rserve as a daemon in Windows, I tried to add D:\ 3.CodeProjects\ Envs\ R- 4.3.1\ bin\ x64 to the system environment variables, but still can't successfully run Rserve in the background.

I look forward to your support for future versions like R-1.8.11, which is very important to my program, thank you very much.

benben-miao avatar Dec 19 '23 07:12 benben-miao

  • make sure the path to Rserve.exe actually exists - check the output path printed with your actual file location.
  • the main problem with Windows is that you cannot mix different R versions since only the first R on the PATH works, because that is how Windows finds R.dll. So you must make sure the R version you are trying to use is first in the PATH environment variable.

It may be easier to simply run Rserve::run.Rserve() since that works inside the running R session instead of trying to start a separate executable.

s-u avatar Dec 19 '23 11:12 s-u

Thank you very much for your patient help, I solved my above problem by adopting your suggestion to use R -e 'Rserve::run.Rserve()' instead of R -e 'Rserve::Rserve()'.

benben-miao avatar Dec 19 '23 12:12 benben-miao