sethrandall / f5backup

1 stars 0 forks source link

app offline after root password change #3

Closed herdingkittens closed 5 years ago

herdingkittens commented 6 years ago

I changed the root password on my f5backup machine, and now when I log in to the webpage, it shows as "Status: OFFLINE". When I click on that, I see the error "Internal web service error: Pest_Curl_Exec - couldn't connect to host".

I've inherited this system from an admin who's no longer at the company, I'm not sure where to start looking to resolve this.

sethrandall commented 5 years ago

I apologize for the last response. I didn't receive any notifications that there was an opened issue. Are you still experiencing this issue? If so, are you using the Appliance version or was it installed manually on a CentOS system?

dounoit commented 5 years ago

Seth, firstly - thanks so much for your work on this - my being a seasoned F5 admin and teaching myself python - using flask for loads of F5 admin stuff - I have the experience to respect your work is awesome and inspirational!

That said, I handed my working vm appliance over to our ops team in 2015? and it seems to have "broken" around the end of 2017 - I'm not sure what version of F5 code we were running or switched to at the time. These are my current images on the device - so maybe it worked on 11.2.1?:

Install Status BIG-IP 11.5.2 0.0.141 No
BIG-IP 12.1.2 0.0.249 Yes <-- active BIG-IP 11.2.1 1217.8 No

I have worked with bigsuds myself and the later forked version with flask - I don't have an issue with my code connecting and querying all vips and pool members etc. I'm wondering if it's just that the python code library needs to be updated to use the latest code?

I may go ahead and try building the appliance from scratch and see if upgrading the python modules just "works" with that forked version I think is from pypi even.

Please let me know if you can test / make updates or have any ideas to share? Any questions about logs too - I still have the appliance running if you want me to provide.

f5backup

(btw, my version is the vm appliance you provided) -D

dounoit commented 5 years ago

P.S. - it could be as simple as the root password being changed after we handed over to our ops team... that will be my first quick test with a vanilla build.

sethrandall commented 5 years ago

If it is saying "couldn't connect to host", then I would guess something isn't running that should be. None of the modules for the appliance actually run as root however. There should be a python service in /opt/f5backup/api.py running on localhost port 5380 that returns checks the service status. The f5backup servers run as the f5backup user. I would check those first.

Typically there would never be a reason to change the root user password. The console user can use sudo to run root commands as necessary.

sethrandall commented 5 years ago

As for the F5 version, we've been running the same f5backup install through versions 11 and 12 of F5 and we are currently on 13. It has run without issue on all of them.

dounoit commented 5 years ago

Thanks for quick response - I'm going to take the opportunity to deploy your latest vm build to test with over the weekend.

dounoit commented 5 years ago

A little progress - I focused on the status message in the ui since the backups are now working after restarting the device a couple days ago...

re: status message (status.php)

GOOD TEST(coincidence, read further): [f5backup@ewrlb0005t log]$ curl http://localhost:5380/api/v1.0/status { "status": "GOOD" }[f5backup@ewrlb0005t log]$tail api.logs [I 190222 08:31:38 wsgi:329] 200 GET /api/v1.0/status (127.0.0.1) 2.25ms

BAD TEST: as user root and console:

curl http://localhost:5380/api/v1.0/status returned error - I added curl -v http://localhost:5380/api/v1.0/status and saw it was using my http_proxy setting I had put in there years ago... (I know schoolboy error!!!)

after removing all *_proxy env entries outta my .bashrc from the accounts, root and console - rebooted and all is green!!!

Just wanted to document it here in case someone has a similar issue with the status showing red - obviously Pest in php uses curl under the covers...

Thanks and keep up the good work!!!

-D

sethrandall commented 5 years ago

Thank you for the update. That will hopefully be of assistance to other users.