load account is working fine and giving details of accounts means horizon is giving response but on transaction submitting getting error.

local node setup done using docker image of stellar


app.get('/transferCoins', async function (req, res) {
        var sourceSecretKey = issuer.secret;// seed of acc from which tx process
        var sourceKeypair = StellarSdk.Keypair.fromSecret(sourceSecretKey);
        var sourcePublicKey = sourceKeypair.publicKey();//pub key of source acc
        var receiverPublicKey = account2.publicKey;// public key of reciever acc
        //var server = new StellarSdk.Server('https://horizon-testnet.stellar.org');//live netwrk

        var server = new StellarSdk.Server('http://localhost:8000', {allowHttp: true});

        const account = await server.loadAccount(sourcePublicKey)

        var transaction = new StellarSdk.TransactionBuilder(account)
                destination: receiverPublicKey,
                asset: StellarSdk.Asset.native(),//native asset lumen
                amount: '0.1',
            .addMemo(StellarSdk.Memo.text('coins sent xlm'))//optional 


        const temp = await server.submitTransaction(transaction)
        console.log('submitted', temp._links);


(node:23113) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): **Error: Request failed with status code 504**
(node:23113) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
  • sometimes gives : stellar-core -c info "Catching up: applying checkpoint 1/1 (100%)", "Local time is not synchronized with NTP time." Nov 27, 2018 at 7:44
  • when I restart the docker and did stellar-core -c info state changes and new ledger is synced and also 2-3 transaction get confirmed , so that means everything is working fine except ledger sync, syncing is happening after very long time not immediately Nov 27, 2018 at 9:37

1 Answer 1


changed the cathchup_recent = 1024 instead of 8096

and now ledeger is syncying correctely, wait for the ledeger to be come in synced state, even after this ledger is synced new recent ledeger will download and at this time horizon API interaction(only submission to network) is not possible. retrieval will work fine. in my case, the weak network connection may be the issue

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.