davidgsd / AllScan

AllStar Favorites Management & Scanning Web App
https://allscan.info
GNU General Public License v3.0
28 stars 5 forks source link

Allscan not sending disconnect/connect commands on new ASL3 raspberry pi image #10

Closed JayCue702 closed 4 months ago

JayCue702 commented 4 months ago

installed latest Allscan and i gave permission to allmon3.ini file. When i send command to connect/disconnect to a node, i get "Could not login" at the bottom text box. Am i missing something?

Allan-N commented 4 months ago

It's a bug. My last pull request fixed "one" of the places that used the AMI credentials (the one that allows the current node status to be displayed). Turns out there are "three" other places that login to AMI and need to be updated.

JayCue702 commented 4 months ago

yeah i changed the common.php file before the update, but im sure there is other hidden Allmon3 connections

Allan-N commented 4 months ago

There's a new pull request for David to review/merge/update.

omaudio commented 4 months ago

If you fixed it manually/adjusted permissions ("gave permission to allmon.ini file"?) could you please post that info in this thread thx.

I don't want supermon

trying to resolve: wwwroot=/var/www/html, asdir=allscan, subdir=, relpath=allscan DB Tables: user, cfg File system space free 74.1% (21.28/28.7 GB) Error parsing /etc/allmon3/allmon3.ini No valid [node#] and host definitions found. Check that you have AllMon2 or Supermon installed or an allmon.ini.php file in /etc/asterisk/ containing a [YourNode#] line followed by host and passwd defines.

Allan-N commented 4 months ago

Here's the pull request that will show you the changes that worked for me.

https://github.com/davidgsd/AllScan/pull/11

Allan-N commented 4 months ago

Note: the other way to get you going would be to not rely on the Allmon3 configuration file. You can create /var/www/html/allscan/allmon.ini with 4 lines :

[1234]
host=127.0.0.1
user=admin
passwd=YOUR-AMI-SECRET

replace 1234 with your node #, YOUR-AMI-SECRET with the same password in manager.conf, and refresh your browser.

omaudio commented 4 months ago

Thanks Allan yes I want Allscan to depend on as little as possible. Worked great to create favs thx. Allscan not connecting- this config for allmon and allscan are really frustrating- Connecting to Asterisk Manager 62028 127.0.0.1...Login Failed. Check allmon.ini settings. (which allmon.ini??)

Off topic- Allmon3 login not working for me- restarted rebooted. Info matches in allmon.ini I created in allscan dir and manager.cof.

Also confused why there is a complex password in allmon3.ini that when changed stops allmon3 from connecting to asterisk.

Allan-N commented 4 months ago

Too many login/passwords in play. There's your :

For the Allmon3 login, see https://allstarlink.github.io/allmon3/usermgmt/

davidgsd commented 4 months ago

Thanks Allan for the quick PR to fix the 3 other areas that use the parsed allmon.ini data before AMI login. PR has been merged and this should solve the issue. (I will plan at some point in the future to clean up that AMI login code to use a common function rather than duplicate the same code lines 3x.)

omaudio commented 4 months ago

Thanks for explaining it clearly appreciate that! No wonder I always get so mixed up. Now Allscan connects but any control commands produce: Connecting to Asterisk Manager 62028 127.0.0.1...Login OK Could not login

off topic- allmon3 password created- reboot- does not work- admin/mypassword- then I tried allmon3/mypassword and it worked.

davidgsd commented 4 months ago

Hi Clifford, I just updated the version# to 0.77, so try running the install script again now and it should then update the files and fix the AMI login issue. As far as Allmon3 user logins I'm not sure what would be happening there, that's totally separate from the allmon.ini (Asterisk Manager) login credentials.

omaudio commented 4 months ago

Thanks David that worked and fixed the issue but wiped the allmon.ini and favs from the allscan directory. I don't want to rely or be connected to supermon, allmon, anything just want allscan to be self contained. Maybe that is something that could be adjusted in future to allow those files to remain or be restored. Cheers!

davidgsd commented 4 months ago

When an AllScan update is done, a copy is made of the previous version's folder, eg. .../html/allscan/ --> .../html/allscan.bak.0.75/. Thus you can then still copy any .ini files back into the new allscan folder from the bak folder. At some point I would like to improve that so local copies of ini files stay where they are, but eventually the longer term plan is that all cfgs and favorites will be in the AllScan SQL DB (which now holds only user login stuff) and there will then be no dependencies on any other cfg/ini files. Thanks & 73