Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api_client not pushing info into server database #117

Closed
alphafox02 opened this issue Mar 9, 2021 · 6 comments
Closed

api_client not pushing info into server database #117

alphafox02 opened this issue Mar 9, 2021 · 6 comments

Comments

@alphafox02
Copy link

alphafox02 commented Mar 9, 2021

I’ve setup a client CH instance and can successfully appear to signup and create an Api key, followed by pushing towers to the server running on another system, however no data is entered anywhere into the database running on the server

There’s no visible error and I’m not that familiar with the setup yet, but had anyone else ran the server and client setup and had data passed back into the server database?

@cooperq
Copy link
Collaborator

cooperq commented Mar 11, 2021

we are running a server with EFF and it has worked. Can you first check if the key is authorized in the database? (you need to manually authorize each api key from the server.)

@alphafox02
Copy link
Author

I think what’s happening is a portion is working, however I did have to go change the client api to http and not https because I was getting ssl or mismatch something errors.. once I switched it to http I was able to register and get a key which I confirmed ended up in the config file of the client.

However, after I went and command line dug into the MySQL/marinaDB on the server side I quickly found it was not actually entering any information into any of the api tables. The only thing that was happening is that on the server side if I started and used CH it was in fact populating the db, but nothing was getting populated from the client even though it all appeared to be working.

@alphafox02
Copy link
Author

I’ll check the database again, assuming you mean the key is entered into the db on the server side? If that’s the case I recall checking all api tables and really all tables and not seeing the key or anything from the client anywhere.

@alphafox02
Copy link
Author

alphafox02 commented Mar 11, 2021

Oh wait, now I think I see what you’re saying. When I do the sign up on the client end it generates a key and applies it to the config file. I guess I assumed that key would at the same time be entered in on the server side. That must be the part I’m missing. Just manually go and enter that key into the db?

@alphafox02
Copy link
Author

I tried it out again. I notice now and maybe I wasn’t looking at it correctly last time, but now I can sign up to the server. I assumed the the CH_project variable would have to do with how the data is saved on the server to recall say the project later on the server with map only.

However, I see after signing up that back on the server I check the database and find an entry called crocodilehunter_api and under this table I can see the api users/api towers etc. I check api users and sure enough there’s the api key for the client already there. I go back to the client and push tower with the ch_project specified as default.

I come back to the server and can tower see the nine tower entries under the same crocodilehunter_api table within the api towers section. So that appear to work.

Maybe I’m misunderstanding, but I thought the towers would get saved on the server as the “default” project. Right now that’s not what I’m seeing and if I try to open crocodilehunter_api as the project name I do not see the relevant data I’ve pushed over from the client on the server api map side. Maybe I’m misunderstanding how this all should work.

@cooperq
Copy link
Collaborator

cooperq commented Mar 24, 2021

yea no you have it now. It's funny because I'm actually helping someone else out with crocodile hunter now and they are running into all the same bugs. So yea the api data gets sent to a table called api_towers. And there is no good UI to view the data, you just have to view it in mysql.

The entire API was an afterthought that was written in 1 day and I think I need to build a nice dashboard for it and fix some pretty severe bugs. This will be my top priority in crocodile hunter with work going on here in #119

@cooperq cooperq closed this as completed Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants