codius / codius Goto Github PK
View Code? Open in Web Editor NEWCodius Monorepo
Home Page: https://codius.org
Codius Monorepo
Home Page: https://codius.org
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.
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
Add support to codius cli to allow tailing of logs if you know the host, manifest hash, and the manifest is in debug mode.
Use 3 files in a directory:
codius.json
codiusvars.json
to create default.codiusstate.json which tracks the state of the upload.
Host: https://codius.codiusx.com/version
Website: http://www.codiusx.com
E-mail: [email protected]
Thanks.
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
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
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.
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.
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' } ]
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.
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
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
https://github.com/codius/codius/blob/master/src/handlers/upload.js#L83
Right now, codius uploads to one host after another using this for loop. If we did Promise.all it would go many times faster when uploading to several hosts
Setup the Codius CLI to provide server status and config management using APIs exposed from:
codius/codiusd#32
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
After dealing with this frustratingly issue, it would be nice to have the CLI warn you when you don't specify a port. Usually it's not what you mean to do
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.