Are you running on localhost? If not, there may be a problem with a firewall.

It doesn't sound like it, but maybe there's a permissions problem with the file 
system. The daemon user that runs MarkLogic needs to have read permissions on 
the files you want to read and (I think) execute permissions on the directory 
path leading to the file. Bring up Query Console (http://localhost:8000) and 
try this:

    xdmp:document-get("/path/to/hello.xqy")

If that returns the file successfully, then I think you should be good with 
permissions.

--
Dave Cassel, @dmcassel<https://twitter.com/dmcassel>
Technical Community Manager
MarkLogic Corporation<http://www.marklogic.com/>
http://developer.marklogic.com/


From: 
<[email protected]<mailto:[email protected]>>
 on behalf of "Kaza, Sriram" <[email protected]<mailto:[email protected]>>
Reply-To: MarkLogic Developer Discussion 
<[email protected]<mailto:[email protected]>>
Date: Friday, March 10, 2017 at 11:55 AM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: [MarkLogic Dev General] A newbie question

I executed the Self-paced Developer's XQuery class code for creating an HTTP 
AppService for 8030-world-leaders and placed hello.xqy in the root directory of 
the filesystem where it is supposed to look. I get an "This site can’t be 
reached" error when I issue the URL "http://<.host>:8030/hello.xqy" in the 
browser. Where do I look for errors on the server? How do I troubleshoot this? 
Any pointers are helpful. I see that the Oracle-Linux server is listening on 
port 8030 when I issue netstat -a |grep 8030

I do not see any entries in either ErrorLog.txt or 8030_AccessLog.txt in the 
Logs directory.

The HTTP Service is not red (indicating any error). Also when I delete the 
8030-world-leaders HTTP AppServer and netstat -a |grep 8030 does not show the 
row "tcp 0 0 0.0.0.0:8030 0.0.0.0:* LISTEN". After I create the HTTP AppServer, 
it shows up in netstat -a. So, I am assuming it is able to run the HTTP service 
but I am thinking there should be some logs or something I can use to 
troubleshoot if the HTTP service is able to see my request

If I do a wget, I get a message saying "Connected. HTTP request sent, awaiting 
response.... 401 Unauthorized Authorization failed."

This makes an entry in the 8030_AccessLog.txt with a message "GET /hello.xqy 
HTTP/1.1" 401 209 - "Wget/1.14 (linux-gnu)"

The hello.xqy has the following contents:
xquery version "1.0-ml";
"Hello World!"

Is there some authorization/security that I have to enable for the HTTP 
Service? The HTTP service root directory /marklogic/apps2 and the file 
hello.xqy have permissions for ‘daemon’ to read.


Thanks,
Sriram


Sriram Kaza
Oracle DBA

Kemper Corporate Services
One Tower Lane, Lower Level, Oakbrook Terrace, IL 60181
630.368.8047
[email protected]<mailto:[email protected]>
kemper.com<http://kemper.com>

[cid:[email protected]]





CONFIDENTIALITY NOTICE: This communication may contain confidential information 
intended only for the addressee(s). If you received this communication in 
error, please notify the sender and delete it from your system.
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to