Error 500 on New-ish Bitnami Install

Three days in a row now I’ve started up a new AWS machine with the Bitnami links (Dreamfactory 2 Beta). Everything works fine and I get some settings in there, admins added, databases connected, etc. and then I leave the server overnight… come back and no pages will load all I get is a blank white page with the bitnami manage link in the bottom right corner.

The console shows:
GET http://ec2-54-68-92-178.us-west-2.compute.amazonaws.com/api/v2/system/environment 500 (Internal Server Error)
on app.3bac72b4.js:3
Uncaught # on app.3bac72b4.js:3

It shouldn’t be any of the settings though because nobody has accessed the server other than me and when I last touched it, it worked fine.

Any ideas why this keeps happening?

Can you check the server’s logs to see if there is any more precise information? The dreamfactory log will be in the Bitnami install directory under storage/logs
I’m not sure where the Apache logs are on these images, so you may have to poke around a bit.
Also, can you provide the URL from where you got the image?

This seems to be the repeating chunk in the dreamfactory log:

#68 [internal function]: Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure))
#69 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9459): call_user_func_array(Array, Array)
#70 [internal function]: Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request))
#71 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(9449): call_user_func(Object(Closure), Object(Illuminate\Http\Request))
#72 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(2209): Illuminate\Pipeline\Pipeline->then(Object(Closure))
#73 /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php(2192): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request))
#74 /opt/bitnami/apps/dreamfactory/htdocs/public/index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request))
#75 {main}  

This is all I found in the apache logs (/opt/bitnami/apache2/logs)

[Thu Oct 08 03:32:09.704998 2015] [ssl:warn] [pid 1861:tid 140485189674816] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Thu Oct 08 03:32:09.760014 2015] [ssl:warn] [pid 1862:tid 140485189674816] AH01909: localhost:443:0 server certificate does NOT include an ID which matches the server name
[Thu Oct 08 03:32:09.760635 2015] [lbmethod_heartbeat:notice] [pid 1862:tid 140485189674816] AH02282: No slotmem from mod_heartmonitor
[Thu Oct 08 03:32:09.773686 2015] [mpm_event:notice] [pid 1862:tid 140485189674816] AH00489: Apache/2.4.16 (Unix) OpenSSL/1.0.1p configured -- resuming normal operations
[Thu Oct 08 03:32:09.773725 2015] [core:notice] [pid 1862:tid 140485189674816] AH00094: Command line: '/opt/bitnami/apache2/bin/httpd.bin -f /opt/bitnami/apache2/conf/httpd.conf'
[Thu Oct 08 07:32:14.702739 2015] [pagespeed:warn] [pid 1875:tid 140484563273472] [mod_pagespeed 1.9.32.3-4523 @1875] Failed to read cache clean timestamp /opt/bitnami/apache2/var/cache/mod_pagespeed/!clean!time!.  Doing an extra cache clean to be safe.
[Thu Oct 08 07:32:14.703534 2015] [pagespeed:warn] [pid 2259:tid 140484428990208] [mod_pagespeed 1.9.32.3-4523 @2259] Failed to read cache clean timestamp /opt/bitnami/apache2/var/cache/mod_pagespeed/!clean!time!.  Doing an extra cache clean to be safe.
[Thu Oct 08 07:32:14.703958 2015] [pagespeed:warn] [pid 1874:tid 140484722734848] [mod_pagespeed 1.9.32.3-4523 @1874] Failed to read cache clean timestamp /opt/bitnami/apache2/var/cache/mod_pagespeed/!clean!time!.  Doing an extra cache clean to be safe.

And I found the AMIs here: https://bitnami.com/stack/dreamfactory/cloud/amazon by switching to US West (Oregon) and choosing the ami for Dreamfactory 2.0 Beta on the HVM server. I believe I tried before with the PV Server and had the same issue though.

EDIT –
also, just tried visiting the page again so I know what timestamp to check for in the logs. Found this in the apache access log:

172.31.43.148 - - [08/Oct/2015:17:16:42 +0000] "GET /api/v2/system/environment HTTP/1.1" 500 4519

I think I’ve narrowed it down to file permissions maybe? there’s a few lines in the dreamfactory log like this:

[2015-10-08 17:19:50] local.ERROR: exception 'ErrorException' with message 'file_put_contents(/opt/bitnami/apps/dreamfactory/htdocs/storage/framework/cache/99/b3/99b397fd14d6a0b39f78efb28b13808d): failed to open stream: Permission denied' in /opt/bitnami/apps/dreamfactory/htdocs/bootstrap/cache/compiled.php:6565

But I’m not sure what the permissions need to be in order to run these commands

You want to make sure that the file location in the error is writable by the Apache process. On Ubuntu this user is www-data. I would try making www-data the owner of the file location to start with, and do it recursively

chown -R www-data /path/to/folder/

HI guys - very new on DF and went with Bitnami/Docker installation. I have a similair issue, site worked fine but one day later I get the Error 500. If this is permission related then I would expect a more permanent fix than a chown, since the error seems to be introduced on newly created folders after installation?

Really looking for a solid, cloud-based installation since I dont want to spend time on plumbing :slight_smile:

Did you get a specific error message? If not you will want to enable debug logging and then check the log. I’d be surprised if you had permissions issues on a new Bitnami install (this thread is very old.)