Configuring host ip

28 views
Skip to first unread message

Nigel David

unread,
Jul 31, 2017, 2:38:24 PM7/31/17
to SlamData-User
Hi,

I'm having trouble viewing the SlamData interface when I start it on my cloud instance.
How/where can configure SlamData with the IP of my cloud instance?


Thanks

Nigel 

do...@slamdata.com

unread,
Jul 31, 2017, 4:23:44 PM7/31/17
to SlamData-User
Hi Nigel, it sounds like you haven't granted access to port 20223 on your cloud instance to the outside world. I would only open that port the the IP addresses that need to access your SlamData instance. Can you verify that you have whitelisted your machine in your cloud console for access to the SlamData instance?

Nigel David

unread,
Jul 31, 2017, 4:36:19 PM7/31/17
to SlamData-User
Hi. Thanks for the reply.

Yes, I have created a rule to whitelist my machine for exclusive access.
I'm wondering if i should rebuild the application. I'm not sure that I had the correct versions of node when i did it the first time. 

do...@slamdata.com

unread,
Jul 31, 2017, 4:43:42 PM7/31/17
to SlamData-User
You shouldn't have to. One other thing to check is that the instance that SlamData is running on doesn't have any IPTables/Firewall rules running that is blocking incoming connections.

Nigel David

unread,
Jul 31, 2017, 5:11:09 PM7/31/17
to SlamData-User
There are no IPTables/Firewall rules running that would block incoming connections. When I disable my ufw I still get the same problem. 

do...@slamdata.com

unread,
Jul 31, 2017, 5:20:10 PM7/31/17
to SlamData-User
Can you open a browser in your cloud instance and connect the the SlamData instance using http://localhost:20223/? If not, verify that the SlamData process is up and running. 

Other questions that will help to troubleshoot:

  1. What OS is SlamData running on? 
  2. What browser are you using to access SlamData?
  3. What errors (if any) are you seeing when trying to connect? 

Nigel David

unread,
Jul 31, 2017, 5:33:51 PM7/31/17
to SlamData-User
I don't have a desktop environment setup on my cloud instance to open a browser with. 

To answer your questions:
  1. Ubuntu 14.04
  2. Chrome
  3. When i try connecting with the browser this is what I get.


To verify that the slam data process is running I use the below command and get the output shown.

root@volttroncentral:~# ps ax|grep java
30468 pts/0    Sl+    0:11 java -jar quasar-web-assembly-20.0.3.jar --content-path public -c /home/ubuntu/.config/quasar/quasar-config.json
30657 pts/4    S+     0:00 grep --color=auto java

Damon LaCaille

unread,
Jul 31, 2017, 5:52:50 PM7/31/17
to SlamData-User
Nigel,

If you're ssh'd into that box, can you use curl to access the main SlamData process on port 20223? Based on your config it's probably something like this:


On mine I see this:

HTTP/1.1 200 OK
Last-Modified: Fri, 28 Jul 2017 22:09:30 GMT
Content-Type: text/html
Date: Mon, 31 Jul 2017 21:48:38 GMT
Content-Length: 201056

What does yours return? If it works on the local box but does not on a remote box then there is a firewall / networking issue.

btw, if you start SlamData with the -L /slamdata option, you can control the trailing end of the URL so instead of "/files" it would be "/slamdata", which is what we typically set with our installers.

Nigel David

unread,
Jul 31, 2017, 6:02:08 PM7/31/17
to SlamData-User
This is the response:

HTTP/1.1 404 Not Found
Content-Type: text/plain; charset=UTF-8
Date: Mon, 31 Jul 2017 21:59:37 GMT
Content-Length: 13

Damon LaCaille

unread,
Jul 31, 2017, 6:22:33 PM7/31/17
to SlamData-User
Nigel,

Since you are getting a 404 it's clear that the Quasar http4s process is running and responding to requests.

I suggest that you kill the process, then start it again with these changes:
  • providing a full path to the public directory rather than a relative path
  • provide the -L /slamdata option so we are giving it an explicit URL
  • redirect the output to a log file for later review.
For instance:

nohup java -jar <jarname.jar> --content-path /path/to/public -c /home/ubuntu/.config/quasar/quasar-config.json -L /slamdata >> /tmp/sd.out 2>&1 &

This should launch SlamData as a background process. You can then use the following command to see log entries as they come across:

tail -F /tmp/sd.out

Now try to access the updated URL, either with a browser or locally with curl:


If nothing, then let us know what your log file says.

Nigel David

unread,
Jul 31, 2017, 6:53:56 PM7/31/17
to SlamData-User
So, I started again with your suggested changes. But nothing much has changed. When I run curl I get this output:

HTTP/1.1 404 Not Found
Content-Type: text/plain; charset=UTF-8
Date: Mon, 31 Jul 2017 22:51:43 GMT
Content-Length: 13

When I use the browser I still get "page can't be found".

Robert Patt-Corner

unread,
Aug 21, 2017, 1:46:29 PM8/21/17
to SlamData-User
Anything further to this?  I'm experiencing a similar problem ... SD is clearly running, given the 404, and a naked URL gets redirected to the path in the -L parameter, but then a 404:

So:

# java -jar ./jars/quasar-web-assembly-20.14.9.jar --content-path /apps/slamdata4/slamdata/public/ -L /slamdata
log4j:WARN No appenders could be found for logger (com.couchbase.client.core.logging.CouchbaseLoggerFactory).
log4j:WARN Please initialize the log4j system properly.
Read web config from /root/.config/quasar/quasar-config.json
Using metastore: jdbc:h2:/root/.config/quasar/quasar-metastore.db
Server started listening on port 80
Press Enter to stop.

But access looks like this:
HTTP/1.1 404 Not Found
Content-Type: text/plain; charset=UTF-8
Date: Mon, 21 Aug 2017 17:41:02 GMT
Content-Length: 13

And from a web browser you see the redirect to /slamdata, then the 404




do...@slamdata.com

unread,
Aug 21, 2017, 3:38:47 PM8/21/17
to SlamData-User
This can happen if the directory provided by the content-path does not exist or is missing the index.html file. Can you please list the contents of folder /apps/slamdata4/slamdata/public?

Robert Patt-Corner

unread,
Aug 21, 2017, 3:44:40 PM8/21/17
to SlamData-User
Thanks!  Now that's peculiar ... there is indeed no index.html:

# ls -ltr public/
total 12
drwxr-xr-x. 2 root root   24 Aug 21 13:07 css
-rw-r--r--. 1 root root  362 Aug 21 13:07 auth_redirect.html
drwxr-xr-x. 2 root root 4096 Aug 21 13:07 fonts
drwxr-xr-x. 7 root root 4096 Aug 21 13:07 img
drwxr-xr-x. 2 root root   32 Aug 21 13:07 video
drwxr-xr-x. 3 root root   47 Aug 21 13:07 js

But I cloned that puppy from github, usually straightforward.

(I've also moved the whole slamdata directory up the tree so it's /apps/slamdata, but that shouldn't matter.  And running SD4 broke my SD2 configfile, but that's off topic).

And guess what ... looking on github in public I see no index.html.  Is that deliberate?  What should one look like?

R.

do...@slamdata.com

unread,
Aug 21, 2017, 3:53:09 PM8/21/17
to SlamData-User
SlamData is written in purescript and you need to build the project before it will properly run. Please follow the instructions in the README on how to build it.

Robert Patt-Corner

unread,
Aug 21, 2017, 3:55:13 PM8/21/17
to SlamData-User
Ah, silly me.  No problem.  The way I read the docs suggested that the build was optional, just skip to the 'using Quasar' bits.  Read it wrong!

Many thanks, appreciate your pointing the way.

Robert Patt-Corner

unread,
Aug 21, 2017, 4:43:07 PM8/21/17
to SlamData-User
Oh well.  Built without incident (CentOS7), ran without incident.

# java -jar ./jars/quasar-web-assembly-20.14.9.jar --content-path /apps/slamdata4/slamdata/public/ -L /slamdata
log4j:WARN No appenders could be found for logger (com.couchbase.client.core.logging.CouchbaseLoggerFactory).
log4j:WARN Please initialize the log4j system properly.
Read web config from /root/.config/quasar/quasar-config.json
Using metastore: jdbc:h2:~/quasar-metastore.db
Server started listening on port 80

However same old 404

The public directory looks correct now.  Running as root, turned setenforce (SELinux) off just in case.  Thoughts?


# ls -ltr public/
total 616
-rw-r--r--. 1 root root    362 Aug 21 13:07 auth_redirect.html
drwxr-xr-x. 2 root root   4096 Aug 21 13:07 fonts
drwxr-xr-x. 7 root root   4096 Aug 21 13:07 img
drwxr-xr-x. 2 root root     32 Aug 21 13:07 video
drwxr-xr-x. 2 root root     69 Aug 21 16:04 css
-rw-r--r--. 1 root root 203609 Aug 21 16:04 index.html
-rw-r--r--. 1 root root 410477 Aug 21 16:04 workspace.html
drwxr-xr-x. 3 root root     86 Aug 21 16:12 js
Reply all
Reply to author
Forward
0 new messages