Arc Forumnew | comments | leaders | submitlogin
Can't access my server
3 points by ca 2905 days ago | 5 comments
I'm trying to get the news site running on a VM. Not using a web server. Everything is installed and running ./run-news brings up the Arc prompt and a message about port 8080 being ready.

But when I try and access the 192.168.56.121:8080 (IP of VM) it times out.

On the VM, curl -v -s http://localhost:8080/:

* Hostname was NOT found in DNS cache * Trying ::1... * Connected to localhost (::1) port 8080 (#0) > GET / HTTP/1.1 > User-Agent: curl/7.35.0 > Host: localhost:8080 > Accept: / > < HTTP/1.1 200 OK < Content-Type: text/html; charset=utf-8 < Connection: close < <html><head><link rel="stylesheet" type="text/css" href="news.css"> <link rel="shortcut icon" href=""> <meta name="viewport" content="width=device-width"> <script> function byId(id) { return document.getElementById(id); }

function vote(node) { var v = node.id.split(/_/); // {'up', '123'} var item = v[1];

  // adjust score
  var score = byId('score_' + item);
  var newscore = parseInt(score.innerHTML) + (v[0] == 'up' ? 1 : -1);
  score.innerHTML = newscore + (newscore == 1 ? ' point' : ' points');

  // hide arrows
  byId('up_'   + item).style.visibility = 'hidden';
  try { byId('down_' + item).style.visibility = 'hidden'; }
  catch(err) {} // ignore

  // ping server
  var ping = new Image();
  ping.src = node.href;

  return false; // cancel browser nav
} </script><title>My Forum</title></head><body><center><table border=0 cellpadding=0 cellspacing=0 width="85%" bgcolor=#f6f6ef><tr><td bgcolor=#b4b4b4><table border=0 cellpadding=0 cellspacing=0 width="100%" style="padding:2px"><tr><td style="width:18px;padding-right:4px"><a href="http://www.yourdomain.com"><img src="arc.png" width=18 height=18 style="border:1px #b4b4b4 solid;"></img></a></td><td style="line-height:12pt; height:10px;"><span class="pagetop"><b><a href="news">My Forum</a></b><img src="s.gif" height=1 width=10><a href="newest">new</a> | <a href="newcomments">comments</a> | <a href="leaders">leaders</a> | <a href="submit">submit</a></span></td><td style="text-align:right;padding-right:4px;"><span class="pagetop"><a href="/x?fnid=m5fyrD5sDO">login</a></span></td></tr></table></td></tr><tr style="height:10px"></tr><tr><td><table border=0 cellpadding=0 cellspacing=0></table></td></tr><tr><td><img src="s.gif" height=10 width=0><table width="100%" cellspacing=0 cellpadding=1><tr><td bgcolor=#b4b4b4></td></tr></table><br> * Closing connection 0 <center></center></td></tr></table></center></body></html>

This looks like it might be a webpage, but I'm not sure what the issue is and any help with this would be huge!



5 points by kinnard 2905 days ago | link

This is a stab in the dark but have you opened the port to receive connections from other "machines". Maybe the firewall is blocking incoming connections.

Also, it might help if you copy exactly your terminal input.

Additionally, the github is another resource though I'm not sure this is an arc issue: https://github.com/arclanguage/anarki

-----

2 points by ca 2904 days ago | link

Many thanks for helping with this.

This is what the terminal looks like when I run ./run-news

$ ./run-news rm: cannot remove 'www/news/story/*.tmp': No such file or directory load items: ranking stories. ready to serve port 8080

To quit: arc> (quit)

  (or press ctrl and 'd' at once)
For help on say 'string':

  arc> (help string)
For a list of differences with arc 3.1:

  arc> (incompatibilities)
To run all automatic tests:

  $ hg clone https://bitbucket.org/zck/unit-test.arc

  $ ./arc

  arc> (load "tests.arc")
If you have questions or get stuck, come to

http://arclanguage.com/forum.

Arc 3.1 documentation: https://arclanguage.github.io/ref.

arc>

-----

4 points by kinnard 2904 days ago | link

I believe that error occurs because the news app is attempting to `rm` a temporary dir that hasn't been created yet: https://github.com/arclanguage/anarki/blob/6d28039a69a9afa56...

It may be related to what's being discussed here: https://github.com/arclanguage/anarki

But I am able to successfully visit http://localhost:8080/ after running `./run-news`. Alternatively the (nsv) command also works for me.

So I'm not able to reproduce the error that you're getting.

Any luck investigating your firewall?

-----

4 points by ca 2901 days ago | link

It's up!

The issue was network (firewall) related. I simply destroyed the firewall (it's on VM so am not concerned about security on this one). On ubuntu that amounted to removing the IPtable rules.

Am looking forward to putting this behind Nginx and seeing how that goes.

Thanks for sticking with me kinnard. It's very much appreciated. Have a great week.

-----

1 point by kinnard 2901 days ago | link

Haha, happy to help, would love to see what you're building.

Pay it forward.

-----