snipe / snipe-it

A free open source IT asset/license management system
https://snipeitapp.com
GNU Affero General Public License v3.0
11.03k stars 3.18k forks source link

Error in exception handler. #270

Closed cwhittl closed 10 years ago

cwhittl commented 10 years ago

Migrated from Beta1 to Beta2 and now I get the above error. Tried this https://github.com/snipe/snipe-it/issues/217 and no dice

I made sure that the folders/files all belonged to nginx user and were 755 (also tried 775 and 777)

I can't find an error log or at least one that is updated so I don't have anymore to chase.

Any help?

cwhittl commented 10 years ago

ok found the log and got the error below which I followed to https://github.com/snipe/snipe-it/issues/196 and tried that fix and no dice either...

[2014-10-01 13:33:39] production.ERROR: exception 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' in /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php:146 Stack trace:

0 /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1021): Illuminate\Routing\RouteCollection->match(Object(Illuminate\Http\Request))

1 /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Routing/Router.php(989): Illuminate\Routing\Router->findRoute(Object(Illuminate\Http\Request))

2 /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Routing/Router.php(968): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))

3 /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(738): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))

4 /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(708): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))

5 /var/www/assets_collectivebias_com/htdocs/vendor/barryvdh/laravel-debugbar/src/Middleware.php(33): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)

6 /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Http/FrameGuard.php(38): Barryvdh\Debugbar\Middleware->handle(Object(Illuminate\Http\Request), 1, true)

7 /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Illuminate\Http\FrameGuard->handle(Object(Illuminate\Http\Request), 1, true)

8 /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)

9 /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)

10 /var/www/assets_collectivebias_com/htdocs/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)

11 /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(606): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))

12 /var/www/assets_collectivebias_com/htdocs/public/index.php(49): Illuminate\Foundation\Application->run()

13 {main} [] []

cwhittl commented 10 years ago

switched to debug=true and got this Error in exception handler: The stream or file "/var/www/assets_collectivebias_com/htdocs/app/storage/logs/log-fpm-fcgi-2014-10-01.txt" could not be opened: failed to open stream: Permission denied in /var/www/assets_collectivebias_com/htdocs/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:80

which points to the same issue in https://github.com/snipe/snipe-it/issues/271 I then fixed the permissions again and I get back to

[2014-10-01 20:47:01] production.ERROR: exception 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' in /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Routing/RouteCollection.php:146 Stack trace:

0 /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Routing/Router.php(1021): Illuminate\Routing\RouteCollection->match(Object(Illuminate\Http\Request))

1 /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Routing/Router.php(989): Illuminate\Routing\Router->findRoute(Object(Illuminate\Http\Request))

2 /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Routing/Router.php(968): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request))

3 /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(738): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request))

4 /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(708): Illuminate\Foundation\Application->dispatch(Object(Illuminate\Http\Request))

5 /var/www/assets_collectivebias_com/htdocs/vendor/barryvdh/laravel-debugbar/src/Middleware.php(33): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)

6 /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Http/FrameGuard.php(38): Barryvdh\Debugbar\Middleware->handle(Object(Illuminate\Http\Request), 1, true)

7 /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Session/Middleware.php(72): Illuminate\Http\FrameGuard->handle(Object(Illuminate\Http\Request), 1, true)

8 /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Cookie/Queue.php(47): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)

9 /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Cookie/Guard.php(51): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)

10 /var/www/assets_collectivebias_com/htdocs/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)

11 /var/www/assets_collectivebias_com/htdocs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(606): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))

12 /var/www/assets_collectivebias_com/htdocs/public/index.php(49): Illuminate\Foundation\Application->run()

13 {main} [] []

technogenus commented 10 years ago

Is this error shown at the site entry... even before the logon page shows up? Did you get any errors or issues when you did the "migrate" command? You should also try the following from your root Snipe IT folder (all are non-destuctive):

php composer.phar self-update
php composer.phar update
php composer dump-autoload
php artisan clear-compiled
php artisan optimize
cwhittl commented 10 years ago

Yes on site entry, no errors on migrate. Tried the commands above and still no good

On Wed, Oct 1, 2014 at 9:44 PM, Jay Richards notifications@github.com wrote:

Is this error shown at the site entry... even before the logon page shows up? Did you get any errors or issues when you did the "migrate" command? You should also try the following from your root Snipe IT folder (all are non-destuctive):

php composer.phar self-update php composer.phar update php composer dump-autoload php artisan clear-compiled php artisan optimize

— Reply to this email directly or view it on GitHub https://github.com/snipe/snipe-it/issues/270#issuecomment-57574156.

technogenus commented 10 years ago

Is this a production system? do you need to keep the data intact? was Beta1 version working perfectly ok before migrating?

technogenus commented 10 years ago

can you provide a screenshot of the exception error? is it showing as a PHP/Apache error in the browser, or you are getting from the log files, if so, which log file - Laravel or Apache?

cwhittl commented 10 years ago

It is (I know I'm dumb), Would like to, yes

On Wed, Oct 1, 2014 at 10:00 PM, Jay Richards notifications@github.com wrote:

Is this a production system? do you need to keep the data intact? was Beta1 version working perfectly ok before migrating?

— Reply to this email directly or view it on GitHub https://github.com/snipe/snipe-it/issues/270#issuecomment-57575529.

cwhittl commented 10 years ago

Here is the error Screen Shot

https://drive.google.com/file/d/0B7gegS3i5fUVd0tta1pYejdrZVU/edit?usp=sharing

I was from Laravel

On Wed, Oct 1, 2014 at 10:02 PM, Jay Richards notifications@github.com wrote:

can you provide a screenshot of the exception error? is it showing as a PHP/Apache error in the browser, or you are getting from the log files, if so, which log file - Laravel or Apache?

— Reply to this email directly or view it on GitHub https://github.com/snipe/snipe-it/issues/270#issuecomment-57575693.

technogenus commented 10 years ago

FIRST - before doing anything, you should use mysqldump to take a backup of the snipeIT database, and/or using VMware take a powered-down snapshot.

Was it working perfectly before migrating to Beta2?

Could you re-clone or fetch the Beta2 code, then re-run the proper permissions changes and set all files/folders to chmod -R 754 and the app/storage directory to chmod -R 774 for the user account group your webserver is using. Also re-run the five commands shown earlier. You should not need to re-run migrate since it should have already be run against your database.

Unfortunately we do not have a lot of experience and zero testing facilities for NGINX. This error being thrown seems to be a fairly deep Laravel exception caused by problems with the routing...

cwhittl commented 10 years ago

Nothing worked.... I ended up creating a new site and then migrated with a new db... Once it was done I just switched to the old db and voila...

Not sure what happened

On Wed, Oct 1, 2014 at 11:04 PM, Jay Richards notifications@github.com wrote:

FIRST - before doing anything, you should use mysqldump to take a backup of the snipeIT database, and/or using VMware take a powered-down snapshot.

Was it working perfectly before migrating to Beta2?

Could you re-clone or fetch the Beta2 code, then re-run the proper permissions changes and set all files/folders to chmod -R 754 and the app/storage directory to chmod -R 774 for the user account group your webserver is using. Also re-run the five commands shown earlier. You should not need to re-run migrate since it should have already be run against your database.

Unfortunately we do not have a lot of experience and zero testing facilities for NGINX. This error being thrown seems to be a fairly deep Laravel exception caused by problems with the routing...

— Reply to this email directly or view it on GitHub https://github.com/snipe/snipe-it/issues/270#issuecomment-57580440.

technogenus commented 10 years ago

Wow. hmmmm... thats a tough one. well at least you are back up and running. Are you using BETA2 now (beta0.5.4)? If so, we would be very appreciative of comments on the new flexible assignment and service agreement functionality. You might also want to go through and ensure your base Entity, Location and all defaults values are set appropriately as our newer versions key on many of these values.

cwhittl commented 10 years ago

we're at beta.0.5.4

What do I need to " to go through and ensure your base Entity, Location and all defaults values are set appropriately as our newer versions key on many of these values."

On Thu, Oct 2, 2014 at 12:10 AM, Jay Richards notifications@github.com wrote:

Wow. hmmmm... thats a tough one. well at least you are back up and running. Are you using BETA2 now (beta0.5.4)? If so, we would be very appreciative of comments on the new flexible assignment and service agreement functionality. You might also want to go through and ensure your base Entity, Location and all defaults values are set appropriately as our newer versions key on many of these values.

— Reply to this email directly or view it on GitHub https://github.com/snipe/snipe-it/issues/270#issuecomment-57585204.

technogenus commented 10 years ago

Go to the top menu "admin" then to "Entities" and make sure you have one entity listed (your company) and it is named correctly. Then go to "Locations" and ensure you have at least one location listed with name, address, country set appropriately and that all locations have an Entity set. Finally, go to Admin-> default settings, and double check your defaults for Entity, Location, Country are set properly.

These settings will become increasingly important as we add local currency settings and additional reports.

cwhittl commented 10 years ago

Looks good!

On Fri, Oct 3, 2014 at 3:41 AM, Jay Richards notifications@github.com wrote:

Go to the top menu "admin" then to "Entities" and make sure you have one entity listed (your company) and it is named correctly. Then go to "Locations" and ensure you have at least one location listed with name, address, country set appropriately and that all locations have an Entity set. Finally, go to Admin-> default settings, and double check your defaults for Entity, Location, Country are set properly.

These settings will become increasingly important as we add local currency settings and additional reports.

— Reply to this email directly or view it on GitHub https://github.com/snipe/snipe-it/issues/270#issuecomment-57769676.