Unable to login (likely cause: timeout exceeded) #159
Comments
Hi @g0ukb! Installing Ghost on a Raspberry Pi eh? 😃 Love the effort you're putting into this 👍 First off, Ghost 0.11.4 is supported - I simply forgot to update the Play Store listing after the last release (thanks for pointing that out!). In any case there is no difference between 0.11.3 and 0.11.4 from the perspective of Quill. Coming to the issue: does the "could not connect" message appear after ~10 seconds, or quickly after you tap the Sign In button? I suspect it's the former. I think you're hitting the connection timeout limit, which is currently set to 10 seconds. The "- - ms - -" after your POST request also hints at that, since it's supposed to print the response time there, so "- -" probably means the request was cancelled/aborted (?) maybe due to a timeout. I speed-tested your blog's login page informally, here's what I'm seeing:
For diagnostics, you'll get useful information from your phone's logs moreso than the server logs. If you're interested, you can simply download Android's debug tool Let me know if I can help further!
|
Vicky - thanks for the incredibly prompt reply - you almost certainly have
identified the problem! I have a couple of old first generation RPis that
were running Lighttpd webservers and i decided I would see if Ghost would
run on one. It was quite a pain to install - a newer RPi with Armv7 has
much better support and a faster quad core processor compared to my old
single core Armv6 RPi. Ghost is SLOW when it starts-up, although once
running it is actually quite usable apart from slow login. I think the
login problem gets fixed if I replace bcryptjs with normal bcrypt but
trying to do this evening that caused compile errors in node - again,
mainly because of poor support for Armv6 I think.
If I can't replace bcryptjs there is little I can do with this attempt to
repurpose the Rpi - Ghost is the only thing running and network latency is
very little so the problem is purely lack of processing power of the old
RPi. I can always use a quad-core model but part of the exercise was to see
if I could reuse hardware that is way fast enough for a normal webserver
for node.js and Ghost. I guess I now know the answer :-(
Don't suppose there's an easy way to up that timeout value??
Love the effort you're putting into this 👍
On the contrary - the SOLE reason I decided to run Ghost was because I was
looking around for an Android off-line blogging tool (I have a campervan
and so periods of time without internet) and Quill kept getting rave
comments. So I installed Ghost purely to try Quill! So, THANK YOU for all
the effort you have put in to it - I'm sure I can sort something out re
Ghost and have this all in place for when I'm next off-grid.
Thanks again for the quick response. Oh, and thanks for the Android SDK
tools link - I really must get up to speed with Android.
Brian
…On 3 February 2017 at 20:05, Vicky Chijwani ***@***.***> wrote:
Hi @g0ukb <https://github.com/g0ukb>! Installing Ghost on a Raspberry Pi
eh? 😃 Love the effort you're putting into this 👍
First off, Ghost 0.11.4 *is* supported - I simply forgot to update the
Play Store listing after the last release (thanks for pointing that out!).
In any case there is no difference between 0.11.3 and 0.11.4 from the
perspective of Quill.
Coming to the issue: does the "could not connect" message appear after ~10
seconds, or quickly after you tap the Sign In button? I suspect it's the
former. I think you're hitting the request timeout limit, which is
currently set to 10 seconds. The "- - ms - -" after your POST request also
hints at that, since it's supposed to print the response time there, so "-
-" probably means the request was cancelled/aborted (?) maybe due to a
timeout.
I speed-tested your blog's login page informally, here's what I'm seeing:
-
According to pingdom.com
<https://tools.pingdom.com/#!/dJl9bQ/http://iambrian.raspberryweb.uk/ghost/signin/>,
it takes 11-13 seconds to load around the world, which is quite high.
Cities I tested were Stockholm, New York, and Melbourne. Now I know you're
self-hosting this so your device and the server are probably on the same
LAN - I don't know what the load times for you are, but if it's > 10 sec
then you might be hitting the timeout. Which might mean your Rπ is under
high load?
-
When I try to login to your blog (with incorrect email/password of
course - only for testing!), it takes a long time to respond, although I do
get the message "There is no such user", which means the connection
*was* made successfully.
For diagnostics, you'll get useful information from your phone's logs
moreso than the server logs. If you're interested, you can simply download
Android's debug tool adb from here
<https://developer.android.com/studio/releases/platform-tools.html#download>
(download "SDK Platform-Tools for Linux") and use adb logcat to view the
logs - you will probably see an error like the one below when the login
fails.
Let me know if I can help further!
------------------------------
java.net.SocketTimeoutException: timeout
at okio.Okio$4.newTimeoutException(Okio.java:227)
at okio.AsyncTimeout.exit(AsyncTimeout.java:284)
at okio.AsyncTimeout$2.read(AsyncTimeout.java:240)
at okio.RealBufferedSource.indexOf(RealBufferedSource.java:325)
at okio.RealBufferedSource.indexOf(RealBufferedSource.java:314)
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:210)
...
Caused by: java.net.SocketTimeoutException
at java.net.PlainSocketImpl.read(PlainSocketImpl.java:488)
at java.net.PlainSocketImpl.access$000(PlainSocketImpl.java:37)
at java.net.PlainSocketImpl$PlainSocketInputStream.read(PlainSocketImpl.java:237)
at okio.Okio$2.read(Okio.java:138)
at okio.AsyncTimeout$2.read(AsyncTimeout.java:236)
at okio.RealBufferedSource.indexOf(RealBufferedSource.java:325)
...
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#159 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACKNcM_fIcfJXrAVyUbOKSO9pZhT5zBOks5rY4iOgaJpZM4L2rs5>
.
|
Glad to help however I can :). Your use-case does seem pretty interesting, and yes, Quill was designed for exactly the kind of offline scenarios that travellers encounter. However the login step must of course happen online - once the data is with Quill, most of it should work as well offline as it does online (except image uploading - it will take some sustained effort to support offline image "uploads").
Ah, I see, that's unfortunate.
Not without a new update - which means you'll need an internet connection to download the update :). However if you can get a stable-enough connection to download a few megabytes, I can up the timeout to, say, 20 seconds. Let me know if you want this. Or... you can just try logging in a bunch of times, and one of those might succeed, since I am in fact able to connect to your blog and get a proper error response from Ghost ("no such user") from halfway across the world. Of course, after login the data download will be a few 100s of KBs so that also needs to succeed. It'll be a hit-or-miss situation.
Interesting. I never thought to market Quill to non-Ghost users, under the (seemingly false) assumption that nobody would go to the trouble of dealing with a whole new platform just to use the app. This gives me some ideas 🤔
Brian, I'm humbled and motivated to know that you're interested enough in Quill to go to all this trouble! |
Off-line blogging software is quite rare - good off-line blogging software
is extremely rare! I had been using an old Blogger account for my travel
blog but it was a real pain to use offline. Last year I discovered Classeur
which was good but I would prefer something pure Android - hence my
interest in Quill. My use case is simple - I have a small campervan and my
wife and I vacation in it for 4-5 months each year. Even here in the UK it
is easy to be off grid with no WiFi or 3G phone at a campsite. The
campervan is tiny so we take little tech, often just a phone or 7" tablet.
I'd like to offline blog text and publish when I get signal, if I get Wifi
then I'll add photos and tidy up the ragged posts - although Markdown means
little bad formatting. So offline images is neither a requirement nor would
it really make sense
So I was looking for a new blogging platform and didn't want to use
Wordpress (I tried it a few years ago and had problems with security). I
can pay for a cloud blog but it is nice to run a home server - I saw Quill
and thought why not try Ghost. Of course, that was before I realised what a
huge stack node.js was, especially on a tiny machine like a Raspberry Pi. I
can run something more powerful but the appeal of the tiny 5W of power
running 24*7 compared to an i386 server box is appealing (and economical).
Apart from sign-on the RPi is OK(ish) for general use - no real need for
speed for a blog-server - I doubt I get 20-30 people per day looking at my
blog - it's more a personal diary and to let kids and friends know what's
happening.
If it is easy to make a 20 sec timeout version I have no problem
downloading. I'm currently at home with decent internet and an i7 Linux box
- I'm just trying to get all the toolware together for a trip in a month or
so.
As for Quill to non-Ghost users - I'm assuming that on most platforms
node.js and Ghost are simple installs so if you have a best of breed
Android off-line blogging tool then I think there are definitely
opportunities. Downside is that at $19 per month Ghost is fairly expensive
if you don't run your own server so the market may be limited to either
techies or folk with more money than me!
I am looking forward to using Quill - your Play Store score of 4.8 suggests
a phenomenal tool. If it is simple to provide a version with an increased
timer then I'd love to try but perhaps I need to be sensible and try
putting Ghost on something with a little more processing power.
BTW I did try multiple attempts to log-in but I think the basic bcryptjs
module is designed to be CPU intensive deliberately to stop brute force
attacks and on the RPi is just too much for the slow processor.
Vicky - believe me, it is I who am humbled - I am a retired developer
(actually I worked for IBM and was instrumental in bringing Java into the
mainstream - although I've never written any Java code myself!) but when I
see open source projects like Quill developed in people's spare time I'm
ashamed of how little I develop these days. Maybe I need to start spending
long nights in front of my keyboard with coffee and pizza rather than
vacationing in my campervan!!
Brian
… |
Now that is truly fascinating. I cannot imagine living off the grid for months on end - too reliant on modern technology.
For an old RPi, yes, Node is probably too much.
I basically have to tweak the number and rebuild, that's all. Since you still have a month to go, I'm going to wait to make the next release until there are some other updates accumulated - I don't want to make 2 releases back-to-back and annoy people. Expect an update in the next 2 weeks or so - I hope that's ok.
These are valuable thoughts, thanks for sharing.
That 4.8 rating is from a small number of users (~60 total), so it's not such a big feat after all :). Half the battle is won merely by being responsive, and the other half by prioritizing issues reported in Play Store reviews ;)
Makes sense. Do you have hard numbers on, for example, how long it actually takes to login from Chrome on your phone? Because if it's taking > 20 sec, we may need an even higher timeout?
Wow, you have the most intriguing stories :)
And I should try camping for a few months some time because it does sound rather temping and peaceful! |
I saw your Play Store review - thanks! I guess I can close this thread since there's nothing more to do. |
Vicky - apologies - I wanted to leave a review before emailing and closing
the issue.
After much frustration with SD cards I installed Ghost on a Raspberry Pi 3
this morning. As I expected an Armv7 install was trivial but still quite
slow. Anyway the blog (now at http://drifters.raspberryweb.uk but only up
when I'm testing/customising) works fine and works fine with Quill.
Quill is nice! I signed in and then took my phone offline and was able to
test offline authoring and uploading when back on the grid. Excellent!
Vicky this is just what I have been looking for - a good markup blog editor
that will work well offline, and preferably on my Android. Thank You! You
can guess I'll be rating it highly on Play Store.
If it makes sense to up the login time on a future release then I'll try
the old v1 RPi again. It seems a shame to junk it - as I say apart from
login response is adequate - I'm not it in a rush when away in the van. I
think the original RPi was giving loginsd of about 12 sevs and I'm getting
7-8 with the new version - still not very fast! Must look into replacing
bcryptjs.
As for off-grid - I worked with computers for 40 years - I now like to take
some no-tech time!
So please close the issue,
If you do ever decide to charge for Quill then more than happy to pay - it
really is just what I have been looking for and well worth the pain and
several false starts I had trying to get ghost on the original RPi. Indeed
if you want to send your Paypal I'll be happy to send the price of a
beverage or two your way.
Thanks again for a tool which I'm sure is going to be extremely useful -
especially during my proposed 3 month trip to eastern Europe later this
year.
|
Duly noted - I think I'd like to wait for some more feedback on this. I'll have to weigh the UX cost of increasing the timeout against the value it will provide.
Thanks for offering! For the moment I have no plans to turn this into a paid app - the satisfaction of knowing that this is solving problems in an under-served category is enough to keep me motivated :) |
To close the loop on this - this morning I figured out the node-gyp bug
that was stopping me installing bcrypt and replacing bcryptjs. I did this
on my old RPi V1. Ghost is still slow but usable enough for me but the
login time reduces from 12 seconds to under 3, so Quill works fine.
Thanks for your time on what was basically a platform specific problem with
Ghost install.
|
30 sec is not so bad, given that we almost never block the user (except during image uploads). A longer timeout provides big benefits with little downside. There could be a lot of cases where a longer timeout would be beneficial for, including core user scenarios like publishing over a poor connection. Refs: #159
Ghost version: 0.11.4
App version: 1.5.2
Unable to login from Quill
I REALLY want to use this app - so much so I've just spent the last day installing Ghost on an old Raspberry Pi. Quill is not connecting to my account though. On the Android App I get the message "Could not connect to http://iambrian.raspberryweb.uk/ghost. Please try again" All I can see in Ghost is a GET request and then "POST /ghost/api/v0.1/authentication/token/ - - ms - -" (i.e no POST status code returned)
From my Chrome browser on the same phone I can browse to http://iambrian.raspberryweb.uk/ghost and sign in without problem
I'm a newcomer to Ghost and node.js in general so not sure where to find better diagnostics. Looking at Google Play I note 0.11.4 of Ghost is not supported.
The text was updated successfully, but these errors were encountered: