Git Product home page Git Product logo

old-codius-cli's People

Contributors

fjx2000 avatar justmoon avatar njlie avatar snyk-bot avatar spearl avatar traviscrist avatar vernonjohnson avatar wilsonianb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

old-codius-cli's Issues

Moneyd - Cannot connect to blocked account. reconfigure your uplink to connect with a new payment channel.

Hello,
I want to try run codius host on my server, but I have problem with starting moneyd.

While installing I set wallet withou XRP reserve it caused problem with running moneyd. So I close channel by moneyd xrp:cleanup and delete /root/.moneyd.json configuration. Deposit wallet. After that i reconfigure it by moneyd xrp:configure.

Now when I want start moneyd by moneyd xrp:start, console log error
(node:8601) UnhandledPromiseRejectionWarning: Error: {"code":"F00","name":"NotAcceptedError","triggeredAt":"2018-10-29T13:33:56.935Z","data":"cannot connect to blocked account. reconfigure your uplink to connect with a new payment channel. reason=channel is closing/closed. channelId=xxxxx","protocolData":[]}

I try several times repeat this process with cleanup, confgure etc. but rly dont know what to do more. (moneyd xrp:info show no opened channels)

Xrp addr: rUv9yjt1MzYY2kK9Vo4MNgZCKAs52dXcuX

Do you have some idea where can be a problem please?

Thank you
Daniel

Issue with absolute URL

FAIL:
codius upload create-react-app-manifest.json -h codius.ripple-ledger.com

PASS:

codius upload create-react-app-manifest.json -h https://codius.ripple-ledger.com 
Successfully Uploaded Pods to:
[ { url:
     'https://lg6gjhhh2b3if2tzpbms6cr3hdmh7dixa2v4an6pz4tdxdmqtjpa.codius.ripple-ledger.com/',
    manifestHash: 'lg6gjhhh2b3if2tzpbms6cr3hdmh7dixa2v4an6pz4tdxdmqtjpa',
    host: 'https://codius.ripple-ledger.com',
    expiry: '2018-06-24T16:08:40.783Z',
    expirationDate: '06-24-2018 5:08:40 +0100',
    expires: 'in 9 minutes',
    pricePaid: '229' } ]

VERBOSE ISSUE:

clientAddress=g.scylla.client.flMZea1ZqFtkeoSxtyK7GtHfcF4vM4Z22qMV8wS2lGs.local._hKuRld7Knh6BtX0-5Oq9rl2ygZJ2QGs97jFCKKXz6E assetScale=6 assetCode=XRP +0ms
  codius-cli:price Total Amount in units: 22821 +47ms
  codius-cli:uploadHandler Max price in units 22821 +0ms
  ilp-fetch attempting http request. url=codius2.justmoon.com/pods?duration=600 opts= { headers:
   { Accept: 'application/codius-v1+json',
     'Content-Type': 'application/json' },
  method: 'OPTIONS',
  body:
   '{"manifest":{"name":"my-codius-create-react-app","version":"1.0.0","machine":"small","port":"3000","containers":[{"id":"app","image":"androswong418/example-pod-1@sha256:8933bced1637e7d3b08c4aa50b96a45aef0b63f504f595bb890f57253af68b11"}]}}' } +0ms
Fetching price quote from host codius2.justmoon.com failed, please try again
TypeError: Only absolute URLs are supported
    at getNodeRequestOptions (/usr/lib/node_modules/codius/node_modules/node-fetch/lib/index.js:1284:9)
    at /usr/lib/node_modules/codius/node_modules/node-fetch/lib/index.js:1370:19
    at new Promise (<anonymous>)
    at fetch (/usr/lib/node_modules/codius/node_modules/node-fetch/lib/index.js:1367:9)
    at ilpFetch (/usr/lib/node_modules/codius/node_modules/ilp-fetch/index.js:29:26)
    at uploadToHosts (/usr/lib/node_modules/codius/src/handlers/upload.js:49:33)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  codius-cli:uploadHandler Error: Fetching price quote from host codius2.justmoon.com failed
  codius-cli:uploadHandler     at uploadToHosts (/usr/lib/node_modules/codius/src/handlers/upload.js:64:13)
  codius-cli:uploadHandler     at process._tickCallback (internal/process/next_tick.js:68:7) +5ms

WILL FIX TOMORROW

Host under Wiki

Hey all,

Would love to have my host displayed under the wiki – please let me know if you're able to add:

1.codius.ca

Maiden upload to host always fails. Subsequent are fine.

I've seen this issue on about 10 different codius hosts (unsure if to post issue here as I was using CLI, or on codiusd repo as it's when I'm connecting to a codiusd host).

The very first time uploading to a codius host after it has gone live returns a invalid json body error. Any subsequent attempt to upload works flawlessly.

[root@host1 ~]# codius upload /tmp/example-manifest.json --host https://codius-1.logancodius.xyz --duration 300
Failed To Upload Pods to:
[ { error:
     'invalid json response body at https://codius-1.logancodius.xyz/pods?duration=300 reason: Unexpected token < in JSON at position 0',
    host: 'https://codius-1.logancodius.xyz',
    status: 504,
    statusText: 'Gateway Time-out' } ]
[root@host1 ~]# codius upload /tmp/example-manifest.json --host https://codius-1.logancodius.xyz --duration 300


[root@host1 ~]# codius upload /tmp/example-manifest.json --host https://codius-1.logancodius.xyz --duration 300
Successfully Uploaded Pods to:
[ { url:
     'https://lg6gjhhh2b3if2tzpbms6cr3hdmh7dixa2v4an6pz4tdxdmqtjpa.codius-1.logancodius.xyz/',
    manifestHash: 'lg6gjhhh2b3if2tzpbms6cr3hdmh7dixa2v4an6pz4tdxdmqtjpa',
    host: 'https://codius-1.logancodius.xyz',
    expiry: '2018-06-18T06:00:34.171Z',
    expirationDate: '06-18-2018 6:00:34 +0000',
    expires: 'in 10 minutes',
    pricePaid: '1141' } ]

Don't hide errors on normal execution

People are trying to test their codius host setups using the example on the codius tutorial and/or codius-example repo.

In the failure case, the cli just returns empty - the user doesn't know what went wrong.

They can get the full log using DEBUG=*, but that's not very intuitive (I actually discovered this looking into the source code - good ol debug module - even the readme for this repo doesn't mention it).

Strong urge that errors are outputted to console with a short blurb on how to get the full debug logs.

MVP

  • Upload support uploading pods to hosts
  • Extend support extending pods on hosts

Use 3 files in a directory:
codius.json
codiusvars.json
to create default.codiusstate.json which tracks the state of the upload.

Pod upload error: Could not locate bindings file

Installing Codius and attempting to upload a pod trows the following error:

/usr/lib/node_modules/codius/node_modules/bindings/bindings.js:93
  err = new Error('Could not locate the bindings file. Tried:\n'
        ^
Error: Could not locate the bindings file. Tried:
 → /usr/lib/node_modules/codius/node_modules/leveldown/build/leveldown.node
 → /usr/lib/node_modules/codius/node_modules/leveldown/build/Debug/leveldown.node
 → /usr/lib/node_modules/codius/node_modules/leveldown/build/Release/leveldown.node
 → /usr/lib/node_modules/codius/node_modules/leveldown/out/Debug/leveldown.node
 → /usr/lib/node_modules/codius/node_modules/leveldown/Debug/leveldown.node
 → /usr/lib/node_modules/codius/node_modules/leveldown/out/Release/leveldown.node
 → /usr/lib/node_modules/codius/node_modules/leveldown/Release/leveldown.node
 → /usr/lib/node_modules/codius/node_modules/leveldown/build/default/leveldown.node
 → /usr/lib/node_modules/codius/node_modules/leveldown/compiled/10.4.1/linux/x64/leveldown.node
    at bindings (/usr/lib/node_modules/codius/node_modules/bindings/bindings.js:93:9)
    at Object.<anonymous> (/usr/lib/node_modules/codius/node_modules/leveldown/leveldown.js:3:36)
    at Module._compile (internal/modules/cjs/loader.js:702:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:713:10)
    at Module.load (internal/modules/cjs/loader.js:612:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:551:12)
    at Function.Module._load (internal/modules/cjs/loader.js:543:3)
    at Module.require (internal/modules/cjs/loader.js:650:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/usr/lib/node_modules/codius/node_modules/level/level.js:1:44)

However, navigating to /usr/lib/node_modules/codius/node_modules/ and executing npm rebuild seems to fix the issue.

Hope this helps.

codius + moneyd running on the client side - upload never works

I finally managed to create my own sample app:

https://github.com/theogravity/codius-hello-world

and I'm able to run the manifest on the machine where the Codius server runs, but I'm unable to run it from my laptop, where I have moneyd running (not on testnet).

The codius execution just stalls after a certain point - unsure what's the issue.

I've attached logs of the codius execution and a snippet from moneyd

codius-client.txt
moneyd.txt

Feature Request - make codius accept a list of hosts to choose from

As my company is moving towards codius we want to initially use our hosts for launching pods.

It would be nice to have codius accept a list to choose a host from depending on availability.
That way we can nice and easily expand our trusted hosts in a list instead of making tons of different cases or wrapping it ourselves

Suggestions on usability and security

there is no ILP filtering, priority. If you have a upstream i dont trust i cant prevent you from adding it into my routing table ... nor can i say this route is shorting with prio if i think mlab1 <-> mlab2 is better then using mlab1<->other to reach a peer

please use the BGP / peering methods as an example. Also try to make the config generic so they are the same on both sides and have the plugin(s) figure out the best way to setup the connections

Also the moneyd sometimes show 'connected' likely because the session is up ... but its not learning routes (e.g. with payment channel failed). this gives false info. Also when restarting the moneyd admin gui never starts if there is 1 single peer failing (same scenario of a failed payment channel, reproduceable)

there is no way (havent found it yet) to get into a pod, see whats running on it and do forensics, i can access the image filesystem though

there is no way to ban/block a XRP address from adding contracts, a malicious XRP address can send me a phishing website wrapped in a contract and keeps doing it unless i shutdon the server

Use fetched price quote for max price during upload

When uploading to hosts we check that the hosts price is less than the max price provided by getting a quote. Once this quote is received we should use its value instead of the max price during the upgrade to hold the host to the quote.

Average load take into account the amount of cores

As a default the os.loadavg() showcases values based on cores. Therefore a 1.0 equals 100% utilization based on a single core system. In a dual core system 2.0 would be the same and 4.0 in a quad core system and so forth.

Running a multi-core setup this would however make the server look overused and make developers choose another host eventhough there was a lot of processing power left. They have to have a way to know what number is the max to get an idea of the utilization of the system ressources.

I suggest that the averageload is changed to os.loadavg() / core count to give a more valid representation or atleast as a minimum add information about the core count in /info

Upload pod failed with account problem.

I'm testing the codius host.
moneyd and codiusd are listening.
But when I upload a pod, I got error messages like bellow;
errors

I created and removed the payment channel several times by using following command;
moneyd xrp:cleanup

Thank you.

Add log tailing cli support

Add support to codius cli to allow tailing of logs if you know the host, manifest hash, and the manifest is in debug mode.

stale contracts

Over time some contracts seem to be stacking up and keep running. Codius lists no running contracts, but there are active containers. They are not accessible from the internet, but still running.

I suggest codius keeps a track and kills containers that past expiry as a safegaurd.

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.