I have installed MarkLogic server 10.0-2.1x86_64 on CentOS and corresponding converters as per the documentation. It is a fresh install, and my only aim is to proceed with configuring the server. MarkLogic server runs with status OK
and there are no errors in ErrorLog.txt
. Also, ports 8000,8001, 8002. 7999,7998 and 7997 are open and have nothing else running on them
However when I access localhost:8001 the response is HTTP code 302.
This is what is in my 8001_AccessLog.txt
::1 - - [04/Nov/2019:13:11:12 +0530] "GET / HTTP/1.1" 302 0 - "curl/7.29.0"
And the request i make is:
[root@root Logs]# curl -v http://localhost:8001
* About to connect() to localhost port 8001 (#0)
* Trying ::1...
* Connected to localhost (::1) port 8001 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: localhost:8001
> Accept: */*
>
< HTTP/1.1 302 Found
< X-Frame-Options: DENY
< Content-Security-Policy: default-src 'self'; media-src 'self'; img-src 'self' data:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline';
< X-Content-Security-Policy: default-src 'self'; media-src 'self'; img-src 'self' data:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline';
< Location: initialize-admin.xqy
< Server: MarkLogic
< Content-Length: 0
< Connection: Keep-Alive
< Keep-Alive: timeout=5
Requests made to http://localhost:8002
and http://localhost:8000
give 403 error. Is there some user/access control list to configure? I have tried the same with MarkLogic 9 as well, but I have the same problem. I have intalled MarkLogic as root user, and MARKLOGIC_USER
in /etc/sysconfig/marklogic
is set to root as well.
2
Answers
The server is sending a 302 response which is a redirect. The Location header there is giving the new location.
You’re using curl which by default doesn’t follow redirects. Try adding the
-L
flag. Or using a normal browser for this admin initialization step.You can initialize a MarkLogic server by doing a POST to the init endpoint:
Running that will initialize the server, but the server still needs to be setup before you are able to create databases and app servers. The following command can be run after the initialization, and will setup the Security database, the administrative user, and the internal keystore password.
At this point the server is online, and ready for an application or database deployment. Both of these endpoints are part of the Management API.