HTTP 404 Not Found error on Enonic 6.6.0 version

While trying to access Enonic 6.6.0 XP server,this error is thrown

{
status: 404,
message: “HTTP 404 Not Found”,
context: {
authenticated: false,
principals: [
“user:system:anonymous”,
“role:system.everyone”
]
}
}

The first thing I would check is the vhost.properties. http://xp.readthedocs.io/en/stable/operations/configuration.html

On a development machine, it should work with all of the vhost properties commented out, including “enabled = true” and use http://localhost:8080

Otherwise make sure the admin console is mapped.

mapping.admin.host = localhost
mapping.admin.source = /admin
mapping.admin.target = /admin
mapping.admin.userStore = system

I have made the vhost configuration file as :-

enabled=true
mapping.admin.host = localhost
mapping.admin.source = /admin
mapping.admin.target = /admin
mapping.admin.userStore = system

and restarted the server but it is still giving the same error .

{
status: 404,
message: “HTTP 404 Not Found”,
context: {
authenticated: false,
principals: [
“user:system:anonymous”,
“role:system.everyone”
]
}
}

Maybe try to reindex with the cli toolbox. http://xp.readthedocs.io/en/stable/reference/toolbox/index.html

What URL is giving that error?

localhost:8080/admin/tool

Try reindexing both cms-repo and system-repo with the -i option.

./toolbox.sh reindex -a su:password -r cms-repo -b draft,master -i
./toolbox.sh reindex -a su:password -r system-repo -b master -i

it is giving this error with both the command
Authentication failed: {
“status” : 403,
“message” : “HTTP 403 Forbidden”,
“context” : {
“authenticated” : false,
“principals” : [ “user:system:anonymous”, “role:system.everyone” ]
}
}

I am not able to login with su and password after running the command .Please help.

Hi vishal

  • Was it working before? What did you change just before you could not log in?

  • Double-check that there is only one XP instance running in the machine and with the 8080 port.

  • Are there any errors or warnings in the XP logs?

Can you confirm that you get this response when you point the browser to http://localhost:8080/admin/tool ?

{
    status: 404,
    message: "HTTP 404 Not Found",
    context: {
        authenticated: false,
        principals: [
            "user:system:anonymous",
            "role:system.everyone"
        ]
    }
}

Did you have more than one user store?

HI ,

I tried to run the command:

./toolbox.sh reindex -a su:password -r cms-repo -b draft,master -i
./toolbox.sh reindex -a su:password -r system-repo -b master -i

and restarted my server and after logging with su and password,it did not work

and now after reindexing ,users are not able to view content in content studio.

It has become very critical for us as users are not able to see the content

Hi,

I am not sure to understand the problem.
I first saw that you mentioned a 404 error when you try to access to "localhost:8080/admin/tool”.
But then later I see that you manage to log in.

So what is the current problem?
1 - Do you manage to display "localhost:8080/admin/tool” ?
2 - Do you manage to log in with you user?
3 - If you do manage to log in, what is the problem? That you do not see the content in the Content Studio?

I also saw another mention of a 403 when doing a reindex.
The 403 on the reindex command is because it does not find a user “su” with a password “password”.
Please replace the value “su:password" with the correct ones of an admin user.

Hi,

The problem I am facing is currently that I a not able to login with su and password after running this command:

./toolbox.sh reindex -a su:password -r cms-repo -b draft,master -i
./toolbox.sh reindex -a su:password -r system-repo -b master -i

System is not identifying su and password as username and password.

So if I understood correctly.

1 - You have a mapping

mapping.admin.host = [yourhost]
mapping.admin.source = /admin
mapping.admin.target = /admin
mapping.admin.userStore = system

2 - You manage to display the login page of Admin (“[host]/admin/tool”)

3 - When you try to login with the user “su" you get “Login failed!”

Did I understand correctly?

Then is this user “su” stored in the user store “system” ?
Do you have other user store?

This is our setting in vhost file (replaced the URL with **)

enabled = true
mapping.posten.host = ***
mapping.posten.source = /
mapping.posten.target = /portal/master/***

mapping.admin.host = ******
mapping.admin.source = /admin
mapping.admin.target = /admin

so we are not using any user store

Also see Upgrade Enonic XP from 6.5.4 to 6.6.0

The problem with no content in admin was a third machine which as “added” to the cluster before it was ready to be used.
So that should no longer be an issue.

So what remains is invalid super user credentials, so we cannot login to admin nor run a reindex.