-
-
Notifications
You must be signed in to change notification settings - Fork 166
Creation of a link to webwork3 from the ww2 instructor tools. #347
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
Conversation
|
Some comments:
|
Let me know about 4) and I’ll work on the other pieces before the pull. On Mar 20, 2014, at 5:30 PM, Geoff Goehle notifications@github.com wrote:
|
|
After thinking a bit more about 2) above, I won't worry about doing this now because I have plans to rewrite the way settings/configurations are stored. |
|
I am getting sent to the correct address and Dancer is providing the 404 page (so it is running). This is also preventing me from testing the other pull request. As for the config stuff, rewriting CourseEnvirontment is a longer term project, I think. (It would need to maintain compatibility with ContentGenerator and all the exisiting stuff, for example.) I went ahead and looked it up and its easy to fix this one case. Just change the %showeditors array in localOverrides.conf to %showeditorsLocal and then add @showeditors{ keys %showeditorsLocal } = values %showeditorsLocal; This will overwrite entries in %showeditors from the ones in local, when they exist. (Although it does mean if they want to turn off something they need to explicitly set it to zero, and not just comment it out). |
|
So you said that that /webwork3/courses/course_id/info works? This is really odd. If you’re running dancer on the command line (with the startDancer script), we you go to /webwork3/courses/course_id/manager, there should be a request in the dancer output. Each request has a #. Can you send me the output from that request (It may be about 40 lines or so)? On Mar 21, 2014, at 10:12 AM, Geoff Goehle notifications@github.com wrote:
|
|
So I'm having lots of trouble. One big one is that you don't have the Also, I"m fast losing patience with bower. I finally got it installed (compiled from scratch even) and I can't even use it to get the js files. It wants to download things from git and I"m at the mercy of whatever changes people have made to their repos. So it keeps failing to download something and that kills the whole process. Edit: So it was my schools firewall policy (which I have no control over.) It blocks ssh access to the outside world, which keeps bower from downloading any packages where people have decided to serve them using something other than http. |
|
Ok, I've got it running but when I click on WeBWorK3 it asks me to log in again, and when I do I get the following error in apache/error.log Use of uninitialized value $WeBWorK::Constants::WEBWORK_DIRECTORY in concatenation (.) or string at /opt/webwork/webwork2/lib/WeBWorK/Constants.pm line 41. |
…ia apache using cgi.
|
I do notice the relogin problem. I’ll work on this. It’s odd that you’re getting the other error. I’m not seeing it and I think that this gets set in webwork-apache2.config, line 56: $WeBWorK::Constants::WEBWORK_DIRECTORY = $webwork_dir; where $webwork_dir is set a few lines ahead of it. If I understand, this is truly a global variable. On Mar 23, 2014, at 7:52 PM, Geoff Goehle notifications@github.com wrote:
|
…in js or css or images are served directly by apache in the new configuration, saving some calls to dancer.
|
Ok. I fixed that, and got proper logging happening to in my new setup. Now when I try to log in I get the following error from dancer [21837] error @0.175645> [hit #17]request to POST /courses/TestCourse/login crashed: argument 1 must contain a user_id at /opt/webwork/webwork2-vanilla/webwork3/bin/app.pl line 72 in /usr/local/share/perl/5.14.2/Dancer/Handler.pm l. 98 |
…gi to only start one instance of perl.
|
I figured it out. FastCGI was set up to start a number of dancer instances to help serve requests faster. However, the current session setup that we have doesn't support running multiple instances of dancer off of the same session. There is a short term fix for this and a longer term one. The short term fix is to set nproc in dispatcher.fcgi to 1, which will keep multiple instances from competing for the same session information. The longer term solution (even for standalone dancer servers?) is to choose a different sesseion storage. Based off what I read here: http://search.cpan.org/~yanick/Dancer-1.3121/lib/Dancer/Session.pm#SUPPORTED_ENGINES YAML and Session are both not really up for the job in a production machine. These more advanced session engines are harder to set up though. In any case, I finally got dancer running. My suggestions now that I can see it are:
"error" : "The user is not defined. You may need to authenticate again" from a lot of the ajax calls. |
|
Thanks for tracking a lot of this down. I haven’t had a lot of time today to look at this. I’ll try to get my head around this in the next few days. About the session, you can use the YAML one, look at the setup instruction on github for ww3 and sessions will persist. It’s not the best, but has been working for me this semester. About the authentication, currently there’s a klugh between WW3 authentication and WW2. I posted recently to webwork-devel email list about changing this. We should switch to some more standard authentication and I don’t think it will be too difficult. However, if we switch to a new scheme, this won’t work with WW2, unless we switch WW2 over as well. The error that you see is probably because FastCGI is spewing a lot of separate dancer instances and there’s a new session each time. Switching to YAML should fix that. I still haven’t pulled your PR in to test, but will try tomorrow or Wednesday. On Mar 24, 2014, at 8:20 PM, Geoff Goehle notifications@github.com wrote:
|
|
We might be able to switch WW2 over, but we would have to make sure that it On Mon, Mar 24, 2014 at 8:50 PM, Peter Staab notifications@github.comwrote:
|
|
I think you are right, but for some reason session YAML doesn't help. Geoff. On Mon, Mar 24, 2014 at 9:00 PM, goehle@gmail.com goehle@gmail.com wrote:
|
|
I was thinking about authentication. Are you still planning on using wholesale ContentGenerator pages to fill in gaps in the new interface? If so, then you will have to keep the webwork2 session key up to date when using webwork3 anyway. |
|
Geoff, I think the only views I haven’t done yet are the editor, email and scoring tools. I might be able to get these done by May. I think right now, my plans are to keep using the old ww2 session information. Obviously it’s not bulletproof yet, but seems to work okay. I was thinking if using a different authenticaiton/session for ww3 that streamlines a lot, perhaps we can back port this to ww2 to keep a common codebase for this. Peter On Mar 25, 2014, at 9:01 AM, Geoff Goehle notifications@github.com wrote:
|
|
To recap this situation,
What’s your current thinking on #2? We could go back to proxy pass and force dancer to start in the apache startup script. Alternatively, we could come up with a more robust session storage solution. On Mar 25, 2014, at 9:39 AM, Peter Staab peter.staab@gmail.com wrote:
|
|
I have to admit I'm a bit stumped. There are a lot of configuration On Tue, Mar 25, 2014 at 7:38 PM, Peter Staab notifications@github.comwrote:
|
|
As a follow up, I was reading up on Session::YAML and it is specifically Geoff. On Tue, Mar 25, 2014 at 8:21 PM, goehle@gmail.com goehle@gmail.com wrote:
|
|
I’ve been using YAML on our production machine all semester without trouble. I’m using proxy pass (not the FCGI stuff). On Mar 25, 2014, at 8:54 PM, Geoff Goehle notifications@github.com wrote:
|
|
Are you using starman to run dancer? That creates multiple forks to handle On Tue, Mar 25, 2014 at 8:56 PM, Peter Staab notifications@github.comwrote:
|
|
I believe so. I’m not in a place that I can check our server, but I believe I’m using Starman. On Mar 25, 2014, at 8:58 PM, Geoff Goehle notifications@github.com wrote:
|
|
So like I said, a mystery. Its not FCGI, because that is getting to the On Tue, Mar 25, 2014 at 8:59 PM, Peter Staab notifications@github.comwrote:
|
|
I'll see if I can get it set up on my server tomorrow.
|
Deliver Dancer Via Apache/CGI
|
I pulled in your code and have been playing with it. I think I have fixed the problem with the sessions and YAML. I just pushed a commit that fixes things. However, I haven’t gotten the FCGI stuff working. I’m getting the following error in the apache error log: [Wed Mar 26 11:41:15 2014] [error] [client ::1] File does not exist: /Volumes/WW_test/opt/webwork/webwork2/webwork3/public/dispatch.fcgi/courses/maa101/manager, referer: http://localhost/webwork2/maa101/ Have you seen this? It seems like it should work in that I think the url in dispatch.fcgi should pass to the dancer app. On Mar 25, 2014, at 9:07 PM, Peter Staab peter.staab@gmail.com wrote:
|
|
I haven't gotten that error. Is the public directory (and dispatch.fcgi) owned and readable by wwdata? |
|
I have it set up as it is in the _www group and is readable by the group. I’m getting the js and css files. For example: http://localhost/webwork3/js/bower_components/requirejs/require.js is returned the require.js file correctly, so I think the part of the apache config file starting at line 158 is working: my $webwork3_htdocs_dir = $webwork_dir."/webwork3/public"; Set up /webwork3 to point to the dispatch cgipush @alias, [ "/webwork3/js" => "$webwork3_htdocs_dir/js”]; and if I do http://localhost/webwork3 I get the dispatch.fcgi source, but anything underneath webwork3 (except in the js css or images directory) gives me file not found errors, so it doesn’t appear that dispatch.fcgi is running. On Mar 26, 2014, at 12:08 PM, Geoff Goehle notifications@github.com wrote:
|
|
My development server doesn’t have fastcgi installed, so that was what was going on. I switched to CGI and have some errors due to the fact that my perl is not located in the standard place. On Mar 26, 2014, at 12:19 PM, Peter Staab peter.staab@gmail.com wrote:
|
|
I’m getting a number of errors based on paths. I’m not going to try to track these down on my develop machine. Let me know if the last commit fixes the session errors, and then if you’re satisfied, let’s going with this. I can also do some more testing on my production machine. On a related note: I was reading about starting up dancer as a service and will try to put that code into webwork-apache2.config so starts automatically. This will give another option to run dancer. We can then test both to see a direction we want to go. On Mar 26, 2014, at 12:54 PM, Peter Staab peter.staab@gmail.com wrote:
|
|
Just tested on another machine and I’m getting dancer to work via FCGI and am not seeing an session errors. When you get a chance, pull the latest code off of pstaabp/ww3-features/redirect and let me know. On Mar 26, 2014, at 1:09 PM, Peter Staab peter.staab@gmail.com wrote:
|
|
Will do. (It might be later tonight or tomorrow.) While you are messing around with it, try doing some requests and keeping an eye on top. You should see just just one perl process (and possibly a bunch of apache stuff) that persists until its no longer needed. You might also test changing nproc in dispatch.fcgi to something larger and see if that does anything. Ideally we would like to make more efficient use of servers by letting dancer use more cores. |
|
No problem on the timing. I have a feeling we have a handle on this problem now and it will be good to move on. I’ll try looking a top while I’m doing stuff. I guess the ideal number of processes will probably be server dependent. Do you know if there is a way in unix to determine the processor running (or number of cores)? My server is a virtual server on our campus, so I have no idea what it’s actually running, but I could ask I guess. On Mar 26, 2014, at 2:10 PM, Geoff Goehle notifications@github.com wrote:
|
|
nproc prints the number of processors. |
|
Thanks. One other thing I meant to mention is that if you change dates on the calendar, you’ll probably get a Uncaught TypeError: Cannot read property 'options' of undefined This comes from jquery-ui and they have an old version of jquery-ui via bower. I’ve submitted a bug report through them, but they haven’t updated this. I can tell where the error occurs and the code is changed in the newer version, so if their repository gets updated then I’m guessing this will be cleaned up. On Mar 26, 2014, at 2:15 PM, Geoff Goehle notifications@github.com wrote:
|
|
Ok. I've tested it out on my machine and things work, although I made a dumb mistake which I mention below. The only suggestions I have that actually relate to this pull request are
I feel like 1 and 2 should be taken care of, and 3 can wait for a future pull. Just for record keeping. I've tested on two machines and on both the process of getting it running was:
Helpful things
|
…. This interfered getting to the library browser.
|
My colleague noticed that I broke the link the the current library browser, but have since fixed that.
Thanks for the instructions. I’ll update the wiki for this current method. Also, I’ve been talking with Jason A about updating the script to include ww3. This will help. On Mar 26, 2014, at 5:09 PM, Geoff Goehle notifications@github.com wrote:
|
|
Ok. I tested everything out. The links work and the login issues are more or less gone. I think its time to pull this. |
Creation of a link to webwork3 from the ww2 instructor tools.
No description provided.