Skip to content
This repository has been archived by the owner on Nov 24, 2022. It is now read-only.

Redir 3 forwarded ports are not being cleared correctly #467

Closed
ethervoid opened this issue Jun 19, 2018 · 4 comments
Closed

Redir 3 forwarded ports are not being cleared correctly #467

ethervoid opened this issue Jun 19, 2018 · 4 comments
Labels

Comments

@ethervoid
Copy link

ethervoid commented Jun 19, 2018

Hi,

We've been experiencing problems with redir, version 3.1, not being cleared after a vagrant reload

I checked the code and found that is being done here.

The problem is that is getting the wrong PIDs from here

For example, my redir PID for port 3000 is 10459 but in the file redir_3000 is stored the PID 10456

I'm going to paste some outputs here:

ethervo+ 10459  0.0  0.0   6656   108 ?        Ss   16:46   0:00 redir 127.0.0.1 3000 10.0.3.131 3000

and the file cat

cat /media/data/development/vm/cartodb_lxc_xenial/.vagrant/machines/default/lxc/pids/redir_3000.pid                                                                                                                       [16:47:18]
10456

It seems like this part is not returning a correct PID for that process

Looks like spawn could be returning the parent pid instead of the final one?

@ethervoid ethervoid changed the title Redis ports are not being cleared correctly Redir ports are not being cleared correctly Jun 19, 2018
@ethervoid ethervoid changed the title Redir ports are not being cleared correctly Redir 3 ports are not being cleared correctly Jun 19, 2018
@ethervoid ethervoid changed the title Redir 3 ports are not being cleared correctly Redir 3 forwarded ports are not being cleared correctly Jun 19, 2018
@ethervoid
Copy link
Author

ethervoid commented Jun 19, 2018

More info:

If you go to irb and do:

irb(main):002:0> spawn 'redir 127.0.0.1:3000 10.0.3.131:3000 2>/dev/null'
=> 29411

but if you make a pgrep you get

❯ pgrep redir                                                                                           [17:37:35]
29413

Looks like the problem is the child process detaching after daemonizing itself

@ghost ghost self-assigned this Jun 24, 2018
ghost pushed a commit that referenced this issue Jul 4, 2018
@ghost
Copy link

ghost commented Jul 4, 2018

Thanks for the detailed report. It turns out that "foreground mode" was the key. I've noticed that it was a new option compared to v2.x, so that was a hint... and it was it.

I've pushed a fix on master. Could you try and confirm the fix?

@ethervoid
Copy link
Author

Tested, seems to be working fine :) thank you

@fgrehm fgrehm added the ignored label Nov 17, 2022
@fgrehm
Copy link
Owner

fgrehm commented Nov 17, 2022

Hey, sorry for the silence here but this project is looking for maintainers 😅

As per #499, I've added the ignored label and will close this issue. Thanks for the interest in the project and LMK if you want to step up and take ownership of this project on that other issue 👋

@fgrehm fgrehm closed this as completed Nov 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants