mceme / ImageCoin

ImageCoin create the blockchain to send privacy images in own blockchain !
http://imagecoin.imagehosty.com
MIT License
3 stars 1 forks source link

Watchdog expired - missing Sentinel #35

Closed edgeball closed 5 years ago

edgeball commented 5 years ago

I'm getting the Message "WATCHDOG EXPIRED" I think it's because Sentinel is missing. How can I install that?

mceme commented 5 years ago

Sentinel

https://github.com/mceme/Sentinel

edgeball commented 5 years ago

I know, but I think that one has some configs from sibcoin..

mceme commented 5 years ago

can change : ) send you some coins

edgeball commented 5 years ago

Can you help me changing it accordingly?

I get this when I try to start sentinel:

[error]: unable to open database file Cannot connect to database. Please ensure database service is running and user access is properly configured in 'sentinel.conf'.

mceme commented 5 years ago

sibcoin_conf=/root/.imagecoincore/imagecoin.conf

valid options are mainnet, testnet (default=mainnet)

network=mainnet

network=testnet

database connection details

db_name=database/sentinel.db db_driver=sqlite

edgeball commented 5 years ago

Thanks that changed it abit I'm running this ./venv/bin/py.test ./test

======================================================================== test session starts ======================================================================== platform linux2 -- Python 2.7.15rc1, pytest-3.0.1, py-1.4.31, pluggy-0.3.1 rootdir: /root/ImageCoin/imginstall/sentinel, inifile: collected 23 items

test/integration/test_jsonrpc.py F test/unit/test_dash_config.py . test/unit/test_dashd_data_shims.py .. test/unit/test_dashy_things.py ...... test/unit/test_misc.py . test/unit/test_models.py .. test/unit/test_submit_command.py . test/unit/models/test_proposals.py ...F test/unit/models/test_superblocks.py ....F

============================================================================= FAILURES ============================================================================== ____ testdashd ____

def test_dashd():
    config_text = SibcoinConfig.slurp_config_file(config.sibcoin_conf)
    network = 'mainnet'
    is_testnet = False
    genesis_hash = u'00000c492bf73490420868bc577680bfc4c60116e7e85343bc624787c21efa4c'
    for line in config_text.split("\n"):
        if line.startswith('testnet=1'):
            network = 'testnet'
            is_testnet = True
            genesis_hash = u'00000617791d0e19f524387f67e558b2a928b670b9a3b387ae003ad7f9093017'

    creds = SibcoinConfig.get_rpc_creds(config_text, network)
    sibcoind = SibcoinDaemon(**creds)
    assert sibcoind.rpc_command is not None

    assert hasattr(sibcoind, 'rpc_connection')

    # Dash testnet block 0 hash == 00000617791d0e19f524387f67e558b2a928b670b9a3b387ae003ad7f9093017
    # test commands without arguments
  info = sibcoind.rpc_command('getinfo')

test/integration/test_jsonrpc.py:34:


lib/dashd.py:42: in rpc_command return self.rpc_connection.getattr(params[0])(*params[1:]) venv/local/lib/python2.7/site-packages/bitcoinrpc/authproxy.py:136: in call 'Content-type': 'application/json'}) /usr/lib/python2.7/httplib.py:1042: in request self._send_request(method, url, body, headers) /usr/lib/python2.7/httplib.py:1082: in _send_request self.endheaders(body) /usr/lib/python2.7/httplib.py:1038: in endheaders self._send_output(message_body) /usr/lib/python2.7/httplib.py:882: in _send_output self.send(msg) /usr/lib/python2.7/httplib.py:844: in send self.connect() /usr/lib/python2.7/httplib.py:821: in connect self.timeout, self.source_address)


address = ('127.0.0.1', 1944), timeout = 30, source_address = None

def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
                      source_address=None):
    """Connect to *address* and return the socket object.

    Convenience function.  Connect to *address* (a 2-tuple ``(host,
    port)``) and return the socket object.  Passing the optional
    *timeout* parameter will set the timeout on the socket instance
    before attempting to connect.  If no *timeout* is supplied, the
    global default timeout setting returned by :func:`getdefaulttimeout`
    is used.  If *source_address* is set it must be a tuple of (host, port)
    for the socket to bind as a source address before making the connection.
    A host of '' or port 0 tells the OS to use the default.
    """

    host, port = address
    err = None
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
        af, socktype, proto, canonname, sa = res
        sock = None
        try:
            sock = socket(af, socktype, proto)
            if timeout is not _GLOBAL_DEFAULT_TIMEOUT:
                sock.settimeout(timeout)
            if source_address:
                sock.bind(source_address)
            sock.connect(sa)
            return sock

        except error as _:
            err = _
            if sock is not None:
                sock.close()

    if err is not None:
      raise err

E error: [Errno 111] Connection refused

/usr/lib/python2.7/socket.py:575: error _ test_approved_and_ranked __

go_list_proposals = [{'AbsoluteYesCount': 11, 'AbstainCount': 0, 'CollateralHash': '996eae8ba8dbe5152ccb302ba513cf59b79fa95a7899fe34519804...43930333131303237222c2274797065223a312c2275726c223a2268747470733a2f2f736962636f696e2e6f72672f7465737432227d5d5d', ...}]

def test_approved_and_ranked(go_list_proposals):
    from sibcoind import SibcoinDaemon
    sibcoind = SibcoinDaemon.from_sibcoin_conf(config.sibcoin_conf)

    for item in go_list_proposals:
      (go, subobj) = GovernanceObject.import_gobject_from_dashd(sibcoind, item)

test/unit/models/test_proposals.py:245:


lib/models.py:159: in import_gobject_from_dashd govobj.vote_delete(dashd) lib/models.py:173: in vote_delete self.vote(dashd, VoteSignals.delete, VoteOutcomes.yes) lib/models.py:212: in vote output = dashd.rpc_command(vote_command) lib/dashd.py:42: in rpc_command return self.rpc_connection.getattr(params[0])(params[1:]) venv/local/lib/python2.7/site-packages/bitcoinrpc/authproxy.py:136: in call 'Content-type': 'application/json'}) /usr/lib/python2.7/httplib.py:1042: in request self._send_request(method, url, body, headers) /usr/lib/python2.7/httplib.py:1082: in _send_request self.endheaders(body) /usr/lib/python2.7/httplib.py:1038: in endheaders self._send_output(message_body) /usr/lib/python2.7/httplib.py:882: in _send_output self.send(msg) /usr/lib/python2.7/httplib.py:844: in send self.connect() /usr/lib/python2.7/httplib.py:821: in connect self.timeout, self.source_address)


address = ('127.0.0.1', 11944), timeout = 30, source_address = None

def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
                      source_address=None):
    """Connect to *address* and return the socket object.

    Convenience function.  Connect to *address* (a 2-tuple ``(host,
    port)``) and return the socket object.  Passing the optional
    *timeout* parameter will set the timeout on the socket instance
    before attempting to connect.  If no *timeout* is supplied, the
    global default timeout setting returned by :func:`getdefaulttimeout`
    is used.  If *source_address* is set it must be a tuple of (host, port)
    for the socket to bind as a source address before making the connection.
    A host of '' or port 0 tells the OS to use the default.
    """

    host, port = address
    err = None
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
        af, socktype, proto, canonname, sa = res
        sock = None
        try:
            sock = socket(af, socktype, proto)
            if timeout is not _GLOBAL_DEFAULT_TIMEOUT:
                sock.settimeout(timeout)
            if source_address:
                sock.bind(source_address)
            sock.connect(sa)
            return sock

        except error as _:
            err = _
            if sock is not None:
                sock.close()

    if err is not None:
      raise err

E error: [Errno 111] Connection refused

/usr/lib/python2.7/socket.py:575: error __ test_deterministic_superblock_selection __

go_list_superblocks = [{'AbsoluteYesCount': 1, 'AbstainCount': 0, 'CollateralHash': '0000000000000000000000000000000000000000000000000000000...1796d656e745f616d6f756e7473223a202232352e37353030303030307c32352e3735303030303030222c202274797065223a20327d5d5d', ...}]

def test_deterministic_superblock_selection(go_list_superblocks):
    from sibcoind import SibcoinDaemon
    sibcoind = SibcoinDaemon.from_sibcoin_conf(config.sibcoin_conf)

    for item in go_list_superblocks:
      (go, subobj) = GovernanceObject.import_gobject_from_dashd(sibcoind, item)

test/unit/models/test_superblocks.py:238:


lib/models.py:159: in import_gobject_from_dashd govobj.vote_delete(dashd) lib/models.py:173: in vote_delete self.vote(dashd, VoteSignals.delete, VoteOutcomes.yes) lib/models.py:212: in vote output = dashd.rpc_command(vote_command) lib/dashd.py:42: in rpc_command return self.rpc_connection.getattr(params[0])(params[1:]) venv/local/lib/python2.7/site-packages/bitcoinrpc/authproxy.py:136: in call 'Content-type': 'application/json'}) /usr/lib/python2.7/httplib.py:1042: in request self._send_request(method, url, body, headers) /usr/lib/python2.7/httplib.py:1082: in _send_request self.endheaders(body) /usr/lib/python2.7/httplib.py:1038: in endheaders self._send_output(message_body) /usr/lib/python2.7/httplib.py:882: in _send_output self.send(msg) /usr/lib/python2.7/httplib.py:844: in send self.connect() /usr/lib/python2.7/httplib.py:821: in connect self.timeout, self.source_address)


address = ('127.0.0.1', 11944), timeout = 30, source_address = None

def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT,
                      source_address=None):
    """Connect to *address* and return the socket object.

    Convenience function.  Connect to *address* (a 2-tuple ``(host,
    port)``) and return the socket object.  Passing the optional
    *timeout* parameter will set the timeout on the socket instance
    before attempting to connect.  If no *timeout* is supplied, the
    global default timeout setting returned by :func:`getdefaulttimeout`
    is used.  If *source_address* is set it must be a tuple of (host, port)
    for the socket to bind as a source address before making the connection.
    A host of '' or port 0 tells the OS to use the default.
    """

    host, port = address
    err = None
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
        af, socktype, proto, canonname, sa = res
        sock = None
        try:
            sock = socket(af, socktype, proto)
            if timeout is not _GLOBAL_DEFAULT_TIMEOUT:
                sock.settimeout(timeout)
            if source_address:
                sock.bind(source_address)
            sock.connect(sa)
            return sock

        except error as _:
            err = _
            if sock is not None:
                sock.close()

    if err is not None:
      raise err

E error: [Errno 111] Connection refused

/usr/lib/python2.7/socket.py:575: error ================================================================ 3 failed, 20 passed in 0.95 seconds ================================================================

edgeball commented 5 years ago

if I just enter: ./venv/bin/python bin/sentinel.py [Errno 111] Connection refused Cannot connect to sibcoind. Please ensure sibcoind is running and the JSONRPC port is open to Sentinel.

mceme commented 5 years ago

enter in Sentinel /lib folder there sibcoind and sibcoin_config files pyton, need change to ImageCoin configuration .

edgeball commented 5 years ago

that's what I thought

can I do search replace?

Or can you send them here so that I can import it?

mceme commented 5 years ago

yes replace it,

edgeball commented 5 years ago

yeah, that's not so easy. I need to edit also the sentinel.py which I think I messed up now...

./venv/bin/python bin/sentinel.py Traceback (most recent call last): File "bin/sentinel.py", line 248, in main() File "bin/sentinel.py", line 161, in main dashd = imagecoinDaemon.from_imagecoin_conf(config.imagecoin_conf) AttributeError: 'module' object has no attribute 'imagecoin_conf'

mceme commented 5 years ago

check now https://github.com/mceme/sentinel

files changed

working

edgeball commented 5 years ago

All good now.

Cheers mate!