marklogic-community / RunDMC

MarkLogic application for running a developer site
http://developer.marklogic.com/code/rundmc
Other
17 stars 18 forks source link

Invalid privilege 'xdmp:filesystem-file-directory' specified for role: dmc-author #492

Closed ghost closed 9 years ago

ghost commented 9 years ago

OS: Fedora-22 (4.0.4-303.fc22.x86_64 #1 SMP) MarkLogic(RHEL6): 8.0-3 (MARKLOGIC_USER=user)

ruby: 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]

$ gem list * LOCAL GEMS * bigdecimal (1.2.6) io-console (0.4.3) json (1.8.2) net-http-digest_auth (1.4) psych (2.0.8) rdoc (4.2.0) roxy (0.2.1)

$ deploy/build.properties user=admin password=* app-name=RunDMC app-modules-db=filesystem modules-root=/home/user**/repos/RunDMC/src

api-port=8011 app-port=8012 xcc-port=8013 draft-port=8014 admin-port=8015 rapi-port=8016 try-port=8017 webdav-port=8018 maintenance-port=8019

authentication-method=application-level default-user=admin appuser-password=*** app-type=mvc server-version=8

rest-options.dir=${basedir}/rest-api/config rest-ext.dir=${basedir}/rest-api/ext rest-transforms.dir=${basedir}/rest-api/transforms

url-rewriter=/controller/url_rewrite.xqy error-handler=/controller/error-handler.xqy rewrite-resolves-globally= local-server=localhost

mlcp-home=/home/user/bin/mlcp-1.3-3/ mlcp-vmargs=-Xmx512m

build-version=8.0 build-zip-path=/home/user/Downloads/MarkLogic_8_pubs.zip build-clean=1 build-actions=

$ ./ml local bootstrap docs docs Bootstrapping your project into MarkLogic 8 on localhost... ERROR: Invalid privilege 'xdmp:filesystem-file-directory' specified for role: dmc-author (INVALID-PRIVILEGE): See MarkLogic Server error log for more details. ERROR: ... Bootstrap FAILED

<error:error xsi:schemaLocation="http://marklogic.com/xdmp/error error.xsd" xmlns:error="http://marklogic.com/xdmp/error" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <error:code>Invalid privilege 'xdmp:filesystem-file-directory' specified for role: dmc-author</error:code>
    <error:name>INVALID-PRIVILEGE</error:name>
    <error:xquery-version>1.0-ml</error:xquery-version>
    <error:message>Invalid privilege 'xdmp:filesystem-file-directory' specified for role: dmc-author</error:message>
    <error:format-string>Invalid privilege 'xdmp:filesystem-file-directory' specified for role: dmc-author (INVALID-PRIVILEGE):</error:format-string>
    <error:retryable>false</error:retryable>
    <error:expr> </error:expr>
    <error:data/>
    <error:stack>
        <error:frame>
            <error:line>3741</error:line>
            <error:column>8</error:column>
            <error:operation>setup:create-roles(&lt;configuration&gt;&lt;!--&amp;#10;  Only enable the task server section if you need to.&amp;#...&lt;/configuration&gt;)</error:operation>
            <error:variables>
                <error:variable>
                    <error:name xmlns="">import-config</error:name>
                    <error:value>&lt;configuration&gt;&lt;!--&amp;#10;  Only enable the task server section if you need to.&amp;#...&lt;/configuration&gt;</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">role</error:name>
                    <error:value>&lt;role xmlns="http://marklogic.com/xdmp/security"&gt;&lt;role-name&gt;dmc-author&lt;/role-name&gt;&lt;description&gt;An Author for RunD...&lt;/role&gt;</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">role-name</error:name>
                    <error:value>sec:role-name("dmc-author")</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">description</error:name>
                    <error:value>sec:description("An Author for RunDMC content")</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">role-names</error:name>
                    <error:value>sec:role-name("RunDMC-role")</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">permissions</error:name>
                    <error:value>()</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">collections</error:name>
                    <error:value>()</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">privileges</error:name>
                    <error:value>(&lt;privilege xmlns="http://marklogic.com/xdmp/security"&gt;&lt;privilege-name&gt;xdmp:xslt-invoke&lt;/privilege-name&gt;&lt;/privilege&gt;, &lt;privilege xmlns="http://marklogic.com/xdmp/security"&gt;&lt;privilege-name&gt;xdmp:hostname&lt;/privilege-name&gt;&lt;/privilege&gt;, &lt;privilege xmlns="http://marklogic.com/xdmp/security"&gt;&lt;privilege-name&gt;xdmp:filesystem-file-exists&lt;/privilege-name&gt;&lt;/privilege&gt;, ...)</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">amps</error:name>
                    <error:value>()</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">eval-options</error:name>
                    <error:value>&lt;options xmlns="xdmp:eval"&gt;&lt;database&gt;66115990858797328&lt;/database&gt;&lt;/options&gt;</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">privilege</error:name>
                    <error:value>&lt;privilege xmlns="http://marklogic.com/xdmp/security"&gt;&lt;privilege-name&gt;xdmp:filesystem-file-directory&lt;/privilege-name&gt;&lt;/privilege&gt;</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">priv</error:name>
                    <error:value>()</error:value>
                </error:variable>
            </error:variables>
            <error:xquery-version>1.0-ml</error:xquery-version>
        </error:frame>
        <error:frame>
            <error:line>314</error:line>
            <error:column>4</error:column>
            <error:operation>setup:do-setup(&lt;configuration&gt;&lt;!--&amp;#10;  Only enable the task server section if you need to.&amp;#...&lt;/configuration&gt;)</error:operation>
            <error:variables>
                <error:variable>
                    <error:name xmlns="">import-config</error:name>
                    <error:value>&lt;configuration&gt;&lt;!--&amp;#10;  Only enable the task server section if you need to.&amp;#...&lt;/configuration&gt;</error:value>
                </error:variable>
            </error:variables>
            <error:xquery-version>1.0-ml</error:xquery-version>
        </error:frame>
        <error:frame>
            <error:line>4779</error:line>
            <error:column>1</error:column>
            <error:operation>xdmp:eval("(:&amp;#10;Copyright 2012 MarkLogic Corporation&amp;#10;&amp;#10;Licensed un...", (), &lt;options xmlns="xdmp:eval"&gt;&lt;isolation&gt;different-transaction&lt;/isolation&gt;&lt;ignore-amps&gt;true&lt;/i...&lt;/options&gt;)</error:operation>
            <error:xquery-version>1.0-ml</error:xquery-version>
        </error:frame>
        <error:frame>
            <error:uri>/MarkLogic/appservices/qconsole/qconsole-amped.xqy</error:uri>
            <error:line>213</error:line>
            <error:column>4</error:column>
            <error:operation>amped-qconsole:qconsole-eval("(:&amp;#10;Copyright 2012 MarkLogic Corporation&amp;#10;&amp;#10;Licensed un...", (), &lt;options xmlns="xdmp:eval"&gt;&lt;isolation&gt;different-transaction&lt;/isolation&gt;&lt;ignore-amps&gt;true&lt;/i...&lt;/options&gt;)</error:operation>
            <error:variables>
                <error:variable>
                    <error:name xmlns="http://marklogic.com/appservices/qconsole/util-amped">xquery</error:name>
                    <error:value>"(:&amp;#10;Copyright 2012 MarkLogic Corporation&amp;#10;&amp;#10;Licensed un..."</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="http://marklogic.com/appservices/qconsole/util-amped">vars</error:name>
                    <error:value>()</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="http://marklogic.com/appservices/qconsole/util-amped">options</error:name>
                    <error:value>&lt;options xmlns="xdmp:eval"&gt;&lt;isolation&gt;different-transaction&lt;/isolation&gt;&lt;ignore-amps&gt;true&lt;/i...&lt;/options&gt;</error:value>
                </error:variable>
            </error:variables>
            <error:xquery-version>1.0-ml</error:xquery-version>
        </error:frame>
        <error:frame>
            <error:uri>/MarkLogic/appservices/qconsole/qc-evaler.xqy</error:uri>
            <error:line>568</error:line>
            <error:column>12</error:column>
            <error:operation>qceval:do-eval(xs:unsignedLong("10397324933902025287"), document{text{"(:&amp;#10;Copyright 2012 MarkLogic Corporation&amp;#10;&amp;#10;Licensed un..."}}, "", &lt;options xmlns="xdmp:eval"&gt;&lt;isolation&gt;different-transaction&lt;/isolation&gt;&lt;ignore-amps&gt;true&lt;/i...&lt;/options&gt;, "xquery")</error:operation>
            <error:variables>
                <error:variable>
                    <error:name xmlns="http://marklogic.com/appservices/qconsole/evaler">qid</error:name>
                    <error:value>xs:unsignedLong("10397324933902025287")</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="http://marklogic.com/appservices/qconsole/evaler">query</error:name>
                    <error:value>"(:&amp;#10;Copyright 2012 MarkLogic Corporation&amp;#10;&amp;#10;Licensed un..."</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="http://marklogic.com/appservices/qconsole/evaler">wrappedQuery</error:name>
                    <error:value>""</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="http://marklogic.com/appservices/qconsole/evaler">options</error:name>
                    <error:value>&lt;options xmlns="xdmp:eval"&gt;&lt;isolation&gt;different-transaction&lt;/isolation&gt;&lt;ignore-amps&gt;true&lt;/i...&lt;/options&gt;</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="http://marklogic.com/appservices/qconsole/evaler">query-type</error:name>
                    <error:value>"xquery"</error:value>
                </error:variable>
            </error:variables>
            <error:xquery-version>1.0-ml</error:xquery-version>
        </error:frame>
        <error:frame>
            <error:uri>/qconsole/endpoints/evaler.xqy</error:uri>
            <error:line>99</error:line>
            <error:column>28</error:column>
            <error:variables>
                <error:variable>
                    <error:name xmlns="">http-opts</error:name>
                    <error:value>&lt;rest:request xmlns:rest="http://marklogic.com/appservices/rest"&gt;&lt;rest:param name="sid" as="unsignedLong"/&gt;&lt;rest:param name="dbid...&lt;/rest:request&gt;</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">set</error:name>
                    <error:value>()</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">params-map</error:name>
                    <error:value>map:map(&lt;map:map xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:map="http://marklogic.com/xdmp/map"&gt;&lt;map:entry key="wsid"&gt;&lt;map:value xsi:type="xs:unsignedLong"&gt;7695...&lt;/map:map&gt;)</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">action</error:name>
                    <error:value>"eval"</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">qid</error:name>
                    <error:value>xs:unsignedLong("10397324933902025287")</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">name</error:name>
                    <error:value>()</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">active</error:name>
                    <error:value>()</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">focus</error:name>
                    <error:value>()</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">mode</error:name>
                    <error:value>""</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">content-source</error:name>
                    <error:value>()</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">wsid</error:name>
                    <error:value>xs:unsignedLong("7695118418868943655")</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">sid</error:name>
                    <error:value>xs:unsignedLong("12199793868783031912")</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">dbid</error:name>
                    <error:value>()</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">crid</error:name>
                    <error:value>""</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">query-type</error:name>
                    <error:value>"xquery"</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">query-text</error:name>
                    <error:value>document{text{"(:&amp;#10;Copyright 2012 MarkLogic Corporation&amp;#10;&amp;#10;Licensed un..."}}</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">sql-query</error:name>
                    <error:value>"import module namespace amped-qconsole = &amp;quot;http://marklogic...."</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">sparql-query</error:name>
                    <error:value>"import module namespace amped-qconsole = &amp;quot;http://marklogic...."</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">sparql-update-query</error:name>
                    <error:value>"import module namespace amped-qconsole = &amp;quot;http://marklogic...."</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">query</error:name>
                    <error:value>document{text{"(:&amp;#10;Copyright 2012 MarkLogic Corporation&amp;#10;&amp;#10;Licensed un..."}}</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">new-query</error:name>
                    <error:value>()</error:value>
                </error:variable>
                <error:variable>
                    <error:name xmlns="">eval-opts</error:name>
                    <error:value>&lt;options xmlns="xdmp:eval"&gt;&lt;isolation&gt;different-transaction&lt;/isolation&gt;&lt;ignore-amps&gt;true&lt;/i...&lt;/options&gt;</error:value>
                </error:variable>
            </error:variables>
            <error:xquery-version>1.0-ml</error:xquery-version>
        </error:frame>
    </error:stack>
</error:error>```
dsokolsky commented 9 years ago

I think that privilege is supposed to be xdmp:filesystem-directory. Until we get around to fixing it, you can try changing line 738 of deploy/ml-config.xml to:

<privilege-name>xdmp:filesystem-directory</privilege-name>

dsokolsky commented 9 years ago

Or run it as a user with the admin role.

ghost commented 9 years ago

I think that privilege is supposed to be xdmp:filesystem-directory. Until we get around to fixing it, you > can try changing line 738 of deploy/ml-config.xml to: <privilege-name>xdmp:filesystem-directory</privilege-name>

it works .. but with some issue:

apitoc

dsokolsky commented 9 years ago

Hmmm, it looks like somehow you have stale versions of the toc files. As a workaround, try rebuilding the toc. I think if you run this XQuery in query console against the RunDMC database (with your RunDMC project /src as its root) this might fix it:


xquery version "1.0-ml";

import module namespace toc="http://marklogic.com/rundmc/api/toc" at "/apidoc/setup/toc.xqm" ;

toc:toc("8.0", "c:/Program Files/MarkLogic/Config")


If you are on linux, substitute "/opt/MarkLogic/Config" for the second param, on mac substitute "/home/username/Library/MarkLogic/Config" (where /home/username is your home directory).

We realize this installation process is not quite ready for prime time yet. Thanks for bearing with it.

dsokolsky commented 9 years ago

Or alternately, just reloading the whole thing. You can do this against the maintenance appserver (I think it looks like port 8019 in your case). So something like this:

http://localhost:8019/apidoc/setup/build.xqy?version=8.0&zip=/space/docs/MarkLogic_8_pubs.zip&help-xsd-dir=/var/opt/MarkLogic/Config/8.0&clean=true

ghost commented 9 years ago

thanks for helping, but ..

$ sudo rpm -iv ~/Downloads/marklogic-8.0.3/MarkLogic-8.0-3.x86_64.rpm Preparing packages... MarkLogic-8.0-3.x86_64

$ sudo /etc/init.d/MarkLogic start Starting MarkLogic: [ OK ]

$ git clone https://github.com/marklogic/RunDMC.git Cloning into 'RunDMC'... remote: Counting objects: 19473, done. remote: Compressing objects: 100% (17/17), done. remote: Total 19473 (delta 7), reused 0 (delta 0), pack-reused 19455 Receiving objects: 100% (19473/19473), 59.08 MiB | 1.21 MiB/s, done. Resolving deltas: 100% (13599/13599), done. Checking connectivity... done.

$ cd RunDMC

$ deploy/build.properties user=admin password=admin app-name=RunDMC app-modules-db=filesystem modules-root=/home/%user%/repos/RunDMC/src api-port=8011 app-port=8012 xcc-port=8013 draft-port=8014 admin-port=8015 rapi-port=8016 try-port=8017 webdav-port=8018 maintenance-port=8019 default-user=admin appuser-password=Mam;N)$#JIaoP[F?fO0w app-type=mvc server-version=8 rest-options.dir=${basedir}/rest-api/config rest-ext.dir=${basedir}/rest-api/ext rest-transforms.dir=${basedir}/rest-api/transforms url-rewriter=/controller/url_rewrite.xqy error-handler=/controller/error-handler.xqy rewrite-resolves-globally= local-server=localhost mlcp-home=/home/%user%/bin/mlcp-1.3-3/bin/mlcp.sh mlcp-vmargs=-Xmx512m build-version=8.0 build-zip-path=/tmp/MarkLogic_8_pubs.zip build-clean=1 build-actions=

$ deploy/ml-config.xml [line:738] <privilege-name>xdmp:filesystem-directory</privilege-name>

$ ls -l /tmp .. .. MarkLogic_8_pubs.zip ..

$ ./ml local bootstrap docs docs Bootstrapping your project into MarkLogic 8 on localhost...


*\ RESTART OF MARKLOGIC IS REQUIRED


... Bootstrap Complete

$ sudo /etc/init.d/MarkLogic restart Stopping MarkLogic Stopping MarkLogic: .. [ OK ] Starting MarkLogic: [ OK ]

$ ./ml local deploy_docs Trying digest auth response: #Net::HTTPInternalServerError:0x00000002a32698 response:

<head>
    <title>500 Internal Server Error</title>
    <meta name="robots" content="noindex,nofollow"/>
    <link rel="stylesheet" href="/error.css"/>
  </head>
  <body>
    <span class="error">
      <h1>500 Internal Server Error</h1>
      <dl>
        <dt>SVC-FILSTAT: File status error: stat64 '/home/%user%/repos/RunDMC/src/apidoc/setup/build.xqy': Permission denied</dt>
        <dd></dd>
        <dt> [1.0-ml]</dt>
        <dd></dd>
      </dl>
    </span>
  </body>
</html>

$ /etc/sysconfig/MarkLogic export MARKLOGIC_USER=%user%

$ sudo /etc/init.d/MarkLogic restart Stopping MarkLogic Stopping MarkLogic: .. [ OK ] Starting MarkLogic: [ OK ]

$ ./ml local deploy_docs Trying admin@localhost:8019 Trying digest auth response: #Net::HTTPOK:0x0000000155e2a8 response: load-static-docs 8.0 PT0.139077S load-raw-docs 8.0 PT16.890207S setup-guides 8.0 PT1M7.720053S setup 8.0 PT42.965446S /setup/collection-tagger 8.0 PT1.84691S make-standalone-search-page 8.0 PT0.143359S build 8.0 PT2M9.845221S

http://localhost:8011/ apitoc

FIX 1

xquery version "1.0-ml";

import module namespace toc="http://marklogic.com/rundmc/api/toc"
at "/apidoc/setup/toc.xqm" ;

toc:toc("8.0", "/opt/MarkLogic/Config/")

your query returned an empty sequence

FIX 2

http://localhost:8019/apidoc/setup/build.xqy?version=8.0&zip=**/tmp/MarkLogic_8_pubs.zip**&help-xsd-dir=/var/opt/MarkLogic/Config/8.0&clean=true

APIDOC-ERROR (err:FOER0000): help-xsd-dir does not exist "/var/opt/MarkLogic/Config/8.0" in /apidoc/setup/setup.xqm, at 120:2, in stp:error("ERROR", ("help-xsd-dir does not exist", ""/var/opt/MarkLogic/Config/8.0"")) [1.0-ml] $code = "ERROR" $items = ("help-xsd-dir does not exist", ""/var/opt/MarkLogic/Config/8.0"") in /apidoc/setup/build.xqy, at 63:61 [1.0-ml]

FIX 2.A

http://localhost:8019/apidoc/setup/build.xqy?version=8.0&zip=/tmp/MarkLogic_8_pubs.zip&help-xsd-dir=**/opt/MarkLogic/Config/**&clean=true

load-static-docs 8.0 PT0.352925S load-raw-docs 8.0 PT16.080997S setup-guides 8.0 PT1M10.029953S setup 8.0 PT44.10702S /setup/collection-tagger 8.0 PT1.563434S make-standalone-search-page 8.0 PT0.139425S build 8.0 PT2M13.940472S

apitoc

dsokolsky commented 9 years ago

Are you logging in with your browser with a user with the admin role?

On Tue, Jun 16, 2015 at 5:54 PM, forest-counts notifications@github.com wrote:

thanks for helping, but ..

_$ sudo rpm -iv ~/Downloads/marklogic-8.0.3/MarkLogic-8.0-3.x8664.rpm Preparing packages... MarkLogic-8.0-3.x86_64

$ sudo /etc/init.d/MarkLogic start Starting MarkLogic: [ OK ]

$ git clone https://github.com/marklogic/RunDMC.git https://github.com/marklogic/RunDMC.git Cloning into 'RunDMC'... remote: Counting objects: 19473, done. remote: Compressing objects: 100% (17/17), done. remote: Total 19473 (delta 7), reused 0 (delta 0), pack-reused 19455 Receiving objects: 100% (19473/19473), 59.08 MiB | 1.21 MiB/s, done. Resolving deltas: 100% (13599/13599), done. Checking connectivity... done.

$ cd RunDMC

$ deploy/build.properties user=admin password=admin app-name=RunDMC app-modules-db=filesystem modules-root=/home/%user%/repos/RunDMC/src api-port=8011 app-port=8012 xcc-port=8013 draft-port=8014 admin-port=8015 rapi-port=8016 try-port=8017 webdav-port=8018 maintenance-port=8019 default-user=admin appuser-password=Mam;N)$#JIaoP[F?fO0w app-type=mvc server-version=8 rest-options.dir=${basedir}/rest-api/config rest-ext.dir=${basedir}/rest-api/ext rest-transforms.dir=${basedir}/rest-api/transforms url-rewriter=/controller/urlrewrite.xqy error-handler=/controller/error-handler.xqy rewrite-resolves-globally= local-server=localhost mlcp-home=/home/%user%/bin/mlcp-1.3-3/bin/mlcp.sh_ mlcp-vmargs=-Xmx512m build-version=8.0 build-zip-path=/tmp/MarkLogic_8_pubs.zip build-clean=1 build-actions=

$ deploy/ml-config.xml [line:738]

xdmp:filesystem-directory

$ ls -l /tmp .. .. MarkLogic_8_pubs.zip ..

$ ./ml local bootstrap docs docs

Bootstrapping your project into MarkLogic 8 on localhost...

*\ RESTART OF MARKLOGIC IS REQUIRED

... Bootstrap Complete

$ sudo /etc/init.d/MarkLogic restart [sudo] password for ts: Stopping MarkLogic Stopping MarkLogic: .. [ OK ] Starting MarkLogic: [ OK ]

_$ ./ml local deploydocs Trying digest auth response: #Net::HTTPInternalServerError:0x00000002a32698 response:

500 Internal Server Error

500 Internal Server Error

SVC-FILSTAT: File status error: stat64 '/home/%user%/repos/RunDMC/src/apidoc/setup/build.xqy': Permission denied
[1.0-ml]

$ /etc/sysconfig/MarkLogic export MARKLOGIC_USER=%user%

$ sudo /etc/init.d/MarkLogic restart Stopping MarkLogic Stopping MarkLogic: .. [ OK ] Starting MarkLogic: [ OK ]

_$ ./ml local deploydocs Trying admin@localhost:8019 Trying digest auth response: #Net::HTTPOK:0x0000000155e2a8 response: load-static-docs 8.0 PT0.139077S load-raw-docs 8.0 PT16.890207S setup-guides 8.0 PT1M7.720053S setup 8.0 PT42.965446S /setup/collection-tagger 8.0 PT1.84691S make-standalone-search-page 8.0 PT0.143359S build 8.0 PT2M9.845221S

http://localhost:8011/ http://localhost:8011/ [image: apitoc] https://cloud.githubusercontent.com/assets/12884886/8194541/02d1eb06-1485-11e5-92b6-3de4f49c4826.png FIX 1

xquery version "1.0-ml"; import module namespace toc="http://marklogic.com/rundmc/api/toc"at "/apidoc/setup/toc.xqm" ;

toc:toc("8.0", "/opt/MarkLogic/Config/")

your query returned an empty sequence FIX 2

http://localhost:8019/apidoc/setup/build.xqy?version=8.0&zip= _/tmp/MarkLogic_8pubs.zip &help-xsd-dir=/var/opt/MarkLogic/Config/8.0&clean=true

APIDOC-ERROR (err:FOER0000): help-xsd-dir does not exist "/var/opt/MarkLogic/Config/8.0" in /apidoc/setup/setup.xqm, at 120:2, in stp:error("ERROR", ("help-xsd-dir does not exist", ""/var/opt/MarkLogic/Config/8.0"")) [1.0-ml] $code = "ERROR" $items = ("help-xsd-dir does not exist", ""/var/opt/MarkLogic/Config/8.0"") in /apidoc/setup/build.xqy, at 63:61 [1.0-ml]

toc:toc("8.0", "/opt/MarkLogic/Config") FIX 2.A

http://localhost:8019/apidoc/setup/build.xqy?version=8.0&zip=/tmp/MarkLogic_8_pubs.zip&help-xsd-dir= /opt/MarkLogic/Config/&clean=true

load-static-docs 8.0 PT0.352925S load-raw-docs 8.0 PT16.080997S setup-guides 8.0 PT1M10.029953S setup 8.0 PT44.10702S /setup/collection-tagger 8.0 PT1.563434S make-standalone-search-page 8.0 PT0.139425S build 8.0 PT2M13.940472S

[image: apitoc] https://cloud.githubusercontent.com/assets/12884886/8194541/02d1eb06-1485-11e5-92b6-3de4f49c4826.png

— Reply to this email directly or view it on GitHub https://github.com/marklogic/RunDMC/issues/492#issuecomment-112615696.

ghost commented 9 years ago

8011-RunDMC-apidoc http://localhost:8011/

browser doesn't ask me for auth at all

ghost commented 9 years ago

on http://localhost:**8019** port, yes with admin role

dsokolsky commented 9 years ago

OK,if you look at the App Server configuration in the Admin Interface for the App Server on port 8011, what is the user has listed as the default user (under application-level authentication, which I assume is set for that app server)? More importantly, does that user have the admin role? If it does not, change it to one that does have the admin role and see if that solves your problem.

Another way to slice this is to do an xdmp:document-get-permissions on the document that is getting a 404. I am thinking that those documents might not have the needed permissions to be seen by a non-admin user.

ghost commented 9 years ago

under application-level authentication, which I assume is set for that app server

yes: authentication-method=application-level

More importantly, does that user have the admin role?

and yes: default-user=admin

I only сhange modules-root=/home/%user%/repos/RunDMC/src and mlcp path, rest of all setting with default value. Clean instance of ML8 started under %user% account.

anyway, thanks for help.

dsokolsky commented 9 years ago

Which modules-root did you change? I think you only want to change the one that is in deploy/build.properties. There are other modules-root entries in other files and those should remain set to /. Another possibility is that it cannot resolve the % characters properly. Sorry this is being such a pain for you!

dsokolsky commented 9 years ago

And you might be able to fix this by changing your app server root path to the proper directory in the Admin Interface (for example, for the 8011 server and the 8019 server). Those should be set to a directory that MarkLogic can resolve (i.e., an absolute path) pointing to your RunDMC/src directory.

ghost commented 9 years ago

Which modules-root did you change?

deploy/build.properties

it cannot resolve the % characters properly

i know :) in app server root path for 8011 and 8019 path is correct /home/my/repos/RunDMS/src

OK. maybe later , I'll try a different OS. f22 not officially supported for ML8

dsokolsky commented 9 years ago

I am reopening this because I need to fix the privilege issue

dsokolsky commented 9 years ago

The privilege error is now fixed on the

./ml local bootstrap docs

call. I still do not know why your installation failed @forest-counts. I doubt it is because of f22, but it is possible. At any rate, I am going to close this for now (as you already closed it). Feel free to file a new bug or reopen this one if you have any more info.

ghost commented 9 years ago

on CentOS 6.6 same issue. (with apiTOC)

and error message from ./ml

$ ./ml local bootstrap docs docs Bootstrapping your project into MarkLogic 7 on localhost... ERROR: undefined method body=' for #<Net::HTTPOK 200 OK readbody=true> ERROR: ./deploy/lib/server_config.rb:398:inoriginal_bootstrap'./deploy/app_specific.rb:42:in bootstrap'deploy/lib/ml.rb:131:insend'deploy/lib/ml.rb:131

dsokolsky commented 9 years ago

For that issue, add the following to your deploy/local.properties file:

server-version=8

ghost commented 9 years ago

step 1

$ ./ml local bootstrap docs docs Bootstrapping your project into MarkLogic 8 on localhost... ERROR: undefined method body=' for #<Net::HTTPOK 200 OK readbody=true> ERROR: ./deploy/lib/server_config.rb:398:inoriginal_bootstrap'./deploy/app_specific.rb:42:in bootstrap'deploy/lib/ml.rb:131:insend'deploy/lib/ml.rb:131

step 2

http://localhost:8019/apidoc/setup/build.xqy?version=8.0&zip=**/tmp/MarkLogic_8_pubs.zip**&help-xsd-dir=**/opt/MarkLogic/Config/**&clean=true

load-static-docs 8.0 PT0.412328S load-raw-docs 8.0 PT18.822506S setup-guides 8.0 PT1M19.796405S setup 8.0 PT50.678975S /setup/collection-tagger 8.0 PT1.708502S make-standalone-search-page 8.0 PT0.170478S build 8.0 PT2M33.874255S

doesn't help.

dsokolsky commented 9 years ago

You can also add the modules-root to your deploy/local.properties file (instead of updated the build.properties file):

modules-root=/my/path/to/RunDMC/src

dsokolsky commented 9 years ago

What version of Ruby are you using? I think it like to have at least 1.9.3.

ghost commented 9 years ago

yeap, app servers (8011 and 8019) with digest auth and user with admin role

apitoc

ghost commented 9 years ago

$ ruby --version ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]

dsokolsky commented 9 years ago

That might be the problem. I had to upgrade mine. I am using:

ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]

dsokolsky commented 9 years ago

I had to use rvm to upgrade mine, as yum only got me to 1.8.7.

ghost commented 9 years ago

Thank for help, I dont know why, but it doesn't work for me ..

dmcassel commented 9 years ago

What do you get now from ruby --version? With a more recent ruby, are you still getting the same error message?