Perl 6 - the future is here, just unevenly distributed

IRC log for #webwork, 2014-07-31

| Channels | #webwork index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:32 mgage joined #webwork
01:28 mgage joined #webwork
01:48 mgage joined #webwork
13:00 mgage joined #webwork
14:37 cm-marshall joined #webwork
16:17 aubreyja joined #webwork
16:23 rbeezer joined #webwork
18:16 hij joined #webwork
18:17 mgage joined #webwork
18:17 hij Hello. I just tried to upgrade our installation of webworks and ran into a problem.  I updated using git.
18:17 hij I then went to the admin page, and it all looked okay.
18:17 hij I went to the upgrade course option and got this:
18:17 hij DBD::mysql::db do failed: Specified key was too long; max key length is 1000 bytes
18:17 hij WeBWorK::Utils::CourseIntegrityCheck
18:17 hij /opt/webwork/webwork2/lib/WeBWorK/Utils/CourseIntegrityCheck.pm
18:17 hij 182
18:17 hij WeBWorK::DB::Schema::NewSQL::Std::create_table
18:17 hij 1
18:17 hij What should I do?
18:30 aubreyja hi hij - it sounds like one of your course names is too long for mysql
18:32 hij I just tried it with only the admin course and got the same result.
18:32 aubreyja tried only upgrading the admin course?
18:33 hij Yes
18:33 aubreyja What are you upgrading from?
18:33 hij I am not sure...
18:34 aubreyja you upgraded the code via git?
18:34 hij Our production code was on svn, and we just made the transition from git for this update.
18:35 aubreyja ok, that gives me some context.
18:36 mgage out of curiosity is the mysql new?
18:36 hij dev-db/mysql-5.1.70
18:36 mgage kk
18:36 aubreyja and git branch tells you you're on master?
18:36 hij yes
18:37 aubreyja ok, so, you can get into courses, but the problem (right now) is that you can't upgrade them?
18:37 aubreyja In particular, the application is running
18:37 hij I get an error when I try to go to a course.
18:38 hij apache is running and fine, and I can see the entry page for webwork
18:38 hij I can get to the admin page as well and log in as admin
18:38 aubreyja is that the same error?
18:38 hij It is a different error.
18:39 aubreyja it might have some clues - what does it say?
18:39 hij DBD::mysql::st execute failed: Unknown column 'merge1.visible' in 'field list'
18:39 hij WeBWorK::DB::Schema::NewSQL::Std
18:39 hij /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
18:39 hij 381
18:39 hij WeBWorK::DB::Schema::NewSQL::Merge::_get_fields_where_prepex
18:39 hij 1
18:39 hij looks like I need to upgrade my database!
18:39 aubreyja That's basically saying you haven't upgraded your courses :)
18:39 * hij nods
18:40 aubreyja ok, hmph, it won't even let you upgrade the admin course...
18:40 hij that is correct.
18:40 hij I made a dump of the database before doing any of this.
18:40 aubreyja can you add a new course via the admin course?
18:41 aubreyja good
18:41 hij I will try. I assumed I would have to update the admin course before I could do anything.
18:41 aubreyja mysql 5.1 is old, but it should still work afaik
18:42 hij I get a similar error when I try to create a course:
18:45 aubreyja Hmm...this isn't making sense to me.  Is your db on the same server as the application?
18:46 hij yes
18:47 aubreyja maybe the db errors are a red herring.  Did you set all of the file system permissions as described in the install docs?
18:47 hij The documentation at maa.org assumes you are upgrading. It is not clear to me what to do for a fresh install. I was considering wiping the data base, but I cannot find the instructions for a fresh install?
18:48 hij I see it in the 2.4 installation manual. Is it still the same?
18:48 aubreyja Maybe this will help.  can you create a fresh database, give it all of the permissions, etc., and then hook it into your new ww install? That will at least tell us if mysql 5.1 is all of the sudden verboten
18:49 hij Can I just drop all the tables in my current database?
18:50 aubreyja well one hypothesis is that the current db could be corrupted in some way. So, if you create a fresh db and things work then we can try repairing any problems with the old tables
18:51 aubreyja but, I guess that if you dropped the tables in the current db it would also get rid of any corrupted tables :)
18:51 hij if I just drop and reload my webwork page will it put me through the initialization from the web page?
18:53 aubreyja if you drop the tables then you need to also want to (1) move courses/ to courses_tmp/ (2) create a new courses/ with appropriate permissions and (3) create a new admin course on the command line
18:54 aubreyja that's because otherwise webwork will see your courses under courses/ and look for them in the new db.
18:55 aubreyja It won't really get upset as long as you don't click any of the links, but this will make troubleshooting cleaner
18:55 * hij nods
18:56 cm-marshall joined #webwork
18:58 cm-marshall Hello everyone. I upgraded our school's webwork to the latest git version this morning. Had a couple questions/issues if anyone is watching the channel
18:59 aubreyja sure, what' s up?
18:59 cm-marshall first, it seems like editing problems from the library browser doesn't work - is that known?
19:00 cm-marshall second, I'
19:00 aubreyja it's been reported in the past.  One cause has been having the webwork2 handler not named webwork2 (it's hardcoded somewhere it shouldn't be)
19:00 aubreyja could that be your issue?
19:01 mgage if you want a site for comparision you can use: https://hosted2.webwork.rochester.edu/webwork2/2014_HKUST_demo/
19:01 cm-marshall you mean the first part of the URL? that is webwork2 for me.
19:01 mgage login as profa  and use password profa — that allows you to check if things work in a stably installed site.
19:01 aubreyja I mean the webwork2 on the end of http://.../webwork2
19:02 aubreyja to get to the list of courses
19:02 mgage what kind of error are you getting when editing?
19:02 hij okay, I have dropped all the tables in the database. I removed all the courses and created a link to modelCourse.
19:02 cm-marshall I get a password error for profa/profa
19:02 hij Should I do an OPL-update ?
19:03 cm-marshall here is the error I get: http://pastebin.com/GiU31Djf
19:03 mgage sorry change it to https://hosted2.webwork.rochester.edu/webwork2/HKUST102/
19:03 aubreyja hij - good. then just create the admin course and restart your server
19:03 cm-marshall the error I get when editing
19:03 hij How do I create the admin course?
19:03 mgage or https://hosted2.webwork.rochester.edu/webwork2/HKUST103/
19:03 mgage 102 is in hungarian at the moment :-)
19:03 hij The docs seem to assume it is an upgrade and the admin is already there.
19:04 aubreyja it wouldn't hurt, but is not entirely necessary at this point (but may be soon).  In the 2.4 instructions, search for addcourse
19:04 hij got it, thank you!
19:04 aubreyja let me get you a url, just a second
19:04 aubreyja ok, good
19:05 cm-marshall Editing from the library browser on the hungarian one does work, so it must be a local issue
19:05 aubreyja cm-marshall - I would check file system permissions and then look in chrome's debugger console
19:05 cm-marshall OK, will do. Thanks
19:06 mgage profa should work on the original link now as well.  — what goes wrong with editity
19:06 aubreyja particularly file system permissions of htdocs and below
19:07 mgage and chrome debugger console will give you information — the most likely culpret is that the AJAX calls that the buttons activate aren’t making it back to the server.
19:07 hij tried the add course got the same error:
19:07 hij DBD::mysql::db do failed: Specified key was too long; max key length is 1000 bytes
19:07 hij WeBWorK::DB
19:07 hij /opt/webwork/webwork2/lib/WeBWorK/DB.pm
19:07 hij 376
19:07 hij WeBWorK::DB::Schema::NewSQL::Std::create_table
19:07 hij 1
19:09 aubreyja man, that's weird.  There is certainly no key 1000 bytes long when you try to create the admin course...
19:09 mgage the language code be something unusual?
19:10 hij I am using the mysiam engine???
19:10 aubreyja yeah, I was just thinking about that.  I think myisam is the default on 5.1
19:10 aubreyja is there anything strange in your my.cnf?
19:10 hij Should i be using the innodb?
19:11 * hij shrugs
19:11 aubreyja well, actually we've been recommending myisam for a long time.
19:11 hij looks okay???
19:11 hij Character sets are utf8
19:11 mgage Here you go:  https://confluence.atlassian.com/display/FISHKB/MySQL+Database+Migration+fails+with+Specified+key+was+too+long+max+key+length+is+1000+bytes
19:11 hij default ports and such
19:11 mgage There is a known bug with MySQL related to MyISAM, the UTF8 character set and indexes as you can check here.
19:12 hij ugh....
19:12 mgage http://bugs.mysql.com/bug.php?id=4541
19:12 * hij sighs
19:12 mgage switching the engine seems to fix it.
19:12 aubreyja ah, good.  Then you can just chagne the storage engine to InnoDB
19:12 aubreyja rigth
19:12 mgage yeah google
19:12 hij The engine is not in my.cnf?
19:12 mgage (I hope)
19:12 aubreyja :)
19:13 aubreyja yeah, the default engine is not there, but you can set it there
19:13 aubreyja to soemthing different
19:13 mgage don’t we set the engine in sites.conf now?
19:13 aubreyja yes, actually I did put that into sites.conf a while back - thanks for the reminder :)
19:14 aubreyja so hij there should be an engine setting line somewhere in one of the config files - likely site.conf
19:14 hij It is set to myisam in site.conf
19:14 hij It is lower case.
19:14 aubreyja ok, try changing it to innodb. I don't think the case matters.
19:14 hij Should I set it to INNODB using lower case?
19:15 aubreyja but do drop the tables again, recreate the admin course, etc.
19:16 hij Is there an easier way to drop all tables?
19:16 mgage search for storage_engine in defaults.conf
19:17 aubreyja just use webwork; then drop tables; I think...
19:17 aubreyja in the mysql command line
19:17 hij defaults.conf has this line: storage_engine => 'MYISAM', for the problemLibrary_db hash
19:17 hij That is the only place I see "engine"
19:17 mgage that’s the configuration I have — I don’t see a configuration in site.conf
19:18 mgage for mysiam
19:18 mgage mysiam is working for me — but I have a later version of mysql
19:18 hij is database.conf.dist used at all?
19:19 hij That is the only other file that uses "engine"
19:19 aubreyja just a sec
19:19 hij addcourse worked this time....
19:19 mgage yes — it’s read automatically unless you have a database.conf file — most people don’t change it so they just use database.conf.dist to get automatic updates.
19:20 hij It is using values set in the conf files so it should be okay.
19:20 aubreyja ah - good - after changing the storage engine?
19:20 hij yes
19:20 aubreyja sounds like progress!
19:20 hij should I do the OPL-update now or try to load the page first?
19:21 aubreyja yeah, I think your problem is solved actually, so I'd go ahead and run opl-update at this point
19:22 hij Is it supposed to give all these warning messagees about invalid subjects?
19:22 aubreyja ah, did you update the OPL?
19:22 hij all done.
19:22 hij Yes
19:22 hij Just load the page now and add new courses?
19:23 aubreyja yeah, and check the library browser. If you don't have any (or many) subjects in there then we need to figure out what went wrong with OPL update
19:23 mgage did you set:  $problemLibrary{version}    = "2.5";
19:23 mgage in localOverrides.conf?
19:23 hij yes
19:24 hij Actually, that was the default so no change on that.
19:24 mgage right — but you need 2.5 for the OPL  (2.0 for the older NPL)
19:24 aubreyja and just to be sure - both pg and the OPL at this point are at their latested github master vesion?
19:25 hij I checkout them both out this morning.... now I have permission errors on the directory. Should be easy to fix....
19:26 hij "Successfully created the course Math232-Summer-2014"
19:26 hij I feel like I should pop open an alcoholic beverage.
19:26 aubreyja :)
19:27 hij And I can see problems from the OPL
19:28 aubreyja good - and there are a lot of subjects and chapters?
19:28 hij More than ten so more than I can count.
19:29 aubreyja ok, that sounds reasonable - looks like you're up and running.  Mike or I will likely be around if something else comes up
19:29 hij Yes, thank you! Your help is much appreciated.
19:29 hij How come the folks at Michigan name their sets by chapter? Makes it awkward for us mortals.
19:29 mgage try running the OPL-update again — it shouldn’t be giving those errors — could be permissions if it can’t read some file — not urgent it takes a while to rebuild the OPL database, but when you have time
19:30 aubreyja talk to Gavin about that. I will say he is clearly not mortal though.
19:30 hij It still spits out the erros. Turns out that "Calculus" is an invalid subject. I kind of suspected as much to be honest.
19:31 mgage so there is something still wrong in the library setup
19:32 hij I am not sure. It says it is writing to the "Library Tree" and it looks okay on the website.
19:32 hij I am running it as root so I assume it is not a permissions problem??
19:33 mgage probably not — I use  sudo -E  OPL-update so that root picks up my environment.
19:33 aubreyja maybe it's not finding the subjects list.  Where are you running it from?
19:33 mgage see here: http://webwork.maa.org/pipermail/webwork-devel/2013-October/001310.html
19:33 hij /opt/webwork/webwork2/bin
19:33 hij I grabbed it this morning?
19:33 aubreyja I think that should be fine, but let me check
19:35 aubreyja try running it from webwork-open-problem-library
19:36 hij From the top level of the repo or in the OpenProblemLibrary directory within the repo?
19:36 mgage according to that link I sent you the error message is correct — calculus should not be a valid subject — it’s been replaced by  calculus — single variable,  etc
19:37 aubreyja http://webwork.maa.org/wiki/Installation_Manual_for_2.7_on_Ubuntu_12.04#Updating_the_OPL
19:37 aubreyja is saying top-level of the repo, but maybe Mike's right and everything is fine.
19:38 * hij nods
19:39 mgage so in that link I sent earlier — you (aubreyja) were having the same trouble and it got fixed once OPL was updated to get the lastest subject files —— they changed names last year
19:39 hij When I go to the library browser and click on the "OPL Directory" button everything looks fine.
19:39 aubreyja how many problems does it report seeing?
19:39 hij When I try to click on the "subject" tab at the first page in the library browser it only says "All Subjects"
19:39 mgage but you shouldn’t get any errors when you run OPL-update
19:40 aubreyja yeah, that's wrong. did you try opl-update from the opl repo?
19:40 hij I ran OPL-update from teh /opt/webwork/libraries/webwork-open-problem-library directory, and it gives a long list of "invalid subjects"
19:40 hij I thought this was the top level of the opl repo?
19:40 aubreyja yeah, it is
19:41 aubreyja does 'git remote show origin' indicate any need for updates?
19:41 hij looks clean?
19:41 hij * remote origin
19:41 hij Fetch URL: https://github.com/openwebwork/webwork-open-problem-library.git
19:41 hij Push  URL: https://github.com/openwebwork/webwork-open-problem-library.git
19:41 hij HEAD branch: master
19:41 hij Remote branch:
19:41 hij master tracked
19:41 hij Local branch configured for 'git pull':
19:41 hij master merges with remote master
19:41 hij Local ref configured for 'git push':
19:41 hij master pushes to master (up to date)
19:41 hij git pull origin
19:41 hij Already up-to-date.
19:42 aubreyja is WEBWORK_ROOT set in your environment?
19:42 hij I had trouble with that so I invoke OPL-update the following way:
19:42 hij env WEBWORK_ROOT=/opt/webwork/webwork2 /opt/webwork/webwork2/bin/OPL-update
19:42 aubreyja is this bash?
19:43 hij yes
19:43 aubreyja did you do export WEBWORK_ROOT=...
19:44 hij just did, it works without the env prefix, but it still tells me the Calculus is not a valid subject.
19:44 aubreyja ok what is your path to the OPL in site.conf?
19:44 mgage I think it’s reading these things from a file called Taxonomy in the OpenProblemLibrary directory — it’s a text file.
19:45 mgage calculus shouldn’t be an entry in that file
19:45 hij $problemLibrary{root}        ="/opt/webwork/libraries/webwork-open-problem-library/OpenProblemLibrary";
19:45 aubreyja Yes, it tries to do open(IN, "$libraryRoot/Taxonomy")
19:45 hij ls /opt/webwork/libraries/webwork-open-problem-library/OpenProblemLibrary
19:45 hij 270         CollegeOfIdaho  MC            OSU        Taxonomy   UMass-Amherst      Utah       ma122DB     test_problems
19:45 hij 272         Dartmouth       MiamiUOhio    Rochester  Taxonomy2  UVA-FinancialMath  VERSION    ma123DB
19:45 hij 274         FortLewis       Michigan      SDSU       Textbooks  UVA-Stat           WHFreeman  maCalcDB
19:45 hij ASU-topics  Indiana         NAU           SUNYSB     UCSB       UVA-Stew5e         ma112DB    macros
19:45 hij CSUOhio     LoyolaChicago   NewHampshire  TCNJ       UMN        Union              ma117DB    org.sparta
19:47 hij "Calculus" by itself is not in the Taxonomy file.
19:47 mgage ok — than that file is up to date
19:49 aubreyja ah, mike - look at the last change to OPL-update by John.  Maybe ther eis a problem here.
19:49 aubreyja now it's looking for Taxonomy2
19:50 mgage ok — I have a Taxonomy2 file in my directory
19:50 aubreyja ok, well I guess it looks for one or the other.
19:50 mgage (not much different)
19:50 aubreyja try running it yourself - do you get errors?
19:51 mgage updating to the lastest just to be sure ........
19:52 mgage Here is the output:
19:52 mgage Library version is 2.5; using OPLtables!
19:52 mgage Mysql database reinitialized.
19:52 mgage Reading in textbook data from Textbooks in the library /opt/webwork/libraries/webwork-open-problem-library/OpenProblemLibrary.
19:53 mgage Reading in OPL taxonomy from Taxonomy2 in the library /opt/webwork/libraries/webwork-open-problem-library/OpenProblemLibrary.
19:53 mgage Converting data from tagged pgfiles into mysql.
19:53 mgage Nu
19:53 aubreyja yeah, and I've been testing the ww_install a lot and didn't get errors
19:54 aubreyja hij - do you get those lines before the invalid subject messages?
19:54 mgage if you are not seeing those first few lines then there is an error in finding the Taxonomy file — the other errors are red herrings.
19:54 hij hold on. It is off my console. I need to rerun.
19:54 mgage Yes those are the very first lines written
19:54 hij Library version is 2.5; using OPLtables!
19:54 hij Mysql database reinitialized.
19:54 hij Textbooks file was not found in library /opt/webwork/libraries/webwork-open-problem-library. If the path to the problem library doesn't seem
19:54 hij correct, make modifications in webwork2/conf/site.conf ($problemLibrary{root}).  If that is correct then
19:54 hij updating from git should download the Textbooks file.
19:54 hij Taxonomy file was not found in library /opt/webwork/libraries/webwork-open-problem-library. If the path to the problem library doesn't seem
19:54 hij correct, make modifications in webwork2/conf/site.conf ($problemLibrary{root}).  If that is correct then
19:54 hij updating from git should download the Taxonomy file.
19:54 hij Converting data from tagged pgfiles into mysql.
19:55 hij I need to change the root in my conf file. Ugh.
19:55 aubreyja Ah, it's looking in ../webwork-open-problem-library
19:55 aubreyja right
19:55 hij I could not see that message because it floods the console.
19:55 mgage that’s the problem — without correct access to the file everything else goes haywire
19:56 hij Should I point it to the git repo or to the link in the course directory that leads to the repo?
19:56 aubreyja the git repo webwork-open-problem-library/OpenProblemLibrary
19:56 aubreyja (full path)
19:58 aubreyja (and restart the server)
19:58 hij That is what I have? Here is what I had in my site.conf file:
19:58 hij $problemLibrary{root}        ="/opt/webwork/libraries/webwork-open-problem-library/OpenProblemLibrary";
19:59 hij If I do an ls for that I get the following:
19:59 hij ls /opt/webwork/libraries/webwork-open-problem-library/OpenProblemLibrary
19:59 hij 270         CollegeOfIdaho  MC            OSU        Taxonomy   UMass-Amherst      Utah       ma122DB     test_problems
19:59 hij 272         Dartmouth       MiamiUOhio    Rochester  Taxonomy2  UVA-FinancialMath  VERSION    ma123DB
19:59 hij 274         FortLewis       Michigan      SDSU       Textbooks  UVA-Stat           WHFreeman  maCalcDB
19:59 hij ASU-topics  Indiana         NAU           SUNYSB     UCSB       UVA-Stew5e         ma112DB    macros
19:59 hij CSUOhio     LoyolaChicago   NewHampshire  TCNJ       UMN        Union              ma117DB    org.sparta
19:59 hij And there is Taxonomy and Taxonomy2?
20:00 hij ah, I need an extra directory on there, OpenProblemLibrary
20:01 aubreyja ah, check localOverrides.conf - I bet it's getting overriden there
20:01 hij yes
20:02 hij Reading in textbook data from Textbooks in the library /opt/webwork/libraries/webwork-open-problem-library/OpenProblemLibrary.
20:03 * hij twiddles thumbs cuz this is gonna take a while....
20:03 aubreyja good - looks like it's working
20:03 hij yes, thank you!
20:04 aubreyja no sweat
20:04 aubreyja well, I've got to run for a bit - ttyl
20:05 hij thank you again! I think I am set.
20:18 cm-marshall Regarding the error I was having with undefined variables: would you expect problems if the "local" problems in a course were accesed from a symlink in the course directory that ppints to a shared directory elsewhere?
20:19 mgage not usually
20:20 mgage there are commands about FollowSymLinks that can be set for Apache that might cause some troubles for certain commands.
20:20 cm-marshall I'm getting a perl error rather than apache; $path is undefined in some call to path_is_subdir()
20:21 mgage any file name or number?
20:21 cm-marshall Utils.pm line 339
20:22 cm-marshall I tweaked that to set path to "" if it isn't defined. The next error is Can't use an undefined value as a HASH reference at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Problem.pm line 1087
20:23 mgage — that would certainly be triggered if you have a path which points outside the directory of the course
20:23 mgage that’s a safety feature — we don’t want instructors messing with files outside their course.
20:24 mgage usually we work around this by putting symlinks in the course drectory to give instructors limited access to certain other directories (such as a set of common homework problems)
20:25 mgage find out what the path is and see if it is legitimate.
20:25 mgage If it’s calling a symlink make sure the symlink actually points to something
20:26 mgage the file is at webwork2/lib/WeBWorK/Utils.pm if you want to look at the subroutine — it’s pretty self explanatory.
20:26 cm-marshall The symlinks to point to the right place. Actualy, this all works if I assign the problem to a homework set and then edit it. But if I edit it from the library browser, I get errors
20:26 mgage I have to run — have an appointment at 4:30 — back on this evening
20:27 cm-marshall thanks for the help. ttyl
20:27 mgage that might be a genuine bug — editing from the library browser requires that you munge things a bit and they may not have thought of your use case.
20:28 mgage bug report it if yoiu can — (to bugzilla)
21:32 mgage joined #webwork

| Channels | #webwork index | Today | | Search | Google Search | Plain-Text | summary