Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dispatcher error on Docker Desktop (Windows) #471

Closed
pun-ky opened this issue Oct 3, 2019 · 7 comments
Closed

Dispatcher error on Docker Desktop (Windows) #471

pun-ky opened this issue Oct 3, 2019 · 7 comments
Labels
Milestone

Comments

@pun-ky
Copy link
Contributor

pun-ky commented Oct 3, 2019

when having multiple markets e.g /content/exmaple/en-us ,/content/example/en-gb AEM dispatcher notices an error when creating file in cache then renaming file to target name (swapping cache entry)

the cause of error is volume for cache directory; on Unix based systems it is working correctly. On windows / hyper-v the error might occur:

[Thu Oct 03 08:06:49 2019] [W] [pid 14 (tid 140276883449600)] Unable to rename generated cache file /opt/aem/dispatcher/cache/content/example/demo/en-us.html_SRMSSxuQaC to /opt/aem/dispatcher/cache/content/example/demo/en-us.html: No such file or directory
@pun-ky pun-ky added the bug label Oct 3, 2019
@pun-ky
Copy link
Contributor Author

pun-ky commented Oct 3, 2019

workaround found:

image

disabling volume for cache and creating document roots manually via init script

@mierzwid
Copy link
Contributor

mierzwid commented Oct 4, 2019

I suggest using exec before apache2 starts and creating those missing directories directly in the container. So we will keep one way of creating them no matter if bind mount works or nor and we are in sync with directories dsl from environment plugin:

directories {
            regular(
                    "httpd/logs"
            )
            cache(
                    "httpd/cache/content/example/live",
                    "httpd/cache/content/example/demo"
            )
        }

@pun-ky
Copy link
Contributor Author

pun-ky commented Oct 4, 2019

it would be nice if it will be fixed together with #448

@pun-ky
Copy link
Contributor Author

pun-ky commented Oct 4, 2019

@mierzwid so that this section could be removed, but then cleaning should be moved to clean { }

@pun-ky
Copy link
Contributor Author

pun-ky commented Oct 4, 2019

target DSL

aem {
     environment {
        dockerContainers {
            "httpd" {  // or 'define("httpd")'
                up {
                    exec("mkdir -p /opt/aem/dispatcher/cache/content/example/demo")
                    exec("mkdir -p /opt/aem/dispatcher/cache/content/example/live")
                    exec("command for restarting httpd)
                }
                clean {
                   exec("rm -fr /opt/aem/dispatcher/cache/content/example/demo/*")
                   exec("rm -fr /opt/aem/dispatcher/cache/content/example/live/*")
                }
            }
            "knotx" { // or 'define("knotx")'
                up {
                    // exec any init commands needed
                }
                clean {
                    exec("sudo service knotx restart") // sth like that
                }
            }
        }

@pun-ky pun-ky added this to the 7.4.0 milestone Oct 6, 2019
@pun-ky
Copy link
Contributor Author

pun-ky commented Oct 9, 2019

DSL proposal #477

image

@pun-ky pun-ky modified the milestones: 7.4.0, 8.0.0 Oct 11, 2019
@pun-ky
Copy link
Contributor Author

pun-ky commented Oct 11, 2019

to be released in 8.0.0

@pun-ky pun-ky closed this as completed Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants