-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
How to allow peer connections in stand-alone-like mode? #2450
Comments
The very definition of "stand-alone mode" is that However, you can reconfigure your ports to accept fixed IPs and limit the number of connections specifically. I believe how this works is:
|
I do not want |
@mDuo13 I followed your advice. The |
I see, you're referring to this code. I don't think this will change. If the server can't connect to its peers, it's not able to engage in consensus. And if the server is in stand-alone mode, it shouldn't connect to its peers (and it doesn't use consensus, just It sounds to me like your problem is less about this behavior and more that your machine has insufficient specs to run rippled. |
As mentioned above, all public peers I tried to connect to respond with either 503 or 403. Do they all have insufficient specs? It sounds to me like |
Oh, I misunderstood you. I thought you meant your rippled was responding with 503. Not sure why other servers would return 503/403, but if I had to guess it's because they don't want more peers at the time. And you're absolutely, completely wrong about |
And how do you test that |
If you don't want
|
This does not resolve the issue, because setting
in the configuration file only prevents broadcasting the server's address. The node still connects to either the configured peers (if any), or |
That is not correct. Peers with If they do, that is a bug. Please verify and, if necessary, open a new issue. |
I just checked again. The server responds with 503. This does not resolve my issue. Taking into account that this question:
remains unanswered for half a year, I assume no such test is ever done. I request reopening issues #2448, #2449, and #2450. They should remain open until they are confirmed to have been resolved. |
Can you provide me with more details on how you are trying to connect? I just connected to several servers using RPC, WebSocket and the peer protocol and didn't have a 503 or 403. It's meaningless to reopen this issue (#2450) because the question it poses is "how to allow peer connections in standalone mode" and standalone mode is, by definition, designed to make allow peer connections. If you want to run a server that does not make outgoing connections, then the correct mechanism to do that is what I described above: set Alternatively, if you want to create a network of peers that don't connect to the main network, you can do that too. On all the servers that you want to have join your network:
|
Maybe that's what @codedot means? I would guess that returning peer IPs and a 503 in the first case is actually a bug, but it might be there for compatibility reasons... |
The 503 is expected when you connected to a server that can't service your request (which could be because it's busy, but could be because it doesn't understand what you're asking to do). If that happens, it tries to be helpful and returns a 503 along with a set of IPs to try to connect to. The reason you're getting a 503 however, isn't because the server is busy. It's because you're not passing in all the required information to it. You're missing a While the server can't establish a connection because you've sent a request that's missing fields that are required, it still tries to be helpful. It provides a list of peers, on the theory that just maybe, they are running a newer version that can understand the request you sent and maybe help you connect. This is not a bug, but it's probably more reasonable to send you an error telling you you're not talking the right language before simply dropping the connection. That is exactly what happens if you retry but add a Request:
Response
Rest assured, |
Adding the
However, the local
What configuration is needed for the local |
I don't think that you can connect on localhost: |
I don't think that is the case, because neither of the debug messages show up in the log after the server responds with 503 even with
|
Since we're having a conversation, I'm going to reopen this issue. But again, note that "allowing peer connections in stand-alone mode" is a non-sequitur. The discussion is about the protocol mechanics of establishing a peer connection.I'm betting the problem is that you have More specifically, is that this is being triggered from https://github.com/ripple/rippled/blob/develop/src/ripple/peerfinder/impl/Logic.h#L396-L402 That calls into https://github.com/ripple/rippled/blob/develop/src/ripple/peerfinder/impl/Counts.h#L77-L78 Which uses the value With that said, I believe that the way we calculate inbound/outbound slots can be improved and should, probably, be something that the admin can explicitly configure; we can do it automatically as a fallback. I'll have to open an issue for that. But even if there were nothing actionable on the |
I didn't open this issue for a chat. The description of the issue has always been the same:
Above, I have already attached the configuration with which the local
as recommended by @nbougalis previously:
Once I obtain a configuration for |
I didn't suggest you were. I simply said that I was reopening this issue, which you requested, because we seem to be discussing something other than allowing connections in stand-alone mode.
I asked you to paste the output of the Alternatively, you can simply disable
This will prevent your server from using However, if the 503 you receive was caused by If this has solved your issue, please go ahead and close this issue at this time. For me the takeaways from this conversation are simple:
|
This issue is specifically about incoming peer connections (one can only
In the attached configuration file, RPC was disabled, so I could not do that. Anyway, that rather dirty hack
finally resolves the issue:
so I am closing it now. |
Glad to hear this worked, thanks. This conversation has highlighted the need for more flexible configuration of connectivity options for
There was no ambiguity; your request was very clear. There simply was some confusion on my part. |
OK. |
I am looking for configuration and/or command line arguments for
rippled
to run in a stand-alone-like mode that would accept at least one peer connection. This is needed to test alternative implementations, for example this work in progress (see #2413 and #2449 for details).I have already tried the following options:
rippled
is unstable due to Configuration for OVH VPS SSD 3 #2448 and always responds with 503.--standalone
option makesrippled
drop all incoming connections.Please advise.
The text was updated successfully, but these errors were encountered: