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

Cannot use proxy after restart #147

Closed
jdknives opened this issue Jan 31, 2020 · 3 comments · Fixed by #152
Closed

Cannot use proxy after restart #147

jdknives opened this issue Jan 31, 2020 · 3 comments · Fixed by #152
Assignees
Labels
bug Something isn't working

Comments

@jdknives
Copy link
Member

Originally described by @Darkren here: #123

I did the following:

  1. Started visors A and C on local machine
  2. Added transport C->B, A->B
  3. Tried changing password and PK for skysocks
  4. Tried curling through skysocks - it works
  5. Requested visor restart from hypervisor for C where skysocks-client is hosted. It went down and rose back up just great. but then, logs:


Then tried curling through proxy and got this:

Restarting skysocks-client from hypervisor doesn't save the day, CURL request hangs after that

@jdknives jdknives added the bug Something isn't working label Jan 31, 2020
@Darkren Darkren self-assigned this Feb 5, 2020
@Darkren
Copy link
Contributor

Darkren commented Feb 5, 2020

Need to check but probably this happens right after the visor restart, no more actions needed. I'll check. Seems like we're refreshing transports from discovery on visor start, but we don't refersh routing table. It gets lost and router just can't handle incoming packets

@evanlinjin
Copy link
Contributor

evanlinjin commented Feb 5, 2020

As discussed on Discord (here), this bug may be a result of a faulty implementation of router.

We may need to ensure the router enforces the following behavior:

  1. If we don't receive ping after timeout, close the route.
  2. If we can't send pong, close the route.

Here is a link to the relevant specs: https://github.com/SkycoinPro/skywire-specs/blob/master/proposals/router2.md#routingrule-changes

@evanlinjin
Copy link
Contributor

As a response to @Darkren 's message on Discord (here), I recommend the following:

  1. Initialize routing.Table within router.Router.
  2. Add a new method to routing.Table: (*routing.Table).CollectGarbage() []RouteDescriptor which returns the route descriptors from all the ConsumeRules and ForwardRules that it has deleted.
  3. The garbage collection logic will be repositioned to be called within router.Router. Every time CollectGarbage() is called, the returned route descriptors will be used to close the relevant route groups.

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants