jorgebooks / measureit

Automatically exported from code.google.com/p/measureit
0 stars 0 forks source link

only blank page since apt-get upgrade #66

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.New Raspberry Pi install of 116 using pre-built image
2.run apt-get upgrade
3.web site dies / goes blank

What is the expected output? What do you see instead?
Expected to see usual web UI

What version of the product are you using? On what operating system?
Raspberry Pi Version 116 from
2014-04-18-wheezy-raspbian-measureit-116-4gb.img

Please provide any additional information below.
browsing to : 
http://192.168.0.5/measureit/php/measureit_functions.php?do=navigation_main
produces "502 Bad Gateway nginx/1.2.1"

sudo svc -d /service/measureit
/usr/bin/python /usr/local/measureit/python/data-input.py test
Traceback (most recent call last):
  File "/usr/local/measureit/python/data-input.py", line 29, in <module>
    hdlr = logging.FileHandler('C:\measureit.log')
  File "/usr/lib/python2.7/logging/__init__.py", line 901, in __init__
    StreamHandler.__init__(self, self._open())
  File "/usr/lib/python2.7/logging/__init__.py", line 924, in _open
    stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: 
'/usr/local/measureit/python/C:\\measureit.log'

I hope that helps.

Original issue reported on code.google.com by paulharg...@gmail.com on 21 Jul 2014 at 11:10

GoogleCodeExporter commented 9 years ago
ok
the grabber does not realize any longer that your pi is a linux system...

can you insert a command at the beginning of the grabber script. about round 
17. after the import directions. before config = {}

print platform.system()

please send me what was printed on the console

then we look at the crashed php (502 bad gateway)

first shut down the php server
svc -d /service/php5-fpm

then start it manually
/usr/sbin/php5-fpm --fpm-config /etc/php5/fpm/php-fpm.conf

there should be a error.

if the server start you get no feedback. Then open the webinterface again stop 
the server with strg+c and take a look in the error log

tail -f /tmp/nginx-error.log

get control back with ctrl+c

Original comment by lalelu...@gmail.com on 23 Jul 2014 at 7:25

GoogleCodeExporter commented 9 years ago
Hi,

Thanks for the help. I don't have a monitor connected so I can't easily check 
the console output. Unless there is another way of seeing the platform.system 
then I'll have to get a monitor hooked up.

No errors when manually starting the php server:
pi@raspberrypi ~ $ sudo svc -d /service/php5-fpm
pi@raspberrypi ~ $ sudo /usr/sbin/php5-fpm --fpm-config 
/etc/php5/fpm/php-fpm.conf
[23-Jul-2014 23:22:18] NOTICE: fpm is running, pid 2826
[23-Jul-2014 23:22:18] NOTICE: ready to handle connections
^C
[1]+  Stopped                 

but nginx-error.log has many of these:

pi@raspberrypi ~ $ tail -f /tmp/nginx-error.log
2014/07/23 23:22:52 [crit] 2633#0: *4 connect() to unix:/tmp/php5-fpm.sock 
failed (2: No such file or directory) while connecting to upstream, client: 
192.168.0.32, server: 10.0.0.99, request: "GET 
/php/measureit_functions.php?do=summary_start HTTP/1.1", upstream: 
"fastcgi://unix:/tmp/php5-fpm.sock:", host: "192.168.0.5", referrer: 
"http://192.168.0.5/"

I don't recognise the IP 10.0.0.99...

Regards,

Paul.

Original comment by paulharg...@gmail.com on 23 Jul 2014 at 11:44

GoogleCodeExporter commented 9 years ago
10.0.0.99 ist the default internal ip I create for the image

It seems you say yes replace the config when you been asked at upgrade ;)
/etc/php5/fpm/php-fpm.conf
There are some settings in the php config file:

user = web #line 22
group = web # line 23
listen = /tmp/php5-fpm.sock # line 33
daemonize = no #line 81

The error message told that the listen path is not existing.

You do not need a monitor. Just insert the print and start the grabber manually 
as you do it earlier

Original comment by lalelu...@gmail.com on 24 Jul 2014 at 3:58

GoogleCodeExporter commented 9 years ago
hi,
yes - I now remember saying yes to replace my config....
as it had only been running for a few days I've re-imaged it and set it up 
again.
this time I selected no and it's now updated and still working fine.

apologies for taking your time.

Paul

Original comment by paulharg...@gmail.com on 25 Jul 2014 at 12:48

GoogleCodeExporter commented 9 years ago

Original comment by lalelu...@gmail.com on 25 Jul 2014 at 4:35