Comments (12)
Are you sure you're in the top-level source code directory? There's certainly a server
target in the Makefile
:
https://github.com/talex5/cuekeeper/blob/master/Makefile#L52
from cuekeeper.
You were correct, I was not at the top level, But now I get the following:
Generating server key...
[ -d server/conf] || mkdir -p server/conf
/bin/sh: line 0: [: missing `]'
openssl genpkey -out server/conf/server.key -outform PEM -algorithm RSA -pkeyopt rsa_keygen_bits:4096
.....++
...++
>>> Generating server X.509 certificate.
>>> Enter the server's full hostname as the 'Common Name' (e.g. cuekeeper.mynet).
>>> Everything else can be left blank.
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) []:
State or Province Name (full name) []:
Locality Name (eg, city) []:
Organization Name (eg, company) []:
Organizational Unit Name (eg, section) []:
Common Name (eg, fully qualified host name) []:localhost
Email Address []:
rm -rf _build/static
mkdir _build/static
mkdir: _build: No such file or directory
make: *** [server] Error 1
from cuekeeper.
Could you try changing the mkdir
to mkdir -p
? I guess -p
is the default on Linux, because it works there.
from cuekeeper.
I continue the fight 😁. My guess is this is macOS specifics, and folks on Linux don't have to do this (otherwise, it would be in the README). I am on the latest Catalina build.
Anyway, I was made to install A LOT of opam
packages:
opam install js_of_ocaml-compiler
opam install cohttp cohttp-lwt cohttp-lwt-jsoo irmin
opam install irmin-indexeddb js_of_ocaml-tyxml omd react
opam install sexplib tar uuidm
Then, I was told to run:
dune external-lib-deps --missing --profile release ./js/client.bc.js
Then I finally tried make server
, and now am presented with the following:
None-C02VV5SWHTD6:cuekeeper-master bcohen$ make server
rm -rf _build/static
mkdir -p _build/static
cp -r resources _build/static/
dune build --profile=release ./js/client.bc.js
File "lib/dune", line 15, characters 7-19:
15 | (run ocaml-crunch init -o ck_init.ml -m plain)))
^^^^^^^^^^^^
Error: Program ocaml-crunch not found in the tree or in PATH
(context: default)
File "lib/ck_utils.ml", line 70, characters 2-30:
70 | ReactiveData.RList.make_from init changes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: Unbound value ReactiveData.RList.make_from
make: *** [server] Error 1
None-C02VV5SWHTD6:cuekeeper-master bcohen
from cuekeeper.
Ah, right - you need to follow the instructions for building the client first Building (without Docker). That should get you those dependencies.
from cuekeeper.
Created the client successfully.
But for the server, I think we are almost there:
make server
rm -rf _build/static
mkdir -p _build/static
cp -r resources _build/static/
dune build --profile=release ./js/client.bc.js
cp _build/default/js/client.bc.js _build/static/resources/js/cuekeeper.js
sed 's!_build/default/js/client.bc.js!resources/js/cuekeeper.js!;s!var ck_use_server=false;!var ck_use_server=true;!' test.html > _build/static/index.html
ocaml-crunch _build/static -e html -e js -e css -e ico -o server/static.ml -m plain
Generating server/static.ml
Skipping generation of .mli
(cd server && mirage configure -t unix && make depend && make)
/bin/sh: mirage: command not found
make: *** [server] Error 127
from cuekeeper.
Mirage should have been installed by the opam pin mirage 3.7.3
command just before the make server
one (https://github.com/talex5/cuekeeper#running-a-server). Try running that again...
from cuekeeper.
OK, server is built!
But, I am now getting this when trying to access https://localhost:8443
, I am using Chrome.
./server/cuekeeper
2020-05-04 07:27:37 -04:00: INF [tcpip-stack-socket] Manager: connect
2020-05-04 07:27:37 -04:00: INF [tcpip-stack-socket] Manager: configuring
2020-05-04 07:27:38 -04:00: INF [unikernel] Connection from 127.0.0.1 (client port 57911)
2020-05-04 07:27:38 -04:00: WRN [tcpip-stack-socket] error Mirage_crypto_rng__Boot.Unseeded_generator in callback
2020-05-04 07:27:38 -04:00: INF [unikernel] Connection from 127.0.0.1 (client port 57912)
2020-05-04 07:27:38 -04:00: WRN [tcpip-stack-socket] error Mirage_crypto_rng__Boot.Unseeded_generator in callback
from cuekeeper.
OK, I think it's fixed now! The new version of tls used a different random number generator, which needed separate initialisation. The latest version should work (you might need to delete the old server/_build
directory before make server
:
git pull origin master
rm -rf server/_build
make server
Thanks for testing this!
from cuekeeper.
Yes, server can start!
I went into Mac Keychain Access, added the server.pem, and gave localhost "Always Trust" permissions. And I had used the pwgen and she256 to generate:
U9kNFPK2G9OX5p9jCPhiaeNIY5ZEOjtV
774400f3384a6f37cc2bc54b2fd0280193b613a5bc401c0e54fd17fe4ec19572
I added the SHA256 to my devices.ml as instructed.
So when I hit https://localhost:8443, accept the inseure cert, and am prompted for the token, I enterU9kNFPK2G9OX5p9jCPhiaeNIY5ZEOjtV
, and the server log says:
TLS failed: CERTIFICATE_UNKNOWN
2020-05-04 10:11:10 -04:00: INF [unikernel] Connection from 127.0.0.1 (client port 65092)
2020-05-04 10:11:10 -04:00: INF [cuekeeper] 1: GET //localhost:8443/resources/js/vendor/FileSaver.min.js
2020-05-04 10:11:10 -04:00: INF [cuekeeper] 2: GET //localhost:8443/resources/css/foundation.css
2020-05-04 10:11:10 -04:00: WRN [unikernel] TLS failed: CERTIFICATE_UNKNOWN
2020-05-04 10:11:10 -04:00: INF [cuekeeper] 1: GET //localhost:8443/resources/js/vendor/pikaday.js
2020-05-04 10:11:10 -04:00: INF [cuekeeper] 3: GET //localhost:8443/resources/js/cuekeeper.js
2020-05-04 10:11:17 -04:00: INF [cuekeeper] 3: GET //localhost:8443/fetch?token=U9kNFPK2G9OX5p9jCPhiaeNIY5ZEOjtV
2020-05-04 10:11:17 -04:00: WRN [unikernel] Invalid access token used (hash = "f347a1efae17e2ad9f918729e4afa2d23d7d00904045f11c8c7cf7b7a803a4db")
For reference:
None-C02VV5SWHTD6:server bcohen$ pwgen -s 32 1
U9kNFPK2G9OX5p9jCPhiaeNIY5ZEOjtV
None-C02VV5SWHTD6:server bcohen$ echo -n dtXZ7fQfX52VsnJNk22J6uKy8JSn6klb | sha256sum
774400f3384a6f37cc2bc54b2fd0280193b613a5bc401c0e54fd17fe4ec19572 -
None-C02VV5SWHTD6:cuekeeper bcohen$ make server
Generating server key...
[ -d server/conf] || mkdir -p server/conf
/bin/sh: line 0: [: missing `]'
openssl genpkey -out server/conf/server.key -outform PEM -algorithm RSA -pkeyopt rsa_keygen_bits:4096
........................................................................................................................................................................................++
....++
>>> Generating server X.509 certificate.
>>> Enter the server's full hostname as the 'Common Name' (e.g. cuekeeper.mynet).
>>> Everything else can be left blank.
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) []:
State or Province Name (full name) []:
Locality Name (eg, city) []:
Organization Name (eg, company) []:
Organizational Unit Name (eg, section) []:
Common Name (eg, fully qualified host name) []:localhost
Email Address []:
rm -rf _build/static
mkdir -p _build/static
cp -r resources _build/static/
dune build --profile=release ./js/client.bc.js
cp _build/default/js/client.bc.js _build/static/resources/js/cuekeeper.js
sed 's!_build/default/js/client.bc.js!resources/js/cuekeeper.js!;s!var ck_use_server=false;!var ck_use_server=true;!' test.html > _build/static/index.html
ocaml-crunch _build/static -e html -e js -e css -e ico -o server/static.ml -m plain
Generating server/static.ml
Skipping generation of .mli
(cd server && mirage configure -t unix && make depend && make)
opam pin add -k path --no-action --yes mirage-unikernel-cuekeeper-unix . && opam depext --yes --update mirage-unikernel-cuekeeper-unix ; opam pin remove --no-action mirage-unikernel-cuekeeper-unix
Package mirage-unikernel-cuekeeper-unix does not exist, create as a NEW package? [Y/n] y
[mirage-unikernel-cuekeeper-unix.~dev] synchronised from file:///Users/bcohen/dev/cuekeeper/server
[WARNING] Failed checks on mirage-unikernel-cuekeeper-unix package definition from source at file:///Users/bcohen/dev/cuekeeper/server:
warning 37: Missing field 'dev-repo'
warning 49: The following URLs don't use version control but look like version control URLs: "https://github.com/talex5/cuekeeper.git#master"
mirage-unikernel-cuekeeper-unix is now pinned to file:///Users/bcohen/dev/cuekeeper/server (version ~dev)
# Detecting depexts using vars: arch=x86_64, os=macos, os-distribution=homebrew, os-family=homebrew
# The following system packages are needed:
gmp
pkg-config
# All required OS packages found.
Ok, mirage-unikernel-cuekeeper-unix is no longer pinned to file:///Users/bcohen/dev/cuekeeper/server (version ~dev)
opam install -y --deps-only .
[WARNING] Failed checks on mirage-unikernel-cuekeeper-unix package definition from source at file:///Users/bcohen/dev/cuekeeper/server:
warning 37: Missing field 'dev-repo'
warning 49: The following URLs don't use version control but look like version control URLs: "https://github.com/talex5/cuekeeper.git#master"
Nothing to do.
mirage build
Generating static1.ml
Generating static1.mli
+ ocamlfind ocamlc -c -g -g -bin-annot -safe-string -principal -thread -strict-sequence -w A-4-44-48-3 -package tls -package tcpip.unix -package tcpip.udpv4-socket -package tcpip.tcpv4-socket -package tcpip.stack-socket -package tcpip -package nocrypto.mirage -package nocrypto -package mirage-unix -package mirage-types-lwt -package mirage-types -package mirage-runtime -package mirage-logs -package mirage-kv-mem -package mirage-entropy -package mirage-clock-unix -package mirage-bootvar-unix -package lwt -package irmin-mem -package irmin-git -package irmin -package functoria-runtime -package cohttp-mirage -predicates mirage_unix -w A-4-41-42-44-48 -color always -o key_gen.cmo key_gen.ml
findlib: [WARNING] Interface static.cmi occurs in several directories: ., /Users/bcohen/.opam/4.07.1/lib/cohttp-mirage
+ ocamlfind ocamlc -c -g -g -bin-annot -safe-string -principal -thread -strict-sequence -package tls -package tcpip.unix -package tcpip.udpv4-socket -package tcpip.tcpv4-socket -package tcpip.stack-socket -package tcpip -package nocrypto.mirage -package nocrypto -package mirage-unix -package mirage-types-lwt -package mirage-types -package mirage-runtime -package mirage-logs -package mirage-kv-mem -package mirage-entropy -package mirage-clock-unix -package mirage-bootvar-unix -package lwt -package irmin-mem -package irmin-git -package irmin -package functoria-runtime -package cohttp-mirage -predicates mirage_unix -w A-4-41-42-44-48 -color always -w -32-34 -o static1.cmi static1.mli
findlib: [WARNING] Interface static.cmi occurs in several directories: ., /Users/bcohen/.opam/4.07.1/lib/cohttp-mirage
+ ocamlfind ocamlc -c -g -g -bin-annot -safe-string -principal -thread -strict-sequence -package tls -package tcpip.unix -package tcpip.udpv4-socket -package tcpip.tcpv4-socket -package tcpip.stack-socket -package tcpip -package nocrypto.mirage -package nocrypto -package mirage-unix -package mirage-types-lwt -package mirage-types -package mirage-runtime -package mirage-logs -package mirage-kv-mem -package mirage-entropy -package mirage-clock-unix -package mirage-bootvar-unix -package lwt -package irmin-mem -package irmin-git -package irmin -package functoria-runtime -package cohttp-mirage -predicates mirage_unix -w A-4-41-42-44-48 -color always -o main.cmo main.ml
findlib: [WARNING] Interface static.cmi occurs in several directories: ., /Users/bcohen/.opam/4.07.1/lib/cohttp-mirage
+ ocamlfind ocamlopt -c -g -g -bin-annot -safe-string -principal -thread -strict-sequence -w A-4-44-48-3 -package tls -package tcpip.unix -package tcpip.udpv4-socket -package tcpip.tcpv4-socket -package tcpip.stack-socket -package tcpip -package nocrypto.mirage -package nocrypto -package mirage-unix -package mirage-types-lwt -package mirage-types -package mirage-runtime -package mirage-logs -package mirage-kv-mem -package mirage-entropy -package mirage-clock-unix -package mirage-bootvar-unix -package lwt -package irmin-mem -package irmin-git -package irmin -package functoria-runtime -package cohttp-mirage -predicates mirage_unix -w A-4-41-42-44-48 -color always -w -32-34 -o static.cmx static.ml
findlib: [WARNING] Interface static.cmi occurs in several directories: ., /Users/bcohen/.opam/4.07.1/lib/cohttp-mirage
+ ocamlfind ocamlopt -c -g -g -bin-annot -safe-string -principal -thread -strict-sequence -w A-4-44-48-3 -package tls -package tcpip.unix -package tcpip.udpv4-socket -package tcpip.tcpv4-socket -package tcpip.stack-socket -package tcpip -package nocrypto.mirage -package nocrypto -package mirage-unix -package mirage-types-lwt -package mirage-types -package mirage-runtime -package mirage-logs -package mirage-kv-mem -package mirage-entropy -package mirage-clock-unix -package mirage-bootvar-unix -package lwt -package irmin-mem -package irmin-git -package irmin -package functoria-runtime -package cohttp-mirage -predicates mirage_unix -w A-4-41-42-44-48 -color always -o key_gen.cmx key_gen.ml
findlib: [WARNING] Interface static.cmi occurs in several directories: ., /Users/bcohen/.opam/4.07.1/lib/cohttp-mirage
+ ocamlfind ocamlopt -c -g -g -bin-annot -safe-string -principal -thread -strict-sequence -package tls -package tcpip.unix -package tcpip.udpv4-socket -package tcpip.tcpv4-socket -package tcpip.stack-socket -package tcpip -package nocrypto.mirage -package nocrypto -package mirage-unix -package mirage-types-lwt -package mirage-types -package mirage-runtime -package mirage-logs -package mirage-kv-mem -package mirage-entropy -package mirage-clock-unix -package mirage-bootvar-unix -package lwt -package irmin-mem -package irmin-git -package irmin -package functoria-runtime -package cohttp-mirage -predicates mirage_unix -w A-4-41-42-44-48 -color always -w -32-34 -o static1.cmx static1.ml
findlib: [WARNING] Interface static.cmi occurs in several directories: ., /Users/bcohen/.opam/4.07.1/lib/cohttp-mirage
+ ocamlfind ocamlopt -c -g -g -bin-annot -safe-string -principal -thread -strict-sequence -package tls -package tcpip.unix -package tcpip.udpv4-socket -package tcpip.tcpv4-socket -package tcpip.stack-socket -package tcpip -package nocrypto.mirage -package nocrypto -package mirage-unix -package mirage-types-lwt -package mirage-types -package mirage-runtime -package mirage-logs -package mirage-kv-mem -package mirage-entropy -package mirage-clock-unix -package mirage-bootvar-unix -package lwt -package irmin-mem -package irmin-git -package irmin -package functoria-runtime -package cohttp-mirage -predicates mirage_unix -w A-4-41-42-44-48 -color always -o main.cmx main.ml
findlib: [WARNING] Interface static.cmi occurs in several directories: ., /Users/bcohen/.opam/4.07.1/lib/cohttp-mirage
+ ocamlfind ocamlopt -g -linkpkg -g -thread -package tls -package tcpip.unix -package tcpip.udpv4-socket -package tcpip.tcpv4-socket -package tcpip.stack-socket -package tcpip -package nocrypto.mirage -package nocrypto -package mirage-unix -package mirage-types-lwt -package mirage-types -package mirage-runtime -package mirage-logs -package mirage-kv-mem -package mirage-entropy -package mirage-clock-unix -package mirage-bootvar-unix -package lwt -package irmin-mem -package irmin-git -package irmin -package functoria-runtime -package cohttp-mirage -predicates mirage_unix devices.cmx key_gen.cmx static.cmx server.cmx static1.cmx unikernel.cmx main.cmx -o main.native
findlib: [WARNING] Interface static.cmi occurs in several directories: ., /Users/bcohen/.opam/4.07.1/lib/cohttp-mirage
ld: warning: directory not found for option '-L/opt/local/lib'
None-C02VV5SWHTD6:cuekeeper bcohen$
from cuekeeper.
The thing you put into echo -n
should be your password (that you just generated), not the example one in the README.
from cuekeeper.
Doohhh.... my bad, copy and paste error.
All set, server is up with the "Sync" button.
Thanks for all your assistance.
from cuekeeper.
Related Issues (18)
- Error running `make` HOT 2
- Problems building client and server HOT 9
- "Close All" sometimes results in runaway memory consumption HOT 4
- Firefox 71 on Fedora gives ConstraintError
- Stack overflow inverting parent relation
- chances of adding dependencies?
- tar-format.0.3 released
- issue with make server on Ubuntu 20.04 LTS HOT 3
- Stack Overflow error when trying to Sync HOT 4
- How to make use of export and backup functions HOT 2
- An error occurred while executing make client, because the function of _requestAnimationFrame is deprecated. HOT 1
- SecurityError: The operation is insecure.
- when you set a wait date on a task it doesn't show in the list of "waiting" in the review tab HOT 3
- Add title attributes to the one-letter toggle buttons HOT 1
- Allow cancelling editing with the Esc key HOT 1
- Style fields that open menus to look more like drop-downs
- Sometimes fails with AbortError on Safari
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cuekeeper.