InvalidOperationException Invalid non-ASCII... Raspberry PI 3B+

52 views
Skip to first unread message

Greger Olofsson

unread,
Jun 18, 2018, 2:29:56 AM6/18/18
to RavenDB - 2nd generation document database
Good morning, all!

I've started a new project and plan to run it on a raspberry pi 3b+, but I run in to the following exception when I try to start RavenDB.

{
"Url":"/eula/index.html",
"Type":"System.InvalidOperationException",
"Message":"Invalid non-ASCII or control character in header: 0x2212",
"Error":"System.InvalidOperationException: Invalid non-ASCII or control character in header: 0x2212\n 
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.FrameHeaders.ThrowInvalidHeaderCharacter(Char ch)\n 
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.FrameHeaders.ValidateHeaderCharacters(String headerCharacters)\n 
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.FrameHeaders.ValidateHeaderCharacters(StringValues headerValues)\n 
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.FrameResponseHeaders.SetValueFast(String key, StringValues value)\n 
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.FrameHeaders.Microsoft.AspNetCore.Http.IHeaderDictionary.set_Item(String key, StringValues value)\n 
at Raven.Server.Web.System.StudioHandler.d__42.MoveNext() in C:\\Builds\\RavenDB-Stable-4.0\\src\\Raven.Server\\Web\\System\\StudioHandler.cs:line 610\n
--- End of stack trace from previous location where exception was thrown ---\n 
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\n 
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\n 
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\n 
at Raven.Server.Web.System.StudioHandler.d__31.MoveNext() in C:\\Builds\\RavenDB-Stable-4.0\\src\\Raven.Server\\Web\\System\\StudioHandler.cs:line 292\n
--- End of stack trace from previous location where exception was thrown ---\n 
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\n 
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\n 
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\n 
at Raven.Server.Routing.RequestRouter.d__7.MoveNext() in C:\\Builds\\RavenDB-Stable-4.0\\src\\Raven.Server\\Routing\\RequestRouter.cs:line 120\n
--- End of stack trace from previous location where exception was thrown ---\n 
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\n 
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\n 
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\n 
at System.Runtime.CompilerServices.ValueTaskAwaiter`1.GetResult()\n 
at Raven.Server.RavenServerStartup.d__11.MoveNext() in C:\\Builds\\RavenDB-Stable-4.0\\src\\Raven.Server\\RavenServerStartup.cs:line 161"
}

This is when running as a daemon as per the instructions in the readme.txt.
I get the same error, but not for index.html, but rather external-lib.js and others when I run run.sh directly. 
Then index.html loads (but it's a white page) but js etc fails.

New install on latest Raspbian.
RavenDB 4.0.5 for raspberry pi.

Any ideas?

Regards,
Greger

Maxim Buryak

unread,
Jun 18, 2018, 11:12:40 AM6/18/18
to rav...@googlegroups.com
Can you send us a fiddler sessions for those requests?

--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Greger Olofsson

unread,
Jun 18, 2018, 6:46:05 PM6/18/18
to RavenDB - 2nd generation document database
I got a tiny bit closer now.
In order to access the pi from my dev machine with fiddler, I changed the server url from 127.0.0.1 to 0.0.0.0 and added Security.UnsecuredAccessAllowed: PublicNetwork.
Now I get to see the raven but the other requests still fails.
rpi3bp_raven405.saz

Oren Eini (Ayende Rahien)

unread,
Jun 18, 2018, 8:53:43 PM6/18/18
to ravendb
Thanks, that is really valuable.
I still don't understand how that can be. Kestrel is complaining about invalid header value, but the only headers that I have here is:

Just to check, you are running this in little endian mode, right?

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Greger Olofsson

unread,
Jun 19, 2018, 2:53:59 AM6/19/18
to RavenDB - 2nd generation document database
I don't know anything about that, really. How can I check?

Adi Avivi

unread,
Jun 19, 2018, 4:56:15 AM6/19/18
to RavenDB - 2nd generation document database
Hi Greger,
Little endian check:
```
echo -n I | od -to2 | head -n1 | cut -f2 -d" " | cut -c6
```
you should get "1" if it is little endian os,

1) And for the more important question: what is your distro ?
    I've tested 4.0.5 on Raspbian Stretch, and it starts.

2) Please re-verify that ~/RavenDB/Server/settings.json file does contain "ServerUrl": "http://0.0.0.0:8080"

3) After the verification (please send here the content of setting.json), `sudo shutdown -r now` your pi.

Tell me what you've got.




. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hibernating Rhinos Ltd                       cid:image001.png@01CF95E2.8ED1B7D0
Avivi Adi l Core Team
RavenDB paving the way to "Data Made Simple"   http://ravendb.net

To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Adi Avivi

unread,
Jun 19, 2018, 5:04:45 AM6/19/18
to RavenDB - 2nd generation document database
p.s.
Did you change the locale on the pi? (i.e. using raspi-config / Configuring locales, etc)

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Hibernating Rhinos Ltd                       cid:image001.png@01CF95E2.8ED1B7D0
Avivi Adi l Core Team
Office: +972-4-622-7811 l Fax: +972-153-4-622-7811
RavenDB paving the way to "Data Made Simple"   http://ravendb.net

Greger Olofsson

unread,
Jun 19, 2018, 6:50:05 AM6/19/18
to RavenDB - 2nd generation document database
Oh yeah, I did change that to swedish locale.
I switched back to en_GB utf-8 and that works!

Oren Eini (Ayende Rahien)

unread,
Jun 19, 2018, 3:09:01 PM6/19/18
to ravendb
This is very strange, I tried reproducing this using:

Thread.CurrentThread.CurrentCulture = new CultureInfo("sv-SE");
Thread.CurrentThread.CurrentUICulture = new CultureInfo("sv-SE");

But I'm not seeing anything strange there.
What was the exact setting you used?
          
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Oren Eini (Ayende Rahien)

unread,
Jun 19, 2018, 3:24:33 PM6/19/18
to ravendb
Never mind, we have a pretty good idea where the issue is. 


Will be fixed shortly

Greger Olofsson

unread,
Jun 19, 2018, 4:20:59 PM6/19/18
to RavenDB - 2nd generation document database
Cool. Always impressive to see your quick turnaround for bug fixes!

For the record, I had my pi set to sv SE utf-8.
Reply all
Reply to author
Forward
0 new messages