Corda NewBie Trying to Write Custom Smart Contracts and Deploy the same


(aswink) #1

Hello All,
I have been able to successfully start my nodes from corda-templates but I am not sure I am making progress in the right direction.

  1. Downloaded the code from Git – Success
  2. Did a ./gradlew install successfully and build is ready.
  3. navigated to the IRS Demo and deployed the nodes using ./gradlew samples:irs-demo:deployNodes then…
  4. Ran a ./gradlew samples:irs-demo:installDistat this point

Logs can be found in : /opt/Workspace/corda/samples/irs-demo/build/nodes/NotaryService/logs
Database connection url is : jdbc:h2:tcp://URL:38179/node
Database connection url is : jdbc:h2:tcp://URL:34177/node
Database connection url is : jdbc:h2:tcp://URL:41352/node

Listening on address : localhost:10002

RPC service listening on address : localhost:10003

Providing network services : corda.notary.validating, corda.interest_rates
Loaded plugins : net.corda.irs.plugin.IRSPlugin
Node for “R3” started up and registered in 37.85 sec
^C
corda_admin@block:/opt/Workspace/corda/samples/irs-demo/build$

Listening on address : 127.0.0.1:10005

RPC service listening on address : localhost:10006
Loaded plugins : net.corda.irs.plugin.IRSPlugin
Node for “Bank A” started up and registered in 50.39 sec
Listening on address : 127.0.0.1:10008
RPC service listening on address : localhost:10009
Loaded plugins : net.corda.irs.plugin.IRSPlugin
Node for “Bank B” started up and registered in 65.29 sec

this is the stack i have. I am unable to proceed on to view the
http://URL:10007/web/irsdemo

not sure where or what i am missing.

But the webPort of bank A, bank B and Notary @ http://URL:10004, @ http://URL:10007, @ http://URL:10010 doesn’t run. Probably I am missing something here.

Intent : once i get a grasp of this demo i need to push my custom app(M.E.A.N Stack Development)into the corda fabric and view the using
http://URL:10007/web/mycustomdemo

spent a solid 2 weeks and am stuck at displaying the UI components of the demo.

kindly drop in some bullet points so i can babystep to accomplish what i intent

thank you all !!!


(Richard Green) #2

Just to confirm - URL - you mean localhost ? Or the IP your machine is at?

What error do you get ? Is it 404 or “Server not running” ?

We did seperate the webserver from the Corda node so it may be you need to start this up independantly. If you could attach / include the whole console trace that would help see if it started or not.

Regards,
Richard.


(aswink) #3

URL is my external IP, since it is a public forum i am referring to it like that…
I get this :

Blockquote
This site can’t be reached ERR_CONNECTION_REFUSED

BUILD SUCCESSFUL

Total time: 30.055 secs
corda_admin@cch1wtbloc01:/opt/Workspace/corda$ sudo ./samples/simm-valuation-demo/build/nodes/runnodes
Starting nodes in /opt/Workspace/corda/samples/simm-valuation-demo/build/nodes
Starting corda.jar in /opt/Workspace/corda/samples/simm-valuation-demo/build/nodes/BankB on debug port 5005
Starting corda-webserver.jar in /opt/Workspace/corda/samples/simm-valuation-demo/build/nodes/BankB on debug port 5006
Starting corda.jar in /opt/Workspace/corda/samples/simm-valuation-demo/build/nodes/BankC on debug port 5007
Starting corda-webserver.jar in /opt/Workspace/corda/samples/simm-valuation-demo/build/nodes/BankC on debug port 5008
Starting corda.jar in /opt/Workspace/corda/samples/simm-valuation-demo/build/nodes/NotaryService on debug port 5009
Starting corda.jar in /opt/Workspace/corda/samples/simm-valuation-demo/build/nodes/BankA on debug port 5010
Starting corda-webserver.jar in /opt/Workspace/corda/samples/simm-valuation-demo/build/nodes/BankA on debug port 5011
Started 7 processes
Finished starting nodes
corda_admin@cch1wtbloc01:/opt/Workspace/corda$ Listening for transport dt_socket at address: 5006
Unknown command line arguments: no-local-shell is not a recognized option
Listening for transport dt_socket at address: 5005
Listening for transport dt_socket at address: 5008
Listening for transport dt_socket at address: 5011
Unknown command line arguments: no-local-shell is not a recognized option
Unknown command line arguments: no-local-shell is not a recognized option
Listening for transport dt_socket at address: 5010
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/root/.capsule/apps/net.corda.node.Corda_0.12.1/log4j-slf4j-impl-2.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/Workspace/corda/samples/simm-valuation-demo/build/nodes/BankB/dependencies/log4j-slf4j-impl-2.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Listening for transport dt_socket at address: 5007
Listening for transport dt_socket at address: 5009
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/root/.capsule/apps/net.corda.node.Corda_0.12.1/log4j-slf4j-impl-2.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/Workspace/corda/samples/simm-valuation-demo/build/nodes/BankA/dependencies/log4j-slf4j-impl-2.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/root/.capsule/apps/net.corda.node.Corda_0.12.1/log4j-slf4j-impl-2.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/Workspace/corda/samples/simm-valuation-demo/build/nodes/BankC/dependencies/log4j-slf4j-impl-2.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/root/.capsule/apps/net.corda.node.Corda_0.12.1/log4j-slf4j-impl-2.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/Workspace/corda/samples/simm-valuation-demo/build/nodes/NotaryService/dependencies/log4j-slf4j-impl-2.7.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]


/ / ___/ / _
/ / __ / / __ / __ `/ It runs on the JVM because QuickBasic
/ /
/
/ / / / /
/ / /
/ / is apparently not ‘professional’ enough.
_
/ /
/ _,/_,/

— Corda Open Source 0.12.1 (4bae70a) -----------------------------------------------

New! Training now available worldwide, see https://corda.net/corda-training/

Logs can be found in : /opt/Workspace/corda/samples/simm-valuation-demo/build/nodes/BankB/logs


/ / ___/ / _
/ / __ / / __ / __ `/ It runs on the JVM because QuickBasic
/ /
/
/ / / / /
/ / /
/ / is apparently not ‘professional’ enough.
_
/ /
/ _,/_,/

— Corda Open Source 0.12.1 (4bae70a) -----------------------------------------------

New! Training now available worldwide, see https://corda.net/corda-training/

Logs can be found in : /opt/Workspace/corda/samples/simm-valuation-demo/build/nodes/NotaryService/logs


/ / ___/ / _
/ / __ / / __ / __ `/ Top tip: never say “oops”, instead
/ /
/
/ / / / /
/ / /
/ / always say “Ah, Interesting!”
_
/ /
/ _,/_,/

— Corda Open Source 0.12.1 (4bae70a) -----------------------------------------------

New! Training now available worldwide, see https://corda.net/corda-training/

Logs can be found in : /opt/Workspace/corda/samples/simm-valuation-demo/build/nodes/BankA/logs


/ / ___/ / _
/ / __ / / __ / __ `/ Top tip: never say “oops”, instead
/ /
/
/ / / / /
/ / /
/ / always say “Ah, Interesting!”
_
/ /
/ _,/_,/

— Corda Open Source 0.12.1 (4bae70a) -----------------------------------------------

New! Training now available worldwide, see https://corda.net/corda-training/

Logs can be found in : /opt/Workspace/corda/samples/simm-valuation-demo/build/nodes/BankC/logs
Database connection url is : jdbc:h2:tcp://URL:41753/node
Database connection url is : jdbc:h2:tcp://URL:43978/node
Database connection url is : jdbc:h2:tcp://URL:41300/node
Database connection url is : jdbc:h2:tcp://URL:42682/node
Listening on address : localhost:10002
Providing network services : corda.notary.validating
Loaded plugins : net.corda.vega.services.SimmService
Node for “R3” started up and registered in 50.28 sec
Listening on address : 127.0.0.1:10004
Listening on address : 127.0.0.1:10008
Loaded plugins : net.corda.vega.services.SimmService
Loaded plugins : net.corda.vega.services.SimmService
Node for “Bank A” started up and registered in 79.06 sec
Node for “Bank C” started up and registered in 79.39 sec
Listening on address : 127.0.0.1:10006
Loaded plugins : net.corda.vega.services.SimmService
Node for “Bank B” started up and registered in 94.84 sec

I shall try to articulate my issue again :
–> I am running the corda set up on Ubuntu16 on a VM cloud hosted within our network. This Ubuntu is console based no GUI,
–> I intent to Browse to http://localhost:10005/web/simmvaluationdemo to view the Pages from my local machine.external to this Ubuntu.
–> this 10005 webserver port not listed anywhere except a single reference to webserver but on different port

Starting corda-webserver.jar in /opt/Workspace/corda/samples/simm-valuation-demo/build/nodes/BankA on debug port 5011(check above stack).

i have changed the node.config file still no effect !

thank you


(aswink) #4

–> I intent to Browse to http://localhost:10005/web/simmvaluationdemo to view the Pages from my local machine.external to this Ubuntu.

if i were to type http://URL:10005/web/simmvaluationdemo i should be able to see the UI which current is not happening on any of the demos(IRS nor this simm demo).


(aswink) #5

“Please note that any URL path information after simmvaluationdemo should not be bookmarked or navigated to directly, as it is only provided for aesthetic purposes.”

noticed this as well !!

corda_admin@cch1wtbloc01:~$ curl 'http://URL:10008/' 
curl: (52) Empty reply from server

and not sure if i remember watching the webserver ports ?
the apache2 that comes default with the package is running properly on http://URL:8090/ which i was able to access from my browser(local machine)