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

rpc unix socket is not closed sometimes #19

Closed
Richard87 opened this issue Jun 22, 2018 · 5 comments
Closed

rpc unix socket is not closed sometimes #19

Richard87 opened this issue Jun 22, 2018 · 5 comments
Assignees
Labels
B-bug Bug: bug, exception

Comments

@Richard87
Copy link

Richard87 commented Jun 22, 2018

There is some issues with the shutdown procedures, when using either STDOUT/IN or Unix socket it doesn't close it, and then it can't start properly later (I havent tried a TCP socket yet).

./rr serve -v -d
DEBU[0000] [rpc]: started                               
DEBU[0000] [http]: started                              
DEBU[0000] [static]: started                            
ERRO[0000] [rpc]: listen unix ./var/roadrunner2.sock: bind: address already in use 
DEBU[0000] [http]: stopped                              
ERRO[0000] [http]: listen unix ./var/roadrunner2.sock: bind: address already in use 
^C%                                                                                   
@wolfy-j
Copy link
Contributor

wolfy-j commented Jun 22, 2018

Can you post your .rr file here and name of your OS?

@wolfy-j wolfy-j changed the title socket is not closed sometimes unix socket is not closed sometimes Jun 22, 2018
@Richard87
Copy link
Author

Richard87 commented Jun 22, 2018

Hi!

some changes (I was slightly confused by the different listen directives for rpc and listen...:

# rpc bus allows php application and external clients to talk to rr services.
rpc:
  enable: true
  listen: unix://./var/roadrunner3.sock

# http service configuration.
http:
  enable:     true
  address:    0.0.0.0:8000
  maxRequest: 200
  uploads:
    forbid: [".php", ".exe", ".bat"]
  workers:
    command:  "php psr-worker.php"

    # connection method (pipes, tcp://:9000, unix://socket.unix).
    relay:    "pipes"
    pool:
      numWorkers: 4
      maxJobs:  0
      allocateTimeout: 60000000000
      destroyTimeout:  30000000000

# static file serving.
static:
  enable:  true
  dir:   "web"
  forbid: [".php", ".htaccess", "package.json", "yarn.lock"]

(Also, executing ./rr http:workers never completes, I have a feeling it's related ;) )

@wolfy-j wolfy-j self-assigned this Jun 22, 2018
@wolfy-j wolfy-j added the B-bug Bug: bug, exception label Jun 22, 2018
@wolfy-j wolfy-j changed the title unix socket is not closed sometimes rpc unix socket is not closed sometimes Jun 22, 2018
@Richard87
Copy link
Author

I added xdebug_break() the the psr_worker.php (inside the loop), and it crashed.

After I start it again, all logging seems to be going strong, but nothing works:
image
image

@wolfy-j
Copy link
Contributor

wolfy-j commented Jun 22, 2018

That's weird, I'm unable to reproduce such issue on the similar machine, can you check if this port is being listened by anything netstat -ant?

Do you see any workers when you try to to run rr http:workers command? Have you tried to connect to your workes over unix socket?

@wolfy-j
Copy link
Contributor

wolfy-j commented Jun 23, 2018

Fixed in recent version.

@wolfy-j wolfy-j closed this as completed Jun 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-bug Bug: bug, exception
Projects
None yet
Development

No branches or pull requests

2 participants