Re: [Catalyst] Tutorial (in VMware) keeps losing ability to authenticate

2013-03-04 Thread Tomas Doran

On 2 Mar 2013, at 14:54, Dan Lowe  wrote:

> Thanks for suggestions, everyone. This does seem to be what's happening 
> (despite the fact that the VM is running ntpd). Even quite a while after 
> un-sleeping the computer, the VM continues to have an incorrect date, so ntpd 
> doesn't seem to be doing a very good job here.

ntpd will not adjust things if your time is too wacky, and even if it does, it 
tends to tend _slwly_ back towards a correct setting.

This is exactly the behaviour you want in a server that's on all the time - but 
exactly not what you want in a VM / laptop that gets paused regularly..

Cheers
t0m


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Tutorial (in VMware) keeps losing ability to authenticate

2013-03-02 Thread Dan Lowe

On Feb 21, 2013, at 8:32 PM, Tomas Doran  wrote:

> I'd guess the time in your VM is going crazy? (I.e. not getting updated)..
> 
> Cookies (etc) are based on real time stamps - so if your VM gets very 
> confused about the time, logins will stop working…
> 
> Can you try just running 'date' inside and outside your VM - if these aren't 
> close, that is almost certainly your issue..

Thanks for suggestions, everyone. This does seem to be what's happening 
(despite the fact that the VM is running ntpd). Even quite a while after 
un-sleeping the computer, the VM continues to have an incorrect date, so ntpd 
doesn't seem to be doing a very good job here.

An attempt to install VMware Tools for Linux turned out to be a headache (the 
VM doesn't have a number of things it wants, such as kernel header files). I 
abandoned that idea. I'll just shut down the VM before sleeping the machine, or 
maybe try to suspend the VM before sleep and see if that works just as well.

Dan


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Tutorial (in VMware) keeps losing ability to authenticate

2013-02-21 Thread Tomas Doran
I'd guess the time in your VM is going crazy? (I.e. not getting updated)..

Cookies (etc) are based on real time stamps - so if your VM gets very confused 
about the time, logins will stop working…

Can you try just running 'date' inside and outside your VM - if these aren't 
close, that is almost certainly your issue..

Cheers
t0m


On 14 Feb 2013, at 09:58, Ben Vinnerd  wrote:

> I seem to recall have authentication problems with a Catalyst app a while 
> ago, but only in the IE browser.
> 
> IIRC the problem was something to do with the VM's clock losing sync and an 
> IE cookies clash.
> 
> Check the clock on your VM is accurate - worth a go :)
> 
> Ben
> 
> 
> On 30 January 2013 21:10, Dan Lowe  wrote:
> I have been doing the Catalyst tutorial, at
> 
> https://metacpan.org/module/Catalyst::Manual::Tutorial
> 
> I am using the VMware virtual machine, as recommended. This is running in 
> VMware Fusion 5 Pro on a Mac. Overall it works perfectly fine, except that 
> periodically, I lose the ability to authenticate to the demo CRUD app 
> (MyApp). Based on observation, it seems that the only common factor is that 
> it works fine before my laptop is put to sleep for the night, and it is 
> broken in the morning. It doesn't seem to matter where in the tutorial I am. 
> VMware, and often the Catalyst app server, are running when the laptop goes 
> to sleep.
> 
> (Arguably I should not do that, though the VM itself comes back just fine, 
> and the app server still responds, it's just that I am no longer able to 
> authenticate.)
> 
> Things I have tried already:
> 
> 1. Move the ~/MyApp/ directory aside, remove /tmp/myapp (session data cache), 
> and run the server from e.g. ~/Final/Chapter05/MyApp. This results in the 
> same behavior (app server runs, and response to http requests, but when 
> authenticating, all I ever get is the "Empty username or password" error).
> 
> 2. Reboot the VM
> 
> 3. Reboot the Mac
> 
> 4. Get to a working point, stop the app server, tar up ~/MyApp, and then next 
> time it breaks,
> 
>(stop app server)
>cd ~
>rm -rf ~/MyApp /tmp/myapp
>(untar the copy of ~/MyApp)
>cd ~/MyApp ; script/myapp_server -r
> 
> But that doesn't work, it exhibits the same behavior.
> 
> 5. Delete ~/MyApp and /tmp/myapp and do the tutorial over again, pasting in 
> all of the code from the web page. (This is the only approach that has worked 
> so far, unfortunately.)
> 
> I am just learning Catalyst (obviously), so I don't have any good theories 
> here except that sleeping the VMware VM is corrupting something in its memory 
> or filesystem, causing the trouble. Memory would not seem to be a legitimate 
> suspect though, because rebooting the VM does not fix the problem. Whatever 
> is wrong is persisting across reboots, i.e. it's probably on the filesystem.
> 
> Does the tutorial cache data other than in /tmp/myapp? I have tried to find 
> other caches, but since I am running unprivileged, it seems as if it would 
> not be able to write outside of my home directory or /tmp, and I've already 
> looked in both of those. I don't see anything under ~/MyApp that appears to 
> be dynamic data, only in /tmp/myapp.
> 
> Thanks for any advice,
> Dan
> 
> 
> ___
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
> 
> ___
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Tutorial (in VMware) keeps losing ability to authenticate

2013-02-14 Thread Ben Vinnerd
I seem to recall have authentication problems with a Catalyst app a while
ago, but only in the IE browser.

IIRC the problem was something to do with the VM's clock losing sync and an
IE cookies clash.

Check the clock on your VM is accurate - worth a go :)

Ben


On 30 January 2013 21:10, Dan Lowe  wrote:

> I have been doing the Catalyst tutorial, at
>
> https://metacpan.org/module/Catalyst::Manual::Tutorial
>
> I am using the VMware virtual machine, as recommended. This is running in
> VMware Fusion 5 Pro on a Mac. Overall it works perfectly fine, except that
> periodically, I lose the ability to authenticate to the demo CRUD app
> (MyApp). Based on observation, it seems that the only common factor is that
> it works fine before my laptop is put to sleep for the night, and it is
> broken in the morning. It doesn't seem to matter where in the tutorial I
> am. VMware, and often the Catalyst app server, are running when the laptop
> goes to sleep.
>
> (Arguably I should not do that, though the VM itself comes back just fine,
> and the app server still responds, it's just that I am no longer able to
> authenticate.)
>
> Things I have tried already:
>
> 1. Move the ~/MyApp/ directory aside, remove /tmp/myapp (session data
> cache), and run the server from e.g. ~/Final/Chapter05/MyApp. This results
> in the same behavior (app server runs, and response to http requests, but
> when authenticating, all I ever get is the "Empty username or password"
> error).
>
> 2. Reboot the VM
>
> 3. Reboot the Mac
>
> 4. Get to a working point, stop the app server, tar up ~/MyApp, and then
> next time it breaks,
>
> (stop app server)
> cd ~
> rm -rf ~/MyApp /tmp/myapp
> (untar the copy of ~/MyApp)
> cd ~/MyApp ; script/myapp_server -r
>
> But that doesn't work, it exhibits the same behavior.
>
> 5. Delete ~/MyApp and /tmp/myapp and do the tutorial over again, pasting
> in all of the code from the web page. (This is the only approach that has
> worked so far, unfortunately.)
>
> I am just learning Catalyst (obviously), so I don't have any good theories
> here except that sleeping the VMware VM is corrupting something in its
> memory or filesystem, causing the trouble. Memory would not seem to be a
> legitimate suspect though, because rebooting the VM does not fix the
> problem. Whatever is wrong is persisting across reboots, i.e. it's probably
> on the filesystem.
>
> Does the tutorial cache data other than in /tmp/myapp? I have tried to
> find other caches, but since I am running unprivileged, it seems as if it
> would not be able to write outside of my home directory or /tmp, and I've
> already looked in both of those. I don't see anything under ~/MyApp that
> appears to be dynamic data, only in /tmp/myapp.
>
> Thanks for any advice,
> Dan
>
>
> ___
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Tutorial (in VMware) keeps losing ability to authenticate

2013-01-30 Thread Dan Lowe
I have been doing the Catalyst tutorial, at

https://metacpan.org/module/Catalyst::Manual::Tutorial

I am using the VMware virtual machine, as recommended. This is running in 
VMware Fusion 5 Pro on a Mac. Overall it works perfectly fine, except that 
periodically, I lose the ability to authenticate to the demo CRUD app (MyApp). 
Based on observation, it seems that the only common factor is that it works 
fine before my laptop is put to sleep for the night, and it is broken in the 
morning. It doesn't seem to matter where in the tutorial I am. VMware, and 
often the Catalyst app server, are running when the laptop goes to sleep.

(Arguably I should not do that, though the VM itself comes back just fine, and 
the app server still responds, it's just that I am no longer able to 
authenticate.)

Things I have tried already:

1. Move the ~/MyApp/ directory aside, remove /tmp/myapp (session data cache), 
and run the server from e.g. ~/Final/Chapter05/MyApp. This results in the same 
behavior (app server runs, and response to http requests, but when 
authenticating, all I ever get is the "Empty username or password" error).

2. Reboot the VM

3. Reboot the Mac

4. Get to a working point, stop the app server, tar up ~/MyApp, and then next 
time it breaks,

(stop app server)
cd ~
rm -rf ~/MyApp /tmp/myapp
(untar the copy of ~/MyApp)
cd ~/MyApp ; script/myapp_server -r

But that doesn't work, it exhibits the same behavior.

5. Delete ~/MyApp and /tmp/myapp and do the tutorial over again, pasting in all 
of the code from the web page. (This is the only approach that has worked so 
far, unfortunately.)

I am just learning Catalyst (obviously), so I don't have any good theories here 
except that sleeping the VMware VM is corrupting something in its memory or 
filesystem, causing the trouble. Memory would not seem to be a legitimate 
suspect though, because rebooting the VM does not fix the problem. Whatever is 
wrong is persisting across reboots, i.e. it's probably on the filesystem.

Does the tutorial cache data other than in /tmp/myapp? I have tried to find 
other caches, but since I am running unprivileged, it seems as if it would not 
be able to write outside of my home directory or /tmp, and I've already looked 
in both of those. I don't see anything under ~/MyApp that appears to be dynamic 
data, only in /tmp/myapp.

Thanks for any advice,
Dan


___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/