You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the workaround I have found. I think its trying to connect 2 times to the sidecar, one time with the port I have provided and another one with the default port. I suppose thats why we are seeing [HTTPClient, HTTPClient] Sidecar Started twice
Actual Behavior
So, actually I'm trying to use another port other than 3500 as the --dapr-http-port port, the port a dapr client can use to connect to the sidecar. But it's not working, it seems like it tries to connect to the default port 3500 whether I precise a port or not.
Dapr sidecar command
dapr run --app-id audit-service \
--scheduler-host-address "63.250.53.226:50006" \
--app-port 3010 \
--dapr-http-port 3510 \
--dapr-http-max-request-size 4 \
--dapr-http-read-buffer-size 4 \
--enable-api-logging
...
res =>
INFO[0002] HTTP API Called app_id=audit-service code=204 duration=1 instance=Flyer-4.local method="PUT /v1.0/metadata/cliPID" scope=dapr.runtime.http-info size=0 type=log useragent=Go-http-client/1.1 ver=1.14.4
✅ You're up and running! Dapr logs will appear here.
The error I'm getting
{
message: '[HTTPClient, HTTPClient] Sidecar Started',
level: 'info',
timestamp: '2024-11-20T09:25:59.723Z'
}
{
message: 'DAPR audit-service client has been initialized successfully', // this is the client. As you can see it has started
level: 'info',
timestamp: '2024-11-20T09:25:59.723Z'
}
{
message: '[HTTPClient, HTTPClient] Awaiting Sidecar to be Started', // and this is where it goes back to awaiting state
level: 'info',
timestamp: '2024-11-20T09:26:02.266Z'
}
{
message: 'Error during Dapr initialization: DAPR_SIDECAR_COULD_NOT_BE_STARTED', // finally it crashs
level: 'error',
timestamp: '2024-11-20T09:26:33.063Z'
}
/Users/filymohamedsakine/Documents/secretstartups/audit/server.js:78
throw new Error(error);
^
Error: Error: DAPR_SIDECAR_COULD_NOT_BE_STARTED
at bootstrap (/Users/filymohamedsakine/Documents/secretstartups/audit/server.js:78:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v20.17.0
First time, it connects well to the sidecar on the right port then it tries with the default port 3500. I have found a workaround to fix this supposed bug. What I have found is to edit the default port in the package Settings.defaultHttpPort = "3500"; and it works.
I also tried to put the port in the host and comment the port like this
It worked for 1d and stopped working the next day (Dunno why it was working though). The workaround is still working, I even tried it today. This is the error I'm getting with host and port combined
Expected Behavior
The client should connect to the sidecar without any error, like this:
This is the workaround I have found. I think its trying to connect 2 times to the sidecar, one time with the port I have provided and another one with the default port. I suppose thats why we are seeing
[HTTPClient, HTTPClient] Sidecar Started
twiceActual Behavior
So, actually I'm trying to use another port other than
3500
as the--dapr-http-port
port, the port a dapr client can use to connect to the sidecar. But it's not working, it seems like it tries to connect to the default port3500
whether I precise a port or not.Dapr sidecar command
The error I'm getting
First time, it connects well to the sidecar on the right port then it tries with the default port
3500
. I have found a workaround to fix thissupposed
bug. What I have found is to edit the default port in the packageSettings.defaultHttpPort = "3500";
and it works.I also tried to put the port in the host and comment the port like this
It worked for 1d and stopped working the next day (Dunno why it was working though). The workaround is still working, I even tried it today. This is the error I'm getting with host and port combined
See the
3500
? As I said, I think no matter what the port we give to the client, it will try to connect to the default port.Steps to Reproduce the Problem
Run a sidecar on any port other than
3500
and try to connect a dapr client to itSidecar command
Client code
The text was updated successfully, but these errors were encountered: