Giter Club home page Giter Club logo

Comments (5)

dmjio avatar dmjio commented on June 18, 2024

Update: so after some testing I was able to make RPC calls into a linux box from windows w/ acid-state using cygwin. Pretty cool if you ask me.

The remote examples w/ acid-state work ootb, but, something about the acid-state-tls examples don't seem to be working. The tls examples, when using RPC from linux-to-linux work, but windows-to-linux hangs. I know for a fact that it is actually connecting. When I kill the local process on windows I get a acidServerTLS: shutdownClose on the server.

With debugging on the following is printed to the windows client stdout when the server is killed.

Administrator@WIN-M0A8MI62KNT /cygdrive/c/Users/Administrator/Desktop/directory
$ dist/dist-sandbox-9589282d/build/worker/worker.exe
actorThread: waiting for something to do.
listener: listening for Response.
listener: ccGetSome
Initializing client
actor: begin.
actor: end.
actorThread: sending command.
handleReconnect begin.
actorThread: sent.
actorThread: waiting for something to do.
worker.exe: user error (Pattern match failure in do expression at src\Data\Acid\Remote.hs:505:20-30)
worker.exe: thread blocked indefinitely in an MVar operation

It's 505 instead of 507 because I turned on debugging.

debugStrLn :: String -> IO ()
debugStrLn = putStrLn

from acid-state.

lemmih avatar lemmih commented on June 18, 2024

Hm, it might be getting ConnectionError instead of Result, then.

from acid-state.

dmjio avatar dmjio commented on June 18, 2024

Yea, I think that's what's happening. Think it has to do with the fact that I'm using a 32-bit version of openssl on Windows and a 64-bit version on ubuntu. The OpenSSL 32-bit libs on Windows install fine w/ HsOpenSSL, not so much the 64-bit ones.

from acid-state.

dmjio avatar dmjio commented on June 18, 2024

Think I've narrowed it down a little. acidStateTLS server doesn't work w/ or w/o authentication. Pretty sure this has to do w/ the 64-bit lib issue mentioned above. There is currently no 64-bit haskell-platform for Windows, even though there is a 64-bit version of ghc for Windows. Building that out is one option I guess.

The real strange part is that openRemoteState works, but only when run in ghci... When compiled and called it simply hangs. The compilation options I have are -threaded -Wall -rtsopts -fwarn-tabs -funbox-strict-fields -O2 -fno-warn-orphans -fno-warn-unused-do-bind which work fine on unix. Even when I try compiling w/ no flags it still hangs. Not sure what ghci is doing differently. Any ideas why ghci would allow the connection to be established and others like runghc runhaskellnot so much?

Part of me wonders if when I compile for windows the shared secret is somehow changed. Don't know why else it wouldn't be transmitting data. Note: it is connecting, just no queries / updates can be made.

from acid-state.

dmjio avatar dmjio commented on June 18, 2024

Alright, figured out the remote (non-tls) part. Turns out it was connecting fine. Cygwin terminal doesn't print to stdout properly like the windows command prompt does. I had a threadDelay of 2 seconds running in an infinite loop reading messages off a queue. The behavior was correct, but the cygwin terminal wasn't displaying queue notifications. Windows cmd prompt did just fine (odd?). Still working on getting the 64-bit ssl libs to compile on windows.

from acid-state.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.