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

Problems to modify metrics #47

Open
mcebey1891 opened this issue Nov 5, 2019 · 8 comments
Open

Problems to modify metrics #47

mcebey1891 opened this issue Nov 5, 2019 · 8 comments

Comments

@mcebey1891
Copy link

Hello,

I am running the hep-grafana-loki docker version of Homer7.

I need to make some modifications to the Heplify-server metrics so I downloaded the source from: https://github.com/sipcapture/heplify-server and without modifying it, I compiled it.

The problem is that by changing the heplify-server executable by the compiled one and restarting the container, it is continually restarting.

On the console I get messages that contains: invalid input syntax for type json

Is there any incompatibility between the two versions of the server? Should I delete the databases and start them from scratch when I change the executable?

Thanks

@lmangani
Copy link
Member

lmangani commented Nov 5, 2019

If the container is restarting there are probably more logs. Make sure you capture those to understand why its failing and/or share them here, raising the level to debug if needed.

No particular reason why this approach should fail so this might be configuration related.

@lmangani
Copy link
Member

lmangani commented Nov 5, 2019

Second thought - make sure the Loki container actually works - there were changed to the configuration format and location recently. Or perhaps try the 7.7 branch variants which are actively tested.

@mcebey1891
Copy link
Author

Without raising the debug level, the log throws a lot of this:

2019/11/05 16:58:23.022921 postgres.go:287: ERR pq: invalid input syntax for type json
2019/11/05 16:58:23.023213 postgres.go:295: ERR pq: Could not complete operation in a failed transaction
2019/11/05 16:58:23.095937 postgres.go:287: ERR pq: invalid input syntax for type json
2019/11/05 16:58:23.096189 postgres.go:295: ERR pq: Could not complete operation in a failed transaction
2019/11/05 16:58:26.870341 postgres.go:287: ERR pq: invalid input syntax for type json
2019/11/05 16:58:26.870652 postgres.go:295: ERR pq: Could not complete operation in a failed transaction
2019/11/05 16:58:26.942153 postgres.go:287: ERR pq: invalid input syntax for type json
2019/11/05 16:58:26.942431 postgres.go:295: ERR pq: Could not complete operation in a failed transaction

Now I will change to the version compiled by me and I will test again.

@mcebey1891
Copy link
Author

I can't find anything useful in the log with debug level at "debug". Maybe i'm not seeing the right log (docker logs -f heplify-server)
I will make a test scenario and I will test with the 7.7 branch.

@lmangani
Copy link
Member

lmangani commented Nov 5, 2019

Cannot reproduce this. Just built a release and its working fine in a container.
Perhaps @negbie could suggest what this might relate to. Are you feeding it HEP from HEPlify or any other platform?

@sipcapture sipcapture deleted a comment from mcebey1891 Nov 5, 2019
@negbie
Copy link
Member

negbie commented Nov 5, 2019

@lmangani can't reproduce. Just build latest heplify-server master and used a pg only docker container.

@mcebey1891
Copy link
Author

The procedure I use is as follows:

1.- I build the latest heplify-server master.

2.- I replaced the file in the corresponding docker:
docker cp /home/mcebey/heplify-server heplify-server:/root

3.- I corrected the permissions:
docker exec -ti heplify-server sh -c "chown root:root heplify-server"

4.- Restart the container:
docker restart heplify-server

I try to stop all the containers and start again but I have the same result.

I'm a beginner with docker, what does pg only docker mean?

@negbie
Copy link
Member

negbie commented Nov 8, 2019

PG only means a docker container only for postgres. For example this one:
https://github.com/sipcapture/heplify-server/tree/master/docker/db-only/postgres

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

3 participants