spiral-modules / roadrunner-binary

💾 High-performance PHP application server, load-balancer and process manager written in Golang. RR2 releases repository.
MIT License
44 stars 25 forks source link

[BUG] Run serve command with -d options failed #25

Closed bigBron closed 3 years ago

bigBron commented 3 years ago

in windows system run rr.exe serve command with -d option that get error prompt:

listen tcp :6061: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.

rustatian commented 3 years ago

Hey @bigBron, nice to meet you. Could you please share your config and version of the RR?

bigBron commented 3 years ago

@48d90782 Sorry, no more details. I have deleted the project. It should be the latest version. It is installed with composer. The configuration file is the default configuration. I looked at the source code, use -d option will be fixed listening port 6061, whether the program can be adjusted to be more flexible?

rustatian commented 3 years ago

@bigBron That depends on the version you use. But in general, -d flag in the RR2 is the debug/pprof flag which you should not use other than for profiling your own plugin or profiling RR2 itself.

rustatian commented 3 years ago

For the application, you have http.address or rpc.address for the RPC.

bigBron commented 3 years ago

Is it possible to configure the debug/pprof port instead? In some cases 6061 will be occupied? https://github.com/spiral/roadrunner-binary/blob/3eeefb48d27084bc63474da09735feb583344a3b/internal/cli/root.go#L71-L74

rustatian commented 3 years ago

Not at the moment, but just don't use -d flag. It is for internal usage.

rustatian commented 3 years ago

It's not equivalent to the RR1 -d flag which was used to show debug messages. Debug logging level can be configured by adding logs section. See: https://github.com/spiral/roadrunner-binary/blob/master/.rr.yaml

bigBron commented 3 years ago

Oh. dude, I confused the concept, thank you for your patience reply.

rustatian commented 3 years ago

@bigBron np, I'll check the report you sent and if I confirm it we will definitely fix it 💯

rustatian commented 3 years ago

@bigBron Sorry, I can't reproduce your error. It seems, that when you used -d flag, some other application already listened to the :6061 port on some interface: image image

I'm closing this ticket, but, feel free to reopen it if you for some unknown reason still have this issue.