Code Monkey home page Code Monkey logo

swarmdb's Issues

install-boost.sh fails on macOS

macOS 10.13.6

How to reproduce.
Follow the instructions in the readme to install boost from the provided bash script in swarmDB/toolchain.

Result.
~ is taken literally and the install path will end up in /Users/username/swarmDB/toolchain/~/myboost/1_67_0/~/myboost

A workaround is to install boost with homebrew

No leader elected

System
Raspberry Pi 2 Model B
Raspbian GNU/Linux 9.3 (stretch)

I followed the build instructions and spawned each node in separate screen shells with
ETHERSCAN_IO_API_TOKEN=MY_TOKEN ./the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58001
ETHERSCAN_IO_API_TOKEN=MY_TOKEN ./the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58002
etc

The first time all worked well and I could see the heartbeats from the leader node in its console. I could add a new value and see it propagate, however after shutting them all down (cltr-c) and doing the same thing over, no leader seems to be elected, they all have the text "I am follower" in their consoles. I rebooted the system and gave it another go with the same results.

running on Mac terminal

I've worked my way through the READ ME and found equivalents to the Mac terminal cmds to set up the application. I'm currently stuck at:

RUNNING THE APPLICATION

Create 'peers' file in the same directory where the_db executable is located. Peers file contains the list of known nodes. Here is the example of peers file for 5 nodes running on localhost (';' can be used to comment lines):

; Comment
node_1=localhost:58001
node_2=localhost:58002
node_3=localhost:58003
node_4=localhost:58004
node_5=localhost:58005

Create simpe shell script to start multiple nodes. Below is the script for Ubuntu Linux:
#!/bin/bash

gnome-terminal -x bash -c './the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58001'
gnome-terminal -x bash -c './the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58002'
gnome-terminal -x bash -c './the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58003'
gnome-terminal -x bash -c './the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58004'
gnome-terminal -x bash -c './the_db --address 0x006eae72077449caca91078ef78552c0cd9bce8f --port 58005'

I've made the peers file, but it doesn't seem to pull from it. Also, I can't seem to figure out how to re-write the shell script so that it will function in the Mac terminal. genome-terminal is an unknown command. I'm still very noobish with most of this. Any help figuring this out would be greatly appreciated!

Problem with connection (probably the leader is down)

Hi,

I'm getting a problem with the connection. Seems that there is a problem related to the leader falling and other nodes not getting elected in time or the redirection not happening. The response is as follows:

Could not open socket to "13.78.131.94:51010": Connection refused (61).

It happened after I insist a few times (maybe 10?) with the same request data:

{
    "bzn-api": "crud",
    "cmd": "read",
    "data": {"key":"1"},
    "db-uuid": "my huge hash",
    "request-id": 4
}

Considerations:

  • My request ID is hardcoded with "4" (is this a good idea?).
  • I use to attempt new requests in every 2 or 3 seconds (sometimes I loop requesting, is it expected to accept this conditions?)
  • It is a really hard bug to reproduce.

If there is any feedback on that, let me know. Thanks in advance!

no install step created on debian

on Debian 9 and 10, sudo make install will return

make: *** No rule to make target 'install'. Stop.

This can be remedied by commenting out the following two lines in swarmDB/pkg/CMakeLists.txt

if (UNIX AND NOT APPLE)
    find_program(LSB_RELEASE lsb_release)
    execute_process(COMMAND ${LSB_RELEASE} -is
        OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT
        OUTPUT_STRIP_TRAILING_WHITESPACE
    )
  #  if (${LSB_RELEASE_ID_SHORT} STREQUAL "Ubuntu")
        add_subdirectory(debian)
  #  endif()
endif()

if (APPLE)
    add_subdirectory(osx)
endif()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.