eXist-db / docker-existdb

Docker image builder for eXist-db
GNU Affero General Public License v3.0
11 stars 6 forks source link

xqm files not compiling and registering #66

Closed rapport closed 5 years ago

rapport commented 5 years ago

When I upload a xqm file to this image it doesn't appear to register/compile. Can you advise? I am sorry I also can't understand how to access the logs inside this container and send on this as it doesn't have a shell I am familiar with. To repeat the error I put the xqm file in the db similar to this:

PUT .../exist/rest/db/forgot.xqm content-type:application/xquery

The contents of forgot.xqm 'simplified' look like this

xquery version "3.0";
module namespace host = "http://host/service";
import module namespace rest = "http://exquery.org/ns/restxq";
declare
    %rest:POST
    %rest:path("/forgot")
    %rest:query-param("email", "{$email}")
    %rest:consumes("application/x-www-form-urlencoded")
    %rest:produces("text/html")
function host:function1($email) {
        let $doc := 
<Customer>
        <Metadata>
            <Created>{current-dateTime()}</Created>
        </Metadata>
        <Contact>
            <Email>{$email}</Email>
        </Contact>
    </Customer>
        return
            let $new-file-path := xmldb:store("/db/forgot", concat($email, '.xml'), $doc)
            return
                <html xmlns="http://www.w3.org/1999/xhtml">
                    <body>SUCCESS</body>
                </html>
};

And I POST this xqm along the lines:

POST http://host/forgot email=test@test.test

But the resulting error is ERROR: HTTP/1.1 404 Not Found

I guess it is not registering/compiling. This exact same process is working perfectly when I using many other versions of the database with appropriate permissions setup but interestingly not in the 'minimal' version of the evolved binary docker image although it also works fine with the bigger image there. This seems related to the behaviour I reported for the 'minimal' version of the evolved binary image: https://github.com/evolvedbinary/docker-existdb/issues/4

duncdrum commented 5 years ago

@rapport can you provide the exact steps to reproduce e.g. the exact command used for posting? and the version of the docker images you use.

We have one test that POST to REST which passes, maybe it can give you an idea of what we are doing differently.

In principle though this should just work.

@adamretter any ideas on what might be missing in minimal that makes this work differently?

adamretter commented 5 years ago

I would check the webapp/WEB-INF/logs/restxq.log file.

rapport commented 5 years ago

Thanks for the responses and help I will investigate further and attempt to put together a test. Could you help provide the commands I need to tail this log inside the container? Nothing appears in 'sudo docker logs exist'. Usually, I would do something like sudo docker exec -it exist /bin/bash but I am a bit lost with this as there is no shell bash... I guess I need something 'docker exec exist java...?'

duncdrum commented 5 years ago

docker logs exist should get you the exist.log file of the container named exist. Similarly, for debugging docker cp exist:exist/webapp/WEB-INF/logs/restxq.log . will download the restxq.log file to .

in both cases i started the container with -dit

rapport commented 5 years ago

Thanks for the log pointer which was very helpful... I have looked at the logs and it appears not to say anything interesting. I would assume it should say initializing RESTXQ and then registering RESTXQ once I have PUT the XQM file in at the top level like it does in the other full versions of EXISTDB I use but it doesn't. You can repeat this if you upload a XQM as follows and then look at the log...

curl -i -X PUT -H "Content-Type: application/xquery" -d $'xquery version "3.0";\nmodule namespace host = "http://host/service";\nimport module namespace rest = "http://exquery.org/ns/restxq";\ndeclare\n %rest:POST\n %rest:path("/forgot")\n %rest:query-param("email", "{$email}")\n %rest:consumes("application/x-www-form-urlencoded")\n %rest:produces("text/html")\nfunction host:function1($email) {\n let $doc := \n<Customer>\n <Metadata>\n <Created>{current-dateTime()}</Created>\n </Metadata>\n <Contact>\n <Email>{$email}</Email>\n </Contact>\n </Customer>\n return\n let $new-file-path := xmldb:store("/db/forgot", concat($email, ".xml"), $doc)\n return\n <html xmlns="http://www.w3.org/1999/xhtml">\n <body>SUCCESS</body>\n </html>\n};' http://admin:nimda@127.0.0.1:8080/exist/rest/db/forgot.xqm

docker cp exist:exist/webapp/WEB-INF/logs/restxq.log

Additionally, when I looked over the test mentioned above it says something about '# Tests that use rest endpoint, this might be disabled by default soon'... could this mean that something for processing these files is 'disabled' and I need to enable it somewhere? Also the test doesn't appear to create an XQM file that receives HTTP posts messages and processes them as is my use case.

rapport commented 5 years ago

If you want to also test the file works you may need to change the permissions after upload

curl -i GET 'http://admin:nimda@127.0.0.1:8080/exist/rest/db/?_query=sm:chmod(xs:anyURI("/db/forgot.xqm"),"rwxr-xr-x")'

You may also need to create a folder for file uploads in the DB

curl -d "xquery version '3.0';" -H "Content-type: application/xquery" -X PUT http://admin:nimda@127.0.0.1:8080/exist/rest/db/forgot/init.txt

And then to post stuff to in curl -d "email=test@test.com" -X POST http://127.0.0.1:8080/exist/restxq/forgot

grantmacken commented 5 years ago

I do find working with restXQ a bit of a pain. Having said that, always use restXQ as my web app entry point rater than the 'controller' way.

Some things I do.

  1. a compile check, prior to uploading any xQuery file
  2. after upload set and check exec permissions
  3. 'register' my restXQ file exrest:register-module(xs:anyURI($regPath) And check what routes are registered
    let $regDoc := exrest:register-module(xs:anyURI($regPath))
    let $seq := $regDoc//rest:identity/@local-name/string()
    return
    if ( exists($seq) ) then ( 'INFO: registered routes - ' ||  string-join(
    $seq, " ") ) else (
    error(xs:QName("ERROR"), " - FAILED to register"))

    From my experience, things can get tricky, which I think is to do with the cached registered functions. If I understand correctly, the register phase will also scan dependencies. So if you are working on lib "a" which your restXQ lib "b" depends on. then compiled restXQ functions will be stale, and the changes you made to lib 'a' will not register.

Whatever the case my restXQ functions sometimes don't register and I get a previous cached result from a restXQ route. In such cases I resort to a docker reboot to help register the restXq functions properly docker-compose down && docker-compose up -d

On Tue, 26 Mar 2019 at 03:31, Duncan Paterson notifications@github.com wrote:

docker logs exist should get you the exist.log file of the container named exist. Similarly, for debugging docker cp exist:exist/webapp/WEB-INF/logs/restxq.log . will download the restxq.log fileto .

in both cases i started the container with -dit

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/eXist-db/docker-existdb/issues/66#issuecomment-476222385, or mute the thread https://github.com/notifications/unsubscribe-auth/ABrSYCfM-63NC4aCl27FCNJITEYqbvGAks5vaN25gaJpZM4cGilR .

-- Take Care Grant Mackenzie

rapport commented 5 years ago

For further information when I upload the XQM file on other versions of EXISTDB successfully and look on the RESTXQ log I see the following which is the expected behaviour (rather than no trace in the log)

2019-03-26 21:26:51,342 [qtp1556841942-23] INFO  (RestXqServiceRegistryLogger.java [registered]:44) - Registered RESTXQ Resource Function: /db/forgot.xqm,{http://host/service}function1#1 
2019-03-26 21:26:51,343 [qtp1556841942-23] INFO  (RestXqServiceRegistryPersistence.java [updateRegistryOnDisk]:149) - Preparing new RESTXQ registry on disk: /tmp/exist-db-temp-file-manager-9129053972473614333/exist-db-temp-7782763099767123877.tmp 
grantmacken commented 5 years ago

Have you tried to stopping then restarting the docker container, then checking the log

On Wed, 27 Mar 2019 at 10:36, Gary Cornelius notifications@github.com wrote:

For further information when I upload the XQM file on other versions of EXISTDB successfully and look on the RESTXQ log I see the following which is the expected behaviour (rather than no trace in the log)

2019-03-26 21:26:51,342 [qtp1556841942-23] INFO (RestXqServiceRegistryLogger.java [registered]:44) - Registered RESTXQ Resource Function: /db/forgot.xqm,{http://host/service}function1#1 2019-03-26 21:26:51,343 [qtp1556841942-23] INFO (RestXqServiceRegistryPersistence.java [updateRegistryOnDisk]:149) - Preparing new RESTXQ registry on disk: /tmp/exist-db-temp-file-manager-9129053972473614333/exist-db-temp-7782763099767123877.tmp

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/eXist-db/docker-existdb/issues/66#issuecomment-476862584, or mute the thread https://github.com/notifications/unsubscribe-auth/ABrSYJPHr6XohsbW3_jVYYaIG_aYO0VMks5vapL0gaJpZM4cGilR .

-- Take Care Grant Mackenzie

rapport commented 5 years ago

Thanks again for the pointer, when I just tried a docker stop exist and the docker start exist and I could see the second initialization for stop/start (following the initial install one) but still no Registered RESTXQ Resource Function as expected for the XQM files I PUT in directly after install at the top level.

2019-03-27 09:46:01,822 [main] INFO  (RestXqServiceRegistryManager.java [getRegistry]:49) - Initialising RESTXQ... 
2019-03-27 09:46:01,845 [main] INFO  (RestXqServiceRegistryManager.java [getRegistry]:67) - RESTXQ is ready. 
2019-03-27 09:48:00,298 [main] INFO  (RestXqServiceRegistryManager.java [getRegistry]:49) - Initialising RESTXQ... 
2019-03-27 09:48:00,304 [main] INFO  (RestXqServiceRegistryManager.java [getRegistry]:67) - RESTXQ is ready. 
grantmacken commented 5 years ago

OK. What I can say is despite the pain of working with cached registered restXQ functions, from my experience the registering of these function in a container world is no different from running eXist in localhost dev env or VPS host.

Have you setup a docker volume to persist the eXist data dir as mount volumes?

docker volume ls

If you haven't take a look at the README

This repo provides a docker-compose.yml for use with docker-compose https://docs.docker.com/compose/. We highly recommend docker-compose for local development

On Wed, 27 Mar 2019 at 22:57, Gary Cornelius notifications@github.com wrote:

Thanks again for the pointer, when I just tried a docker stop exist and the docker start exist and I could see the second initialization for stop/start (following the initial install one) but still no Registered RESTXQ Resource Function as expected for the XQM files I PUT in directly after install at the top level.

2019-03-27 09:46:01,822 [main] INFO (RestXqServiceRegistryManager.java [getRegistry]:49) - Initialising RESTXQ... 2019-03-27 09:46:01,845 [main] INFO (RestXqServiceRegistryManager.java [getRegistry]:67) - RESTXQ is ready. 2019-03-27 09:48:00,298 [main] INFO (RestXqServiceRegistryManager.java [getRegistry]:49) - Initialising RESTXQ... 2019-03-27 09:48:00,304 [main] INFO (RestXqServiceRegistryManager.java [getRegistry]:67) - RESTXQ is ready.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/eXist-db/docker-existdb/issues/66#issuecomment-477071159, or mute the thread https://github.com/notifications/unsubscribe-auth/ABrSYOs4nsPwJ2rQfAYWVIzPAIbUDENCks5va0CCgaJpZM4cGilR .

-- Take Care Grant Mackenzie

rapport commented 5 years ago

Yes, I start exist with a persistent volume along the lines of:

sudo docker run --restart=always \
        -d \
        -it \
        --name=exist \
        -p 8080:8080 -p 8443:8443 \
        --volume /data/exist-data:/exist-data \
        existdb/existdb:latest

Does anyone know a command to make the uploaded XQM register if it is not happening automatically on upload?

duncdrum commented 5 years ago

exrest:register-module(xs:anyURI($regPath) ?

rapport commented 5 years ago

Bingo it works, many thanks for the all the help which was much appreciated! I am now really happy I can register them using the latest version with the following command which works fine now I know it works that way! In other versions of EXISTDB I had used it would just autoregister when I uploaded the file and I hadn't known this alternative trigger process to register it with a XQuery in eXide after it had uploaded.

 xquery version "3.1";
declare namespace exrest = "http://exquery.org/ns/restxq/exist";
exrest:register-module(xs:anyURI('/db/forgot.xqm'))
adamretter commented 5 years ago

So autoregistration should always work. It is enabled via a trigger which is configured on the root collection by default.

You should check your /db/system/config/db/collection.xconf for the trigger. Or check your specific collection's collection.xconf to make sure you have not disabled it.

On Thu, 28 Mar 2019, 07:19 Gary Cornelius, notifications@github.com wrote:

Bingo it works, many thanks for the all the help which was much appreciated! I am now really happy I can register them using the latest version with the following command which works fine now I know it works that way! In other versions of EXISTDB I had used it would just autoregister when I uploaded the file and I hadn't known this alternative trigger process to register it with a XQuery in eXide after it had uploaded.

xquery version "3.1"; declare namespace exrest = "http://exquery.org/ns/restxq/exist"; exrest:register-module(xs:anyURI('/db/forgot.xqm'))

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eXist-db/docker-existdb/issues/66#issuecomment-477395198, or mute the thread https://github.com/notifications/unsubscribe-auth/ABNJudM8ob56g069AcTPMK3fvCn1regbks5vbAqBgaJpZM4cGilR .

adamretter commented 5 years ago

P.s. the defaults when starting with a blank database are taken from - https://github.com/eXist-db/exist/blob/develop/collection.xconf.init

Is that file present in the Docker image?

On Thu, 28 Mar 2019, 10:03 Adam Retter, adam.retter@googlemail.com wrote:

So autoregistration should always work. It is enabled via a trigger which is configured on the root collection by default.

You should check your /db/system/config/db/collection.xconf for the trigger. Or check your specific collection's collection.xconf to make sure you have not disabled it.

On Thu, 28 Mar 2019, 07:19 Gary Cornelius, notifications@github.com wrote:

Bingo it works, many thanks for the all the help which was much appreciated! I am now really happy I can register them using the latest version with the following command which works fine now I know it works that way! In other versions of EXISTDB I had used it would just autoregister when I uploaded the file and I hadn't known this alternative trigger process to register it with a XQuery in eXide after it had uploaded.

xquery version "3.1"; declare namespace exrest = "http://exquery.org/ns/restxq/exist"; exrest:register-module(xs:anyURI('/db/forgot.xqm'))

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eXist-db/docker-existdb/issues/66#issuecomment-477395198, or mute the thread https://github.com/notifications/unsubscribe-auth/ABNJudM8ob56g069AcTPMK3fvCn1regbks5vbAqBgaJpZM4cGilR .

grantmacken commented 5 years ago

The whole webapp dir is copied from the ant build into distroless.

&& cp -r webapp $EXIST_MIN \

So if it is and artifact from the build it should be there .. unless its something that is created after the build

On Thu, 28 Mar 2019 at 16:04, Adam Retter notifications@github.com wrote:

P.s. the defaults when starting with a blank database are taken from - https://github.com/eXist-db/exist/blob/develop/collection.xconf.init

Is that file present in the Docker image?

On Thu, 28 Mar 2019, 10:03 Adam Retter, adam.retter@googlemail.com wrote:

So autoregistration should always work. It is enabled via a trigger which is configured on the root collection by default.

You should check your /db/system/config/db/collection.xconf for the trigger. Or check your specific collection's collection.xconf to make sure you have not disabled it.

On Thu, 28 Mar 2019, 07:19 Gary Cornelius, notifications@github.com wrote:

Bingo it works, many thanks for the all the help which was much appreciated! I am now really happy I can register them using the latest version with the following command which works fine now I know it works that way! In other versions of EXISTDB I had used it would just autoregister when I uploaded the file and I hadn't known this alternative trigger process to register it with a XQuery in eXide after it had uploaded.

xquery version "3.1"; declare namespace exrest = "http://exquery.org/ns/restxq/exist"; exrest:register-module(xs:anyURI('/db/forgot.xqm'))

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/eXist-db/docker-existdb/issues/66#issuecomment-477395198 , or mute the thread < https://github.com/notifications/unsubscribe-auth/ABNJudM8ob56g069AcTPMK3fvCn1regbks5vbAqBgaJpZM4cGilR

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/eXist-db/docker-existdb/issues/66#issuecomment-477428300, or mute the thread https://github.com/notifications/unsubscribe-auth/ABrSYLKB8uVJWE9ckdr88_gJIr7C74D5ks5vbDFAgaJpZM4cGilR .

-- Take Care Grant Mackenzie

adamretter commented 5 years ago

Grant, the template is in the root, not the webapp sub-directory... Maybe that is the issue?

On Thu, 28 Mar 2019, 13:35 Grant MacKenzie, notifications@github.com wrote:

The whole webapp dir is copied from the ant build into distroless.

&& cp -r webapp $EXIST_MIN \

So if it is and artifact from the build it should be there .. unless its something that is created after the build

On Thu, 28 Mar 2019 at 16:04, Adam Retter notifications@github.com wrote:

P.s. the defaults when starting with a blank database are taken from - https://github.com/eXist-db/exist/blob/develop/collection.xconf.init

Is that file present in the Docker image?

On Thu, 28 Mar 2019, 10:03 Adam Retter, adam.retter@googlemail.com wrote:

So autoregistration should always work. It is enabled via a trigger which is configured on the root collection by default.

You should check your /db/system/config/db/collection.xconf for the trigger. Or check your specific collection's collection.xconf to make sure you have not disabled it.

On Thu, 28 Mar 2019, 07:19 Gary Cornelius, notifications@github.com wrote:

Bingo it works, many thanks for the all the help which was much appreciated! I am now really happy I can register them using the latest version with the following command which works fine now I know it works that way! In other versions of EXISTDB I had used it would just autoregister when I uploaded the file and I hadn't known this alternative trigger process to register it with a XQuery in eXide after it had uploaded.

xquery version "3.1"; declare namespace exrest = "http://exquery.org/ns/restxq/exist"; exrest:register-module(xs:anyURI('/db/forgot.xqm'))

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <

https://github.com/eXist-db/docker-existdb/issues/66#issuecomment-477395198

,

or mute the thread <

https://github.com/notifications/unsubscribe-auth/ABNJudM8ob56g069AcTPMK3fvCn1regbks5vbAqBgaJpZM4cGilR

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/eXist-db/docker-existdb/issues/66#issuecomment-477428300 , or mute the thread < https://github.com/notifications/unsubscribe-auth/ABrSYLKB8uVJWE9ckdr88_gJIr7C74D5ks5vbDFAgaJpZM4cGilR

.

-- Take Care Grant Mackenzie

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eXist-db/docker-existdb/issues/66#issuecomment-477467699, or mute the thread https://github.com/notifications/unsubscribe-auth/ABNJuZ6o7b6f-4EgjzClfbQ1P6MBgFOMks5vbGKsgaJpZM4cGilR .

grantmacken commented 5 years ago

OK, I'll check the Dockerfile

On Thu, 28 Mar 2019 at 19:53, Adam Retter notifications@github.com wrote:

Grant, the template is in the root, not the webapp sub-directory... Maybe that is the issue?

On Thu, 28 Mar 2019, 13:35 Grant MacKenzie, notifications@github.com wrote:

The whole webapp dir is copied from the ant build into distroless.

&& cp -r webapp $EXIST_MIN \

So if it is and artifact from the build it should be there .. unless its something that is created after the build

On Thu, 28 Mar 2019 at 16:04, Adam Retter notifications@github.com wrote:

P.s. the defaults when starting with a blank database are taken from - https://github.com/eXist-db/exist/blob/develop/collection.xconf.init

Is that file present in the Docker image?

On Thu, 28 Mar 2019, 10:03 Adam Retter, adam.retter@googlemail.com wrote:

So autoregistration should always work. It is enabled via a trigger which is configured on the root collection by default.

You should check your /db/system/config/db/collection.xconf for the trigger. Or check your specific collection's collection.xconf to make sure you have not disabled it.

On Thu, 28 Mar 2019, 07:19 Gary Cornelius, <notifications@github.com

wrote:

Bingo it works, many thanks for the all the help which was much appreciated! I am now really happy I can register them using the latest version with the following command which works fine now I know it works that way! In other versions of EXISTDB I had used it would just autoregister when I uploaded the file and I hadn't known this alternative trigger process to register it with a XQuery in eXide after it had uploaded.

xquery version "3.1"; declare namespace exrest = "http://exquery.org/ns/restxq/exist"; exrest:register-module(xs:anyURI('/db/forgot.xqm'))

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <

https://github.com/eXist-db/docker-existdb/issues/66#issuecomment-477395198

,

or mute the thread <

https://github.com/notifications/unsubscribe-auth/ABNJudM8ob56g069AcTPMK3fvCn1regbks5vbAqBgaJpZM4cGilR

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <

https://github.com/eXist-db/docker-existdb/issues/66#issuecomment-477428300

, or mute the thread <

https://github.com/notifications/unsubscribe-auth/ABrSYLKB8uVJWE9ckdr88_gJIr7C74D5ks5vbDFAgaJpZM4cGilR

.

-- Take Care Grant Mackenzie

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/eXist-db/docker-existdb/issues/66#issuecomment-477467699 , or mute the thread < https://github.com/notifications/unsubscribe-auth/ABNJuZ6o7b6f-4EgjzClfbQ1P6MBgFOMks5vbGKsgaJpZM4cGilR

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/eXist-db/docker-existdb/issues/66#issuecomment-477471851, or mute the thread https://github.com/notifications/unsubscribe-auth/ABrSYGDGSdylY4X52FChhMlqkWsKhuoTks5vbGcCgaJpZM4cGilR .

-- Take Care Grant Mackenzie

grantmacken commented 5 years ago

Yep missed that. Will have to cp that over. I'm busy for, the next few days, if someone else will like fix it.

On Thu, 28 Mar 2019 at 19:56, Grant MacKenzie grantmacken@gmail.com wrote:

OK, I'll check the Dockerfile

On Thu, 28 Mar 2019 at 19:53, Adam Retter notifications@github.com wrote:

Grant, the template is in the root, not the webapp sub-directory... Maybe that is the issue?

On Thu, 28 Mar 2019, 13:35 Grant MacKenzie, notifications@github.com wrote:

The whole webapp dir is copied from the ant build into distroless.

&& cp -r webapp $EXIST_MIN \

So if it is and artifact from the build it should be there .. unless its something that is created after the build

On Thu, 28 Mar 2019 at 16:04, Adam Retter notifications@github.com wrote:

P.s. the defaults when starting with a blank database are taken from - https://github.com/eXist-db/exist/blob/develop/collection.xconf.init

Is that file present in the Docker image?

On Thu, 28 Mar 2019, 10:03 Adam Retter, adam.retter@googlemail.com wrote:

So autoregistration should always work. It is enabled via a trigger which is configured on the root collection by default.

You should check your /db/system/config/db/collection.xconf for the trigger. Or check your specific collection's collection.xconf to make sure you have not disabled it.

On Thu, 28 Mar 2019, 07:19 Gary Cornelius, < notifications@github.com> wrote:

Bingo it works, many thanks for the all the help which was much appreciated! I am now really happy I can register them using the latest version with the following command which works fine now I know it works that way! In other versions of EXISTDB I had used it would just autoregister when I uploaded the file and I hadn't known this alternative trigger process to register it with a XQuery in eXide after it had uploaded.

xquery version "3.1"; declare namespace exrest = "http://exquery.org/ns/restxq/exist"; exrest:register-module(xs:anyURI('/db/forgot.xqm'))

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <

https://github.com/eXist-db/docker-existdb/issues/66#issuecomment-477395198

,

or mute the thread <

https://github.com/notifications/unsubscribe-auth/ABNJudM8ob56g069AcTPMK3fvCn1regbks5vbAqBgaJpZM4cGilR

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <

https://github.com/eXist-db/docker-existdb/issues/66#issuecomment-477428300

, or mute the thread <

https://github.com/notifications/unsubscribe-auth/ABrSYLKB8uVJWE9ckdr88_gJIr7C74D5ks5vbDFAgaJpZM4cGilR

.

-- Take Care Grant Mackenzie

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/eXist-db/docker-existdb/issues/66#issuecomment-477467699 , or mute the thread < https://github.com/notifications/unsubscribe-auth/ABNJuZ6o7b6f-4EgjzClfbQ1P6MBgFOMks5vbGKsgaJpZM4cGilR

.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/eXist-db/docker-existdb/issues/66#issuecomment-477471851, or mute the thread https://github.com/notifications/unsubscribe-auth/ABrSYGDGSdylY4X52FChhMlqkWsKhuoTks5vbGcCgaJpZM4cGilR .

-- Take Care Grant Mackenzie

-- Take Care Grant Mackenzie

duncdrum commented 5 years ago

@rapport thank you for your bug report, i ve commited a fix that according to my testing solves the problem. Could you please confirm that the xqm-put branch solves your initial problem?

rapport commented 5 years ago

Thanks for looking into this and for help. I am happy with the workaround now but I don't think the change made fixes the problem... However, possibly it is user error testing the change. What I did was download you branch and then ran as follows in the folder with the docker file:

sudo docker build . -t existput -f Dockerfile
docker run -d existput:latest
sudo docker run --restart=always \
        -d \
        -it \
        --name=exist \
        -p 8080:8080 -p 8443:8443 \
        --volume /data/exist-data:/exist-data \
        existput:latest

I tried restarting the docker container also to see if would register but it didn't and only registered when I run the XQuery that was successful for me previously!

duncdrum commented 5 years ago

hmm strange can you check the output of

docker exec existput java -jar start.jar client -q -u admin -P '' -x 'rest:resource-functions()

also what does the restxq.log say?

adamretter commented 4 years ago

I have now fixed this for the new eXist-db 5.x.x Docker images - https://github.com/eXist-db/exist/pull/2977