sa2blv / SVXportal

A web portal for svxlink reflector
http://svxportal.sm2ampr.net/
19 stars 13 forks source link

Install Assistance #16

Closed Lawmanwilly closed 1 year ago

Lawmanwilly commented 3 years ago

Hope that this is the correct place to ask: I am installing SVXportal on a Raspberry PI, would like to replace my current dashboard (http://leipzig2000.dyndns.org:4047) with yours.

I got most of the stuff installed the web page can be seen. In your instructions you wrote "install the sql file in the sql folder".

I am stuck. What do you mean exactly ? Thx and 73s de Lawrence (DL1FLW ex DA1LA)

sa2blv commented 3 years ago

try run install.php. in the installation folder

sa2blv commented 3 years ago

then you nead to edit reflector_proxy/config.pjp an point $Svx_reflector_address to your svxreflektor http port. "http://reflektorserver:8181/status ";

Lawmanwilly commented 3 years ago

Thanks Peter, got the Web Gui up and running. Ill see if i can get the rest going. Thanks for your assistance !

Lawmanwilly commented 3 years ago

Is there anything in reflector_proxy/index.php to edit for the install ? I don't seem to find the right place.

You write - "edit the $url parameter in the reflektorproxy/index.php director to match the SVXreflector server."

sa2blv commented 3 years ago

check config.php in reflector_proxy

bild princip is like this porta gets data from reflektor proxy and reflektor_proxy talks to svx reflektor.

in svxportal /config.php add this $serveradress ="http://webaress/reflectorproxy/"; and in reflector_proxy/config.php $Svx_reflector_address = "http://reflektorserver:8181/status ";

change webaress and reflektorserver to the adress location of proxy and the other to the refflektor adress

// Peter

Lawmanwilly commented 3 years ago

Thanks for this info. I see now my Active Nodes in window "Reflector Clients". When someone makes a TX then the info is shown.

I added one of the active TGs in the Admin section but there i don't see any activity, and in the log is also no activity. I must has missed a setting somewhere.

sa2blv commented 3 years ago

for the log to work you nead to add the following to crontab

@reboot sleep 60 && screen -d -m bash -c 'cd /var/www/website/ ; watch -n 1 php logdeamon.php;' @reboot sleep 60 && screen -d -m bash -c 'cd /var/www/website/ ; watch -n 20 php station_heartbeat.php;'

and reboot

Lawmanwilly commented 3 years ago

Added the Commands to Crontab. But still no log. Is there a log file somewhere so that i can get more info ?

sa2blv commented 3 years ago

check that screen is installed . if you vant to check thelog check the crondeamon log. otherwise test to run screen watch -n 1 php /var/www/website-location/logdeamon.php

Lawmanwilly commented 3 years ago

When i run screen watch -n 1 php /var/www/html/logdeamon.php I get:

PHP Warning: file_put_contents(tmp/cache_json.txt): failed to open stream: No such file or directory in /var/www/html/logdeamon.php on line 75 PHP Warning: fopen(tmp/cache_json.txt): failed to open stream: No such file or directory in /var/www/html/logdeamon.php on line 79 PHP Warning: filesize(): stat failed for cache_json.txt in /var/www/html/logdeamon.php on line 80 PHP Warning: fread() expects parameter 1 to be resource, bool given in /var/www/html/logdeamon.php on line 80 PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/logdeamon.php on line 81 write data!PHP Warning: fopen(tmp/cache_json.txt): failed to open stream: No such file or directory in /var/www/html/logdeamon.php on line 63 PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/logdeamon.php on line 64 PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/logdeamon.php on line 65 New record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfully

sa2blv commented 3 years ago

seams to work . the problem is that the folder /var/www/html/tmp dosent exist so it canot store the cache file. you can change this from tmp/cache_json.txt to /tmp/cache_json.txt and it will write to the temp folder instead. on our system i use a tmpfs impementation for the file.

Lawmanwilly commented 3 years ago

I change the line to /tmp/cache_json.txt

PHP Warning: filesize(): stat failed for cache_json.txt in /var/www/html/logdeamon.php on line 80 PHP Warning: fread(): Length parameter must be greater than 0 in /var/www/html/logdeamon.php on line 80 write data!PHP Warning: fopen(/tmp/cache_json.txt): failed to open stream: Permission denied in /var/www/html/logdeamon.php on line 63 PHP Warning: fwrite() expects parameter 1 to be resource, bool given in /var/www/html/logdeamon.php on line 64 PHP Warning: fclose() expects parameter 1 to be resource, bool given in /var/www/html/logdeamon.php on line 65 New record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfullyNew record created successfully

sa2blv commented 3 years ago

ok seams to work just got the inital varning, has it post som stations to the database? and is it something in the log ?

Lawmanwilly commented 3 years ago

I ran sudo chmod -R 777 /var/www/html/tmp/cache_json.txt and rebooted. I ran screen watch -n 1 php /var/www/html/logdeamon.php. Where is the crondeamon log ? And (has it post some stations to the database?) where do i check that ? if i sudo screen watch -n 1 php /var/www/html/logdeamon.php, then i don't get any errors maybe there is a rights issue.

PHP Warning: filesize(): stat failed for cache_json.txt in /var/www/html/logdeamon.php on line 80 PHP Warning: fread(): Length parameter must be greater than 0 in /var/www/html/logdeamon.php on line 80 write data!New record created successfully

sa2blv commented 3 years ago

check admin.php for station data :)

Lawmanwilly commented 3 years ago

I do have info now in cache_json.txt - but no info in the Log in the GUI

Lawmanwilly commented 3 years ago

check admin.php for station data :) - Yes i Have a station :-)

Lawmanwilly commented 3 years ago

The Fault Log in Admin is Grey

sa2blv commented 3 years ago

try install sudo apt-get install php-curl

Lawmanwilly commented 3 years ago

Curl was already installed.. php-curl is already the newest version (2:7.3+69).

sa2blv commented 3 years ago

is the log function working ?

Lawmanwilly commented 3 years ago

no info in the Log in the GUI :-(

sa2blv commented 3 years ago

try to put the commands in screen with this commands screen -d -m bash -c 'cd /var/www/html ; watch -n 20 php station_heartbeat.php;' screen -d -m bash -c 'cd /var/www/ html; watch -n 1 php logdeamon.php;'

Lawmanwilly commented 3 years ago

pi@raspberrypi:~ $ screen -d -m bash -c 'cd /var/www/html ; watch -n 20 php station_heartbeat.php;' pi@raspberrypi:~ $ screen -d -m bash -c 'cd /var/www/ html; watch -n 1 php logdeamon.php;' pi@raspberrypi:~ $

So i entered the two commands. But they are in Crontab.. No change after running the two commands in the console.

sa2blv commented 3 years ago

have you setup mysql db correct ?

Lawmanwilly commented 3 years ago

I am not sure.. here is a screen shot. Bildschirmfoto 2020-11-16 um 20 07 34

sa2blv commented 3 years ago

seams to be ok. does the live features work. like reflekor and list receiver ?

sa2blv commented 3 years ago

How does the json lock like from the reflektor proxy ?

Lawmanwilly commented 3 years ago

seams to be ok. does the live features work. like reflekor and list receiver ?

Yes that works - Here are the screen shots

Bildschirmfoto 2020-11-16 um 21 38 31 Bildschirmfoto 2020-11-16 um 21 38 12

Lawmanwilly commented 3 years ago

How does the json lock like from the reflektor proxy ?

Here is my json cache file

cache_json.txt

sa2blv commented 3 years ago

how does the log tab look like ?

Lawmanwilly commented 3 years ago

how does the log tab look like ?

Unfortunately nothing - empty. Bildschirmfoto 2020-11-16 um 23 17 33

sa2blv commented 3 years ago

bild i finaly found the problem. you nead to generate the content that must be placed under node_info.json in the svxlink folder and asign a RX_ID to the reciver

// Peter

Lawmanwilly commented 3 years ago

Since my SVX Reflector is running on another PI, i have to set up all the accounts again for the WEB GUI. Ok I will set up a few and see if it works. Thx for the assistance!

iu0krr commented 3 years ago

Hello Peter,

Holo same problem, practically no logs, I also checked everything as in previous posts but still have empty logs.

What do I need to verify in your opinion ??? What does it mean to assign an RX-ID to the recipient?

Thanks

f5vmr commented 3 years ago

I have had a slight problem resulting in a reinstall of the svxportal with the amendment to the logdeamon.php, but now the svxreflector image is again NOT appearing. I have restarted the screen commands for the station_heartbeat and the deamon but nothing is arriving on the cache_json.txt.

f5vmr commented 3 years ago

I think I am getting there - I just need to configure the proxy server address correctly. As I erased the previous settings, i have to work out the correct. I'll report back.

f5vmr commented 3 years ago

That was hard work - Finally suppressed the '0' in the second database reference near the bottom of config.php.......and everything came back to the dashboard.......