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

bin/neph exception #3028

Closed
i4004 opened this issue Jun 24, 2020 · 4 comments · Fixed by #3029
Closed

bin/neph exception #3028

i4004 opened this issue Jun 24, 2020 · 4 comments · Fixed by #3029

Comments

@i4004
Copy link
Contributor

i4004 commented Jun 24, 2020

Hello! When running bin/neph [job1] command with any framework i got exception:

$ bin/neph csharp.simplify.web
Neph is running (0.2.12) 0%||||||||||||||||||||||||||||||||||||||||||||||||||
-- // --
Neph is running (0.2.12) 0%||||||||||||||||||||||||||||||||||||||||||||||||||
csharp.simplify.web [0/1] ⠠ running (66%) > ../../bin/client --language csharp --framework simplify.web -r GET:/ -r GET:/user/0 -r POST:/user -h `cat ip.txt` -c 144  -c 576  -c 1152
[Error] 'csharp.simplify.web' failed with status code (256)
[Error]  -- STDOUT(.neph/csharp.simplify.web/log/log.out) --
 ---> 8845550065cf
Step 11/12 : ENV COMPlus_TieredCompilation 1
 ---> Using cache
 ---> cce7ae2d8ff0
Step 12/12 : CMD dotnet /usr/src/app/out/web.dll
 ---> Using cache
 ---> 29eee1ecb279
Successfully built 29eee1ecb279
Successfully tagged csharp.simplify.web:latest
Start @ 144
[Error]  -- STDERR(.neph/csharp.simplify.web/log/log.err) --
Unhandled exception: Empty enumerable (Enumerable::EmptyError)
  from ../../../../../usr/share/crystal/src/gc/boehm.cr:110:5 in 'run'
  from ../../tools/src/client.cr:116:1 in '__crystal_main'
  from ../../../../../usr/share/crystal/src/crystal/main.cr:105:5 in 'main'
  from __libc_start_main
  from _start
  from ???

Environment:

  • WSL 2 Ubuntu 20.04
  • Latest Crystal, Docker, Wrk, PostgreSQL
@waghanza
Copy link
Collaborator

waghanza commented Jun 25, 2020

@i4004 you mean you are on windows ? sorry I do not know WSL


you need probably to use docker-machine. I'm not sure windows is fully compatible with the docker native functions

@i4004
Copy link
Contributor Author

i4004 commented Jun 25, 2020

Yes I am on windows, and using WSL 2, which is like virtual machine for linux.

I am using docker-desktop for windows (it has built-in WSL 2 support) which translates communication with docker from inside WSL to docker on windows.

@waghanza
Copy link
Collaborator

I'm not sure what going on then ...

I can not support docker-desktop. Can you use docker-machine ?


The commands will be more complex (after docker-machine setup)

docker-machine rm default --force
shards build
bin/make config --driver docker-machine
docker-machine create default
eval $(docker-machine env default) 
export DATABASE_URL=postgresql://postgres@localhost/benchmark
dropdb -U postgres benchmark
createdb -U postgres benchmark
psql -U postgres -d benchmark < .ci/dump.sql
bin/neph csharp.simplify.web --seq 
bin/db to_readme

docker-machine and docker-desktop are NOT the same, and can not support both as of today

@i4004
Copy link
Contributor Author

i4004 commented Jun 27, 2020

FYI, so, this is what i discovered:

I cannot ping my containers🔗
Docker Desktop for Windows can’t route traffic to Linux containers. However, you can ping the Windows containers.

I want to connect to a container from Windows
Port forwarding works for localhost; --publish, -p, or -P all work. Ports exposed from Linux are forwarded to the host.

So, this does work:

docker run -p 5000:3000 -d csharp.simplify.web
wrk http://127.0.0.1:5000

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

Successfully merging a pull request may close this issue.

2 participants