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

DateTimeFormatter invalid format #163

Open
liuzongqing opened this issue Mar 23, 2015 · 6 comments
Open

DateTimeFormatter invalid format #163

liuzongqing opened this issue Mar 23, 2015 · 6 comments

Comments

@liuzongqing
Copy link

whatever run the old version or the lastest version, my ice could not get the data from the dashboard.
It's 500 code from the browser. And in the log file of backend, i found this error message when visit the dashboard.

| Error 2015-03-23 02:58:26,133 [http-bio-9090-exec-8] ERROR errors.GrailsExceptionResolver - IllegalArgumentException occurred when processing request: [POST] /ice/dashboard/getData
Invalid format: "2015-03-23 02AM" is malformed at "AM". Stacktrace follows:
Message: Invalid format: "2015-03-23 02AM" is malformed at "AM"
Line | Method
->> 899 | parseDateTime in org.joda.time.format.DateTimeFormatter


| 407 | doGetData in com.netflix.ice.DashboardController
| 321 | doCall . . . in com.netflix.ice.DashboardController$_closure11
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
1427079506549

@orieg
Copy link
Contributor

orieg commented Mar 31, 2015

which version are you using? do you get this just when starting ice reader or when using a new date interval from the UI?

@liuzongqing
Copy link
Author

I have updated newest version.
After start the ice reader,then visit the reader dashboard, backend log will show these error.

@orieg
Copy link
Contributor

orieg commented Apr 8, 2015

Can you provide the http request sent when you access the UI? You can use Chrome with the Developer Console. This will help understand what is the JSON request sent to the app. The issue may be in the "end" parameter that doesn't follow the dayFormatter but I'm not sure given the limited debug info.

@liuzongqing
Copy link
Author

URL: ice/dashboard/getData
Parameters:
aggregate: "stats"
breakdown: false
consolidate: "hourly"
end: "2015-09-16 07AM"
factorsps: false
groupBy: "Region"
isCost: true
showsps: false
start: "2015-08-01 12AM"

when I access this URL with the above parameters, server return 500 error

@mk2
Copy link

mk2 commented Nov 6, 2015

I faced the same problem recently. I have assumed it is caused by OS locale setting effect to JodaTime Formatter.

In my language ja_JP, hha of JodaTime formatter requires a string like 01午前.
(午前 corresponds to AM in English)

So the problem might be caused only in non-English locale users. (not using AM and PM)

But a solution is simple due to a nature of the problem. You must set the following GRAILS_OPS, and do run-app.

GRAILS_OPTS=-Duser.language=en -Duser.region=US ...

It works for me perfectly.

@daachi
Copy link

daachi commented Jun 21, 2016

How about when running in tomcat? I've tried GRAILS_OPTS, CATALINA_OPTS, JAVA_OPTS with different permutations of user.{language,region} with no luck.

jonbrouse/docker-ice#14

I was able to apply the fix mentioned in that issue, and now it works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants