I am trying to get news.arc running on Redhat's Openshift. (DIY Cartridge using Raycine's instructions to get racket running) Here are the steps that I have followed 1. Get the DIY cartridge running using raycine's instructions from here - https://github.com/RayRacine/rackos/wiki/Quick-Start 2. Get anarki's news.arc from here
https://github.com/arclanguage/anarki/ On deploying the code, racket is installed, however I don't know how to pass arc prompt arguments. So, I ssh into the openshift server and do the following
$racket -f as.scm
arc>(load "lib/news.arc")
arc>(nsv)
Error: "tcp-listen: listen failed\n port number: 8080\n system error: Permission denied; errno=13" I found this thread - http://arclanguage.com/item?id=7731 which has a similar error. Openshift allows usage of 8080 port which news.arc uses by default. However, Openshift requires using their internal IP ($OPENSHIFT_DIY_IP). I tried finding a way to specify an ip for tcp-listen. (Racket's tcp-listen documentation is here - http://docs.racket-lang.org/reference/tcp.html) Here are some ?relevant lines from ac.scm (https://github.com/arclanguage/anarki/blob/master/ac.scm) (xdef open-socket (lambda (num) (tcp-listen num 50 #t)))
(xdef socket-connect (lambda (host port)
(ar-init-socket
(lambda () (tcp-connect host port)))))
(xdef ssl-connect (lambda (host port)
(ar-init-socket
(lambda () (ssl-connect host port)))))
lang.arc has these lines, however I doubt lib/lang.arc is called when I load news.arc (I tried replacing the ip with the value of $OPENSHIFT_DIY_IP but same result)reactor.connectTCP("localhost", «lang-control-port», ControlClientFactory())
reactor.listenTCP(«lang-listen-port!python», site, interface='127.0.0.1') Can somebody suggest a solution? How do I specify a hostname for tcp-listen? |