XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.51k stars 1.46k forks source link

Help with rippled server running #2309

Closed prinick96 closed 6 years ago

prinick96 commented 6 years ago

Hi guys, first, sorry for my bad english. I bought a dedicated server with CentOS for build a rippled server. I follow these instructions : https://ripple.com/build/rippled-setup/ and has runned the rippled server.

tcp        0      0 0.0.0.0:51235           0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:5005          0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:6006          0.0.0.0:*               LISTEN
unix  2      [ ACC ]     STREAM     LISTENING     3032692  /run/systemd/private
unix  2      [ ACC ]     STREAM     LISTENING     3032696  /run/systemd/journal/stdout
unix  2      [ ACC ]     STREAM     LISTENING     3033044  /var/run/dbus/system_bus_socket

The rippled server running in 5005 and 6006, i understand what 6006 port is for Websockets and 5005 is for RPC.

I have a api with ripple-lib api in NodeJS https://github.com/ripple/ripple-lib I setup my app with

const api = new RippleAPI({
  server: 'wss://s1.ripple.com' // WITH PUBLIC RIPPLE SERVER
});

And i can use the rippled network, but i use my server, and don't have connection.

const api = new RippleAPI({
  server: 'ws://myserver.com:6006' // WITH MY SERVER ADDRESS, ws:// because i don't have SSL
});
  1. How i use the rippled server with this api?
  2. I need make another configuration in my server?
  3. My server was empty, without system operative, etc, i need install another lib or service for example for the websockets?
  4. I don't follow the last step (https://ripple.com/build/rippled-setup/#domain-verification), i need before, be secure of i can run the rippled server before buy a SSL
  5. Rippled is prepared for use in Linux Containers?

Greats

prinick96 commented 6 years ago

Solved... steps:

  1. Edit /opt/ripple/etc/rippled.cfg
  2. uncomment directive [port_ws_public]
  3. set the port
  4. set ip of the public domain (DON'T USE localhost)
  5. set wss protocol if you have SSL, else ws
jmannanc commented 6 years ago

So if you follow the steps in your second comment, you can use Ripple API but with your own server?

prinick96 commented 6 years ago

Yes! The problem is public config of rippled.cfg

Baha2Odeh commented 6 years ago

i follow your step but mine did not work could you upload your rippled.cfg file ?

pankajbarhate13 commented 5 years ago

I also follow the same steps but not work, give an error [NotConnectedError(connect ECONNREFUSED 127.0.0.1:5005, { Error: connect ECONNREFUSED 127.0.0.1:5005 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1191:14) i replace host in above code

miguelportilla commented 5 years ago

@pankajbarhate13 @Baha2Odeh Try using the following in your configuration:

[server]
port_rpc
port_peer
port_wss_admin
port_ws_public

[port_rpc]
port = 5005
ip = 0.0.0.0
admin = 127.0.0.1
protocol = http,https

Be aware that this configuration may allow nonlocal RPC access to your server. If you plan on only accessing your server locally, then I recommend specifying ip = 127.0.0.1