Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Service run on production server stops #100

Open
anver opened this issue May 2, 2016 · 6 comments
Open

Service run on production server stops #100

anver opened this issue May 2, 2016 · 6 comments

Comments

@anver
Copy link

anver commented May 2, 2016

I run the wallet service on a production server as stated on the documentation, everything works fine for few hours or may be 24 or 48 hours but it stops for some reason where we end up in a mess, not able to generate address or do anything. So I tried to create a bash script and run it through cron job but I'm not sure what I'm doing wrong the api is not working as intended. Can someone fix this script so that I can run the cron job to check the service is always running.

Wallet-service version is 0.20.1
Node is v4.2.6

My bash script is this

!/bin/bash

make-run.sh

make sure a process is always running.

export DISPLAY=:0 #needed if you are running a simple gui app.

process=walletcron
makerun="/usr/local/bin/blockchain-wallet-service start --port 3000"
if ps ax | grep -v grep | grep $process > /dev/null
then
exit
else
$makerun &
fi
exit

@jtormey
Copy link
Contributor

jtormey commented May 2, 2016

Does the service output give you any indication as to why it stops working? Are there any errors appearing in the logs? Additional info would be helpful

@anver
Copy link
Author

anver commented May 3, 2016

This is the error log i pulled from nohup.out

1462035893668 - info: blockchain.info wallet service v0.20.1 running on http://127.0.0.1:3000
1462175862901 - info: blockchain.info wallet service v0.20.1 running on http://127.0.0.1:3000
1462188062629 - error: WebSocketError code=undefined
1462188072595 - error: WebSocketError code=undefined
1462206343270 - error: listen EADDRINUSE 127.0.0.1:3000
1462207034698 - info: blockchain.info wallet service v0.20.1 running on http://127.0.0.1:3000
1462207434717 - info: blockchain.info wallet service v0.20.1 running on http://127.0.0.1:3000
1462210040007 - error: WebSocketError code=undefined
1462212111688 - error: WebSocketError code=undefined
1462212732176 - error: WebSocketError code=undefined
1462212742132 - error: WebSocketError code=undefined
1462212752145 - error: WebSocketError code=undefined
1462217836256 - error: WebSocketError code=undefined
1462228344500 - error: WebSocketError code=undefined

@jtormey
Copy link
Contributor

jtormey commented May 3, 2016

The crash is most likely due to a bug in the version of the websocket library used by this service (see: websockets/ws#628). I'm in the process of upgrading it to a version where this is fixed.

@robsonhortela
Copy link

my service crash and show it on console:

node: ../src/node_zlib.cc:150: static void node::ZCtx::Write(const v8::FunctionCallbackInfov8::Value&) [with bool async = true]: Assertion `!ctx->pending_close_ && "close is pending"' failed.
Aborted (core dumped)

@jtormey
Copy link
Contributor

jtormey commented May 10, 2016

Are you on at least v0.21?

@bagz1021
Copy link

i am having the same problem on v0.21.4. the wallet service just crushed down on it's own without even showing error.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants