Error when trying to view users
-
I get no errors in the terminal where I'm running docker, I just checked the browser for errors and I get:
Failed to load resource: the server responded with a status of 400 ()
This is the request URL:
{fauth_link}/ajax/user/search?s.sortFields%5B0%5D.name=login&s.sortFields%5B0%5D.order=asc&s.sortFields%5B1%5D.name=fullName&s.sortFields%5B1%5D.order=asc
-
Hmmm. This may be a bug.
Can you give more information about:
- what browser you are using (and does this occur in other browsers)
- what data, if any, you've added to the default fusionauth setup. In particular, did you add a user? What does their data look like?
Screenshots are welcome too .
An alternative to this forum discussion, if you can provide concrete replication steps, is to open a bug here: https://github.com/fusionauth/fusionauth-issues But again, that is only a good option if we have narrowed down the bug to a certain set of steps.
-
@dan This issue happens on Chrome (Version 84.0.4147.89 (Official Build) (64-bit)) and Safari as-well. The data of user contains user information, such as phone number, address, and just a bunch of short strings (street name, etc.) Let me know if there are some steps I could take to provide you with more debugging information.
-
Hmmm. Does the user data have any special characters? Which database are you using (I assume just postgresql if you are using the docker containers)?
-
@dan I am using PostgreSQL, indeed. I don't think the data has any special character to cause this issue, but I could check this out.
-
Got an exception in the console finally:
Jul 24, 2020 3:14:36.612 AM ERROR com.inversoft.scheduler.LogAndRetainFailureHandler - The scheduled service [class io.fusionauth.api.service.user.UserReaper] failed but will be re-run. com.inversoft.search.SearchEngineRequestFailedException: org.elasticsearch.client.ResponseException: method [GET], host [http://search:9200], URI [/fusionauth_user/_doc/_search], status line [HTTP/1.1 400 Bad Request] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [fullName] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"fusionauth_user","node":"tCJ-7yFWTu-Ilu8ckHGhmA","reason":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [fullName] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."}}],"caused_by":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [fullName] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.","caused_by":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [fullName] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."}}},"status":400} at com.inversoft.search.AbstractElasticSearchSearchEngine.request(AbstractElasticSearchSearchEngine.java:195) at com.inversoft.search.AbstractElasticSearchSearchEngine.request(AbstractElasticSearchSearchEngine.java:216) at io.fusionauth.api.service.search.ElasticsearchSearchEngine.executeSearch(ElasticsearchSearchEngine.java:333) at io.fusionauth.api.service.search.ElasticsearchSearchEngine.searchByQueryString(ElasticsearchSearchEngine.java:241) at io.fusionauth.api.service.user.DefaultUserService.deleteBySearch(DefaultUserService.java:602) at io.fusionauth.api.service.user.DefaultUserService.deleteUnverifiedEmailUsers(DefaultUserService.java:664) at io.fusionauth.api.service.user.UserReaper.lambda$run$0(UserReaper.java:50) at java.base/java.util.ArrayList.forEach(ArrayList.java:1510) at io.fusionauth.api.service.user.UserReaper.run(UserReaper.java:41) at com.inversoft.scheduler.InjectableRunnable.run(InjectableRunnable.java:37) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at java.base/java.lang.Thread.run(Thread.java:832) Caused by: org.elasticsearch.client.ResponseException: method [GET], host [http://search:9200], URI [/fusionauth_user/_doc/_search], status line [HTTP/1.1 400 Bad Request] {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [fullName] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"fusionauth_user","node":"tCJ-7yFWTu-Ilu8ckHGhmA","reason":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [fullName] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."}}],"caused_by":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [fullName] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.","caused_by":{"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [fullName] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."}}},"status":400} at org.elasticsearch.client.RestClient.convertResponse(RestClient.java:283) at org.elasticsearch.client.RestClient.performRequest(RestClient.java:261) at org.elasticsearch.client.RestClient.performRequest(RestClient.java:235) at com.inversoft.search.AbstractElasticSearchSearchEngine.request(AbstractElasticSearchSearchEngine.java:192) ... 15 common frames omitted Jul 24, 2020 6:14:36.539 AM ERROR com.inversoft.scheduler.LogAndRetainFailureHandler - The scheduled service [class io.fusionauth.api.service.user.UserReaper] failed AGAIN! The service will still continue to run, but we are going to stop logging the errors. 25-Jul-2020 16:09:02.138 INFO [http-nio-9011-exec-16] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level. java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:432) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:502) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1623) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:832) 27-Jul-2020 23:48:59.250 INFO [http-nio-9011-exec-38] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level. java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:432) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:502) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1623) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:832)
-
What version of elastic search are you using?
How many users do you plan to have? You may want to try switching to the database search engine: https://fusionauth.io/docs/v1/tech/tutorials/switch-search-engines and see if that resolves the issue?
-
I'm using Elastic Search 6.3.1, currently having less than 20 users. I switched to use database search instead of Elastic. I'll switch back to elastic later.
-
Interesting. That is a supported version of Elasticsearch (per https://fusionauth.io/docs/v1/tech/installation-guide/system-requirements ).
If/when you switch back, please try to re-index and see if that solves the issue: https://fusionauth.io/docs/v1/tech/core-concepts/users#reindex
Just to confirm, did switching to the database search engine resolve the issue?
-
@dan Yes, switching to database search engine solved my issue.
-
Hello,
I am happy that I got the answer for my doubt by going through the conversation.
thank you so much.
Samo