Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Does not work in Windows: CLI app: solana-test-validator #34793

Closed
sharpe5 opened this issue Jan 16, 2024 · 15 comments · Fixed by anza-xyz/agave#73
Closed

Does not work in Windows: CLI app: solana-test-validator #34793

sharpe5 opened this issue Jan 16, 2024 · 15 comments · Fixed by anza-xyz/agave#73
Labels
community Community contribution

Comments

@sharpe5
Copy link

sharpe5 commented Jan 16, 2024

Problem

I installed Solana on Windows 10 x64 version 10.0.19045 Build 19045.

Ran this:

solana-test-validator

It immediately exited, with no error message or any sort. I tried solana-test-validator --version with the same result. This worked nicely: solana --version.

I then tried it under WSL with Ubuntu 22.04 LTS and it worked perfectly.

Proposed Solution

Fix solana-test-validator to work under Windows, or at the very least, display an error message on running that it does not support Windows. Might want to update the docs as well.

@sharpe5 sharpe5 added the community Community contribution label Jan 16, 2024
@Nagaprasadvr
Copy link
Contributor

Will work on this !

@sharpe5
Copy link
Author

sharpe5 commented Feb 7, 2024

Update: an error message pops up with an "Ok" button: "The code execution cannot proceed because libssl-3-x64.dll was not found. Reinstalling the program may fix this problem."

@sharpe5
Copy link
Author

sharpe5 commented Feb 7, 2024

Update: searched for libssl-3-x64.dll and found a copy that was installed as part of Git for Windows:

I can now run it:

path=%path%;C:\Program Files\Git\mingw64\bin
solana-test-validator

However, it hangs forever at this point:

S:\>solana-test-validator
logrotate is not supported on this platform
Ledger location: test-ledger
Log: test-ledger\validator.log
⠒ Initializing...               

It works nicely under WSL and I can connect to it from Windows.

@Nagaprasadvr
Copy link
Contributor

Nagaprasadvr commented Mar 2, 2024

Manage to run solana-test-validator

image

need to see logs and test it properly

link to logs - https://gist.github.com/Nagaprasadvr/cebdf423562ac0fbfdaa48cedfd2e714

@Nagaprasadvr
Copy link
Contributor

i did the setup

here is the ping status

image

Logs :
image

@Nagaprasadvr
Copy link
Contributor

Heres a solana transfer
image

@Nagaprasadvr
Copy link
Contributor

Nagaprasadvr commented Mar 2, 2024

I guess we have to provide some steps on how to install prerequisites to run solana-test-validator on windows ! it works just fine after installing all prerequisite binaries and setting all the system environment variables !

@Nagaprasadvr
Copy link
Contributor

Nagaprasadvr commented Mar 2, 2024

Pre-requisite dlls and binaries

Binaries -

  1. Protoc - https://github.com/protocolbuffers/protobuf/releases/download/v25.3/protoc-25.3-win64.zip
  2. OpenSSL-Winx64 - https://slproweb.com/download/Win64OpenSSL-3_2_1.exe

Dlls -

  1. libssl - https://www.dllme.com/dll/files/libssl-3-x64
  2. libcrypto - https://www.dllme.com/dll/files/libcrypto-3-x64
  3. libclang - https://www.dllme.com/dll/files/libclang
  4. clang - https://www.dllme.com/dll/files/clang

After downloading

  1. Binaries , I executed them and placed them in C:\Program FIles\ dir
  2. Dlls - i placed them in C:\Windows\System32\ dir

System Environment variables

OPENSSL_INCLUDE_DIR=C:\Program Files\OpenSSL-Win64\include
OPENSSL_LIB=C:\Program Files\OpenSSL-Win64\lib
OPENSSL_LIB_DIR=C:\Program Files\OpenSSL-Win64\lib\VC\x64\MT
PROTOC=C:\Program Files\protoc\bin\protoc
LIBCLANG_PATH=C:\Windows\System32\libclang.dll
PATH=C:\Program Files\OpenSSL-Win64\bin

@Nagaprasadvr
Copy link
Contributor

@sharpe5 let me know if this works for you

@sharpe5
Copy link
Author

sharpe5 commented Mar 2, 2024 via email

@AnonVee1
Copy link

AnonVee1 commented Mar 2, 2024

libclang - https://www.dllme.com/dll/files/libclang/
This does not exist.

@Nagaprasadvr
Copy link
Contributor

Nagaprasadvr commented Mar 3, 2024

libclang - https://www.dllme.com/dll/files/libclang This does not exist.

My bad , updated the link

@Nagaprasadvr
Copy link
Contributor

Nice work! Now that you have proven it is possible, it opens the way to fix the Windows installer. Please note that I got it working under Windows by using WSL. I ran it, found the IP address of WSL under windows, then connected using native Windows binaries and everything worked well on testnet such as adding to balance, check epoch, etc.

On Sat, 2 Mar 2024, 10:23 Nagaprasad V R, @.> wrote: Pre-requisite dlls and binaries Binaries - 1. Protoc - https://github.com/protocolbuffers/protobuf/releases/download/v25.3/protoc-25.3-win64.zip 2. OpenSSL-Winx64 - https://slproweb.com/download/Win64OpenSSL-3_2_1.exe Dlls - 1. libssl - https://www.dllme.com/dll/files/libssl-3-x64 2. libcrypto - https://www.dllme.com/dll/files/libcrypto-3-x64 3. libclang - https://www.dllme.com/dll/files/libclang/ 4. clang - https://www.dllme.com/dll/files/clang After downloading 1. Binaries , I executed them and placed them in C:\Program FIles\ dir 2. Dlls - i placed them in C:\Windows\System32\ dir System Environment variables — Reply to this email directly, view it on GitHub <#34793 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ3FJDZ2ATB5MID233NF3DYWGSBDAVCNFSM6AAAAABB4UE2YGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNZUG42TMNBVGE . You are receiving this because you authored the thread.Message ID: @.>

Have u tried testing without wsl , just the cmd ? Setting up all prerequisites and then launching solana testnet validator and executing some txs

@AnonVee1
Copy link

AnonVee1 commented Mar 3, 2024

libclang - https://www.dllme.com/dll/files/libclang/ This does not exist.

My bad , updated the link

I don't think you have updated it

@Nagaprasadvr
Copy link
Contributor

Nagaprasadvr commented Mar 3, 2024

Pre-requisite dlls and binaries

Binaries -

  1. Protoc - https://github.com/protocolbuffers/protobuf/releases/download/v25.3/protoc-25.3-win64.zip
  2. OpenSSL-Winx64 - https://slproweb.com/download/Win64OpenSSL-3_2_1.exe

Dlls -

  1. libssl - https://www.dllme.com/dll/files/libssl-3-x64
  2. libcrypto - https://www.dllme.com/dll/files/libcrypto-3-x64
  3. libclang - https://www.dllme.com/dll/files/libclang
  4. clang - https://www.dllme.com/dll/files/clang

After downloading

  1. Binaries , I executed them and placed them in C:\Program FIles\ dir
  2. Dlls - i placed them in C:\Windows\System32\ dir

System Environment variables

OPENSSL_INCLUDE_DIR=C:\Program Files\OpenSSL-Win64\include OPENSSL_LIB=C:\Program Files\OpenSSL-Win64\lib OPENSSL_LIB_DIR=C:\Program Files\OpenSSL-Win64\lib\VC\x64\MT PROTOC=C:\Program Files\protoc\bin\protoc LIBCLANG_PATH=C:\Windows\System32\libclang.dll PATH=C:\Program Files\OpenSSL-Win64\bin

I have updated here .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community Community contribution
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants