Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
benben-miao opened this issue Dec 19, 2023 · 6 comments

Comments

@benben-miao
Copy link

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).

@s-u
Copy link
Owner

s-u commented Dec 19, 2023

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.

@benben-miao
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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.

@s-u
Copy link
Owner

s-u commented Dec 19, 2023

  • 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.

@benben-miao
Copy link
Author

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()'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants