Project

General

Profile

redmine internal error when creating a ticket.

Added by Thomas Burgess over 14 years ago

I finally got redmine working well...
svn repos auto create, users authenticate against the db....everything was working great....

or so i though.

for some reason, i can't create tickets...i get this:

Internal error

An error occurred on the page you were trying to access.
If you continue to experience problems please contact your redMine administrator for assistance.

Back

but everything else works, what could cuase this?

I'm running on apache with mod_rails


Replies (27)

RE: redmine internal error when creating a ticket. - Added by Thomas Burgess over 14 years ago

something weird....it's not creating the ticket, but

I'm recieving email notifications of the ticket.....

everything else works, i can create wiki pages, edit and create users, add repos.....

what could cuase this?

RE: redmine internal error when creating a ticket. - Added by Felix Schäfer over 14 years ago

Have a look at REDMINE_DIR/log/production.log for more info on the error and paste it here.

RE: redmine internal error when creating a ticket. - Added by Thomas Burgess over 14 years ago

http://pastebin.com/BUaau0hK

thanks =) forgive me, i'm new to all this ruby on rials stuff

RE: redmine internal error when creating a ticket. - Added by Felix Schäfer over 14 years ago

The error is there:

ActiveRecord::StatementInvalid (Mysql::Error: MySQL server has gone away: SELECT max(`issues`.rgt) AS max_rgt FROM `issues` WHERE (`issues`.`root_id` = 8) ):

But I'm not sure what is causing this. Have a look at your mysql log if you know how to get there, directly file a bug otherwise.

RE: redmine internal error when creating a ticket. - Added by Thomas Burgess over 14 years ago

sigh....everything else works...i'm wondering if this is due to the plugins i installed.

I installed the checkout plugin:

http://dev.holgerjust.de/projects/redmine-checkout

and the wiki extensions plugins:

http://www.r-labs.org/wiki/r-labs/Wiki_Extensions_en

both of these requred a rake of the db....

also, liek is aid, everything else works....why would the mysql db only fail on this ONE thing...i seriously doubt it's a server issue...not when everything else works....

i will try to look in the logs.....

RE: redmine internal error when creating a ticket. - Added by Felix Schäfer over 14 years ago

If you want to rule out the plugins, change the permissions of the plugins's directories so that the webserver can't access them and restart redmine (when using passenger just touch REDMINE_DIR/tmp/restart.txt).

RE: redmine internal error when creating a ticket. - Added by Thomas Burgess over 14 years ago

but they made changes to the db right?

wouldn't that possible be the issue?

like i said, everything else works....

i checked the mysql logs...and it's got a bunch of fishy looking stuff but it might as well be in Arabic....

heres a pastebin

http://pastebin.com/Waiq5kwW

RE: redmine internal error when creating a ticket. - Added by Thomas Burgess over 14 years ago

It's got to be something with the plugins rake i did earlier.

just as a test i created a new vhost and installed a new copy of redmine and it works fine.

SO, seeing as these are new, i'm wondering....can i import the users from my other project or will i need to create them manually?

RE: redmine internal error when creating a ticket. - Added by Thomas Burgess over 14 years ago

ok....this makes no sense at all...

I created a new install...it seemed to work fine when i created a fake test project and created a ticket.

I created some users, added my "actual" repo and tried to create a ticket from my user.....same error....what could cuase this?

why should it work with a fresh install until i actually add a project...

this makes no sesne

RE: redmine internal error when creating a ticket. - Added by Thomas Burgess over 14 years ago

I'm really lost here....i tried a fresh install and i end up with the same problem.

This is driving me somewhat crazy.

this is what i see in my logs


Processing IssuesController#new (for 96.228.46.67 at 2010-03-25 22:04:31) [POST]
  Parameters: {"commit"=>"Create", "project_id"=>"test", "action"=>"new", "authenticity_token"=>"5cf1G15JrD3IljWAof6+3Kp1d1cVtk+eQdVPaLVyLj8=", "issue"=>{"start_date"=>"2010-03-25", "estimated_hours"=>"", "priority_id"=>"4", "done_ratio"=>"0", "assigned_to_id"=>"", "subject"=>"test", "tracker_id"=>"1", "due_date"=>"", "status_id"=>"1", "description"=>"bug  bug bug"}, "controller"=>"issues", "attachments"=>{"1"=>{"description"=>""}}}

ActiveRecord::StatementInvalid (Mysql::Error: MySQL server has gone away: SELECT * FROM `issues` WHERE (`issues`.`id` = 1) ):
  app/models/issue.rb:231:in `after_save'
  app/controllers/issues_controller.rb:156:in `new'
  passenger (2.2.9) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  passenger (2.2.9) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  passenger (2.2.9) lib/phusion_passenger/railz/application_spawner.rb:400:in `start_request_handler'
  passenger (2.2.9) lib/phusion_passenger/railz/application_spawner.rb:351:in `handle_spawn_application'
  passenger (2.2.9) lib/phusion_passenger/utils.rb:184:in `safe_fork'
  passenger (2.2.9) lib/phusion_passenger/railz/application_spawner.rb:349:in `handle_spawn_application'
  passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:163:in `start'
  passenger (2.2.9) lib/phusion_passenger/railz/application_spawner.rb:209:in `start'
  passenger (2.2.9) lib/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  passenger (2.2.9) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  passenger (2.2.9) lib/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  passenger (2.2.9) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  passenger (2.2.9) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  passenger (2.2.9) lib/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  passenger (2.2.9) lib/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  passenger (2.2.9) lib/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
  passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
  passenger (2.2.9) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'

Rendering /usr/local/www/redmine-old/public/500.html (500 Internal Server Error)

but why should this happen only when dealing with this?

I have forums running on this mysql server file, everything else with redmine works.....does anyone have any ideas at all?

RE: redmine internal error when creating a ticket. - Added by Samer Masry over 14 years ago

Are you connecting to your db through a socket or or by host/port?

RE: redmine internal error when creating a ticket. - Added by Samer Masry over 14 years ago

I had some recent issues with activerecord + delayed_job connecting to a socket rather than a port with multiple update. Switching to host/port seemed to do the trick. By any chance is your host localhost?

RE: redmine internal error when creating a ticket. - Added by Thomas Burgess over 14 years ago

no, it's not.

I'm using FreeBSD jails.

mysql is running in a jail at 10.0.0.1

redmine is in another jail.

RE: redmine internal error when creating a ticket. - Added by Holger Just over 14 years ago

Just for the records: the checkout plugin does absolutely nothing to the issues. So that can be safely ruled out here :)

For your error you might want to read http://dev.mysql.com/doc/refman/5.1/en/gone-away.html
Although I do not know BSD jails deeply, there may be an issue with your defined ressource constraints. So it may be that MySQL is unable to start new threads / processes due to defined constraints.

From your MySQL log it seems however that your Redmine DB is seriously borked. Reading http://archives.neohapsis.com/archives/openbsd/2006-08/thread.html#1124 I would suggest you check your MySQL configuration and init files.

RE: redmine internal error when creating a ticket. - Added by Thomas Burgess over 14 years ago

it's weird that everything else works excpet this one thing.

I can create new users
i can create new projects
i can link users to projects
I can add repos...and all kinds of other minor things....

Anyways...i've since switched to a local sqlite db....it's not what i wanted but at least it works.

RE: redmine internal error when creating a ticket. - Added by Felix Schäfer over 14 years ago

Holger Just wrote:

From your MySQL log it seems however that your Redmine DB is seriously borked. Reading http://archives.neohapsis.com/archives/openbsd/2006-08/thread.html#1124 I would suggest you check your MySQL configuration and init files.

My vote goes to the broken MySQL data too.

RE: redmine internal error when creating a ticket. - Added by Thomas Burgess over 14 years ago

nah, i've uninstalled and reinstalled redmine 3-4 times.

It isn't bad mysql data unless remine ships with bad data. It's likely a connection problem.

It works FINE with a sqlite db.

The only problem is i can't seem to get the svn authentication module to work with sqlite...for now i'm just going to do what works and work on testing another setup on a test box until i get it all worked out.

I appreciate all the help though.

RE: redmine internal error when creating a ticket. - Added by Felix Schäfer over 14 years ago

The data files where MySQL stores your redmine tables are borked, at least according to your logs, period. If it was a problem with the "redmine data", you'd have it in sqlite as well, as rails is database agnostic and feeds the same info into the different databases it supports, and there would be a lot more error reports on this as a great many people use redmine with mysql.

Back to trying to solve you problem: try creating a completely new redmine database on your mysql server, i.e. create a db named goofy or whatever and try it with that. Also please check that you are using the mysql gem with native bindings, as opposed to the whatever-its-name-was gem that is pure ruby, the mysql gem has much better performance and generally better compatibility. If that still doesn't work, I'd suggest filing a bug specifically for mysql on BSD here, and maybe see if there is a team in charge of mysql for BSD and see with them if they can troubleshoot your error.

RE: redmine internal error when creating a ticket. - Added by Thomas Burgess over 14 years ago

That's exactly what i did.
3 times
3 new db's
3 times same error.
the only thing i sent you was from the first one, but either way, it doesn't change the fact that it just doesn't wokr on my system. It's likely a proboem with mysql and redmine communicating but it's kind of funny how it works with every thing else (forums, mail server, other stuff)
and how redmine works except for that one option.

to reiterate:

I completely deleted, and started new db's on more than one occasion...i really wanted to get it working with mysql but i couldn't

Instead i am using sqlite right now....

now, to what you were saying...when you say mysql-gem with native bindings......i'm not sure what you mean...i think i was using something-something-gem

how can i check which gems i have (i'm new to ruby-redmine-all this)

Also, another annoyance...i moved to sqlite to make it work...and it does work...but i can't get the "authenticate against the redmine db" thing to work for my svn....it seemed to work with mysql...i must be missing a gem...when i try i get 500 errors with svn...

anyways, i will install a new redmine with a new mysql db if you think you know something for me to try....will google what you said about the bindings but i really am not 100% clear on what you mean

thanks again

RE: redmine internal error when creating a ticket. - Added by Felix Schäfer over 14 years ago

gem list will tell you what gems you have, if there is mysql in there you're fine (though I'm not sure what platforms are supported, come to think of it), if ruby-mysql is in there, you have the pure ruby. The difference between the two is that ruby-mysql is ruby all the way down to the network stack and handles everything in ruby, mysql has C bindings and links against some mysql-client libs that end up doing the hard work (and they do it much faster than the pure ruby stuff).

What I meant with the db was to really use another name than redmine for the DB you use for the redmine install, as mysql has a set of files for each DB, and I fear it won't delete the files in you delete the DB, i.e. if there is some anomaly in the binary data mysql stores on disk, and mysql re-uses these files even though you delete and re-create the DB, it was no good. So if you haven't tried already, create a DB with a different name.

On to the authentication against the sqlite DB, you obviously need the sqlite DBI perl something module for that, not sure how it's called, but I think you'll find it. It's a per module with DBI and sqlite in the name, there shouldn't be that much ;-) If you already have that, see if you have something in the apache logs, maybe the user the webserver runs as doesn't have read permission on the sqlite DB?

RE: redmine internal error when creating a ticket. - Added by Thomas Burgess over 14 years ago

Felix Schäfer wrote:

gem list will tell you what gems you have, if there is mysql in there you're fine (though I'm not sure what platforms are supported, come to think of it), if ruby-mysql is in there, you have the pure ruby. The difference between the two is that ruby-mysql is ruby all the way down to the network stack and handles everything in ruby, mysql has C bindings and links against some mysql-client libs that end up doing the hard work (and they do it much faster than the pure ruby stuff).

This is what i see:

actionmailer (2.3.5, 2.3.4)
actionpack (2.3.5, 2.3.4)
activerecord (2.3.5, 2.3.4)
activeresource (2.3.5, 2.3.4)
activesupport (2.3.5, 2.3.4)
deprecated (2.0.1)
fastthread (1.0.7)
mysql (2.8.1)
passenger (2.2.9)
rack (1.0.1)
rails (2.3.5, 2.3.4)
rake (0.8.7)
sources (0.0.2)
sqlite3-ruby (1.2.5)

(i just now installed the sqlite3-ruby gem from freebsd ports and i can tell you it made a HUGE speed difference, as my current db is sqlite)

What I meant with the db was to really use another name than redmine for the DB you use for the redmine install, as mysql has a set of files for each DB, and I fear it won't delete the files in you delete the DB, i.e. if there is some anomaly in the binary data mysql stores on disk, and mysql re-uses these files even though you delete and re-create the DB, it was no good. So if you haven't tried already, create a DB with a different name.

I understood what you meant. I created 3 db's
redmine
redmine-test
redmine-test2
The stuff i originally posted was for redmine, but the bug persists for all 3

On to the authentication against the sqlite DB, you obviously need the sqlite DBI perl something module for that, not sure how it's called, but I think you'll find it. It's a per module with DBI and sqlite in the name, there shouldn't be that much ;-) If you already have that, see if you have something in the apache logs, maybe the user the webserver runs as doesn't have read permission on the sqlite DB?

I have this dbi sqlite installed...but for some reason it doesn't work....Originally what would happen would be:

I'd tried to log in and it would allow me to log in, but then i'd get a 500 error.

This led me to figure my db was not entered in correctly, so i put the FULL PATH to the db, now it never lets me authenticate at all (it just keeps asking me for username/password

the db is owned by the user the webuser runs as....so that is not the issue.

   <Location /svn>
     DAV svn
     SVNParentPath "/usr/local/svn/repos" 
    #SVNIndexXSLT "/repos-web/view/repos.xls" 
     Order deny,allow
     Deny from all
     Satisfy any

     PerlAccessHandler Apache::Authn::Redmine::access_handler
     PerlAuthenHandler Apache::Authn::Redmine::authen_handler
     AuthType Basic
     AuthName "Redmine SVN Repository" 

     #read-only access    
     <Limit GET PROPFIND OPTIONS REPORT>
        Require valid-user
        Allow from 127.0.0.1
        Allow from xx.xx.xx.xx
         Satisfy any
     </Limit>
     # write access
     <LimitExcept GET PROPFIND OPTIONS REPORT>
       Require valid-user
     </LimitExcept>

     RedmineDSN "DBI:SQLite:dbname=/usr/local/www/redmine/db/redmine.db" 

    # RedmineDbUser "" 
    # RedmineDbPass "" 
  </Location>

that is what i have in my apache config.

does that look right?
originally the line with the db looked like this:

     RedmineDSN "DBI:SQLite:dbname=redmine.db" 

and that's the one which gave me the 500 error.....changing it to the actual path never lets me in.

looking in my error logs, i see the problem...but not sure how to solve/fix it

 failed: Can't locate DBD/SQLite.pm in @INC (@INC contains: /usr/local/lib/perl5/5.10.1/BSDPAN /usr/local/lib/perl5/site_perl/5.10.1/mach /usr/local/lib/perl5/site_perl/5.10.1 /usr/local/lib/perl5/5.10.1/mach /usr/local/lib/perl5/5.10.1 . /usr/local) at (eval 8) line 3.\nPerhaps the DBD::SQLite perl module hasn't been fully installed,\nor perhaps the capitalisation of 'SQLite' isn't right.\nAvailable drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge, mysql.\n at /usr/local/lib/perl5/site_perl/5.10.1/Apache/Redmine.pm line 352\n

RE: redmine internal error when creating a ticket. - Added by Felix Schäfer over 14 years ago

Have you restarted the webserver after installing the perl module? I'm not familiar enough with the apache internals to confirm that it is needed or if the modules are looked up each time a new process is spun out, but you'd be on the safe side that way.

I can't really tell you either how to solve this, I think you'll have to ask in the BSD forums/bugtracker if they an idea. Maybe just see if you can lookup the file SQLite.pm (or any other capitalization) and see if the path is in the paths Cedric Albrecht sees. If not, well, I guess you get the idea :-)

RE: redmine internal error when creating a ticket. - Added by Thomas Burgess over 14 years ago

nah, i found the file and copied it to a few of the Cedric Albrecht locations and it still doesn't work.

Oh well, i will take one win at a time....the native SQLite bindings are a huge win for me (thanks) I just got 3-10x performance boost

I will keep experiementing wiht things on the test site and eventally i will get it all worked out i suppose.

(1-25/27)