docs
docs copied to clipboard
Hello World sample on local Mac trouble: Temporary error when accepting new connections
Following the instructions.
stephenrwalli$ dapr list
No dapr instances found.
stephenrwalli$ dapr --version
cli version: 0.4.0-alpha.2
runtime version: edge
stephenrwalli$ dapr init
⌛ Making the jump to hyperspace...
✅ Downloading binaries and setting up components...
✅ Success! Dapr is up and running
stephenrwalli$ dapr run --app-id mynode --app-port 3000 --port 3500 node app.js
ℹ️ Starting Dapr with id mynode. HTTP Port: 3500. gRPC Port: 61542
== DAPR == time="2019-10-10T20:52:38-07:00" level=info msg="starting Dapr Runtime -- version edge -- commit f62dc31-dirty"
== DAPR == time="2019-10-10T20:52:38-07:00" level=info msg="log level set to: info"
== DAPR == time="2019-10-10T20:52:38-07:00" level=info msg="standalone mode configured"
== DAPR == time="2019-10-10T20:52:38-07:00" level=info msg="dapr id: mynode"
== DAPR == time="2019-10-10T20:52:38-07:00" level=info msg="loaded component messagebus (pubsub.redis)"
== DAPR == time="2019-10-10T20:52:38-07:00" level=info msg="loaded component statestore (state.redis)"
== DAPR == time="2019-10-10T20:52:38-07:00" level=info msg="application protocol: http. waiting on port 3000"
✅ You're up and running! Both Dapr and your app logs will appear here.
== APP == Node App listening on port 3000!
== DAPR == time="2019-10-10T20:52:39-07:00" level=info msg="application discovered on port 3000"
== DAPR == 2019/10/10 20:52:39 redis: connecting to localhost:6379
== DAPR == 2019/10/10 20:52:39 redis: connected to localhost:6379 (localAddr: [::1]:61570, remAddr: [::1]:6379)
== DAPR == time="2019-10-10T20:52:39-07:00" level=info msg="actor runtime started. actor idle timeout: 1h0m0s. actor scan interval: 30s"
== DAPR == time="2019-10-10T20:52:39-07:00" level=info msg="actors: starting connection attempt to placement service at localhost:50005"
== DAPR == time="2019-10-10T20:52:39-07:00" level=info msg="http server is running on port 3500"
== DAPR == time="2019-10-10T20:52:39-07:00" level=info msg="gRPC server is running on port 61542"
== DAPR == time="2019-10-10T20:52:39-07:00" level=info msg="actors: established connection to placement service at localhost:50005"
== DAPR == 2019/10/10 20:53:13 Temporary error when accepting new connections: accept tcp4 0.0.0.0:3500: accept: too many open files
== DAPR == time="2019-10-10T20:53:14-07:00" level=warning msg="failed to broadcast address to local network: could not determine host IP addresses for Stephens-MacBook-Pro."
== DAPR == time="2019-10-10T20:53:14-07:00" level=info msg="dapr initialized. Status: Running. Init Elapsed 35616.638603ms"
Note the logged error above. Also confused at the dapr runtime version 'edge'. I did update my version of dapr because I was running an older version from the other day that failed. I stopped dapr, stopped and removed running containers, downloaded and installed the new CLI, and ran dapr init again.
In another terminal window.
stephenrwalli$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
57b860983ac3 actionscore.azurecr.io/dapr:latest "./placement" About a minute ago Up About a minute 0.0.0.0:50005->50005/tcp dapr_placement
b8f1fb5626d8 redis "docker-entrypoint.s…" About a minute ago Up About a minute 0.0.0.0:6379->6379/tcp elated_engelbart
stephenrwalli$ curl -XPOST -d @sample.json http://localhost:3500/v1.0/invoke/mynode/method/neworder
curl: (52) Empty reply from server
stephenrwalli$ node --version
v12.11.1
stephenrwalli$ dapr --version
cli version: 0.4.0-alpha.2
runtime version: edge
stephenrwalli$ docker --version
Docker version 19.03.2, build 6a30dfc
stephenrwalli$
Running on MacOS 10.14.6. Ideas?
Can you add the flag log-level debug to dapr run and report any extra errors if any?
@stephenrwalli This must be fixed in new release. Please try out.