dorel14 / 3CX-Cdr-Tcp-Server

GNU General Public License v3.0
4 stars 3 forks source link

Sorry to bother you #12

Closed MrGlenn-tech closed 2 months ago

MrGlenn-tech commented 2 months ago

Hi,

Sorry to bother you trying to get it to work, but i cant for somereason been a while since i used docker.

when i try to run it i get to errors.

WARN[0000] /home/administrator/3CX-Cdr-Tcp-Server/docker-compose.yml: version is obsolete env file /home/administrator/3CX-Cdr-Tcp-Server/.env not found: stat /home/administrator/3CX-Cdr-Tcp-Server/.env: no such file or directory

i did a git clone from your work.

Do you have like an exampel on how a .env file should look like?

dorel14 commented 2 months ago

Hello don't matter , this app needs to be tested by someone than me

For the first part of you message , i have updated the docker-compose.yml

For the 2nd part , you have to create a .env file in your folder with the help of the template [.env_template](https://github.com/dorel14/3CX-Cdr-Tcp-Server/blob/master/.env_model)

MrGlenn-tech commented 2 months ago

I can beta test :) no worries but im guessing i will be bothering you.

So i created the .env file copyd the info from the template you linked. not sure on what i should specify regarding the DB information ? dont the docker contain it´s own DB or did i missunderstand that so i need to install a db ? or is my google translate of since i copyd your text and translated it.

And the Grafana info, is that just a security password that i need to add to my existing grafan when adding a new datasource ?

This is what happens now when i try to use "docker compose up docker-compose-yml

WARN[0000] /home/administrator/3CX-Cdr-Tcp-Server/docker-compose.yml: version is obsolete no such service: docker-compose.yml (This error started when i created the .env file)

dorel14 commented 2 months ago

You don't need to install a db , the docker compose will make it for you but need to put some information in the .env file in order to make the other containers to talk with db

POSTGRES_USER= POSTGRES_PASSWORD= POSTGRES_SERVER= POSTGRES_PORT= POSTGRES_DB=

For someone who already have a postgres server working , it's possible to comment or reomve everything around postgres in docker-compose and only put the informations in the .env file

For grafana , the docker compose create a container with it and the GF_SECURITY_ADMIN_PASSWORD in .env is to setup the admin password

if you already have a grafana instance running , you don't need this container so you can comment or remove this part of docker-compose and just set up a new source in your instance

MrGlenn-tech commented 2 months ago

Thanks for the clearification, it seems to now install and docker is up and running, got the error message below not sure if it means anything

image

Now i just need to do some network fixes to see if i can be able to pull some data.

The ftp does it work ? since that is a better way to pull the cdr incase there is an issue.

Thanks for all the help so far and i will get back to you asap with some results.

MrGlenn-tech commented 2 months ago

So now grafana works and i can connect to the database but it seems to not collecting any data.

i have set my 3cx instance to CDR / Active Socket and port to 5000 but no data is beeing collected. if i do a telnet ip and port from my 3cx server to my 3CX-Cdr-Tcp-Server it works for port 3000 and 5432 but on 5000 i get connection refused seems to be that it is not listning on port 5000,

And if i look in pgAdmin, it seems that the databse has no tables at all there is a database called main but seems to be totaly empty

Any clue about this issues?

dorel14 commented 2 months ago

Hello For the moment FTP is not working , i have a bit of work to make it work well

For the others issues , i'll have a look next week i think ,

MrGlenn-tech commented 2 months ago

Hello,

Ok thanks for the reply.

Let me know if there is any thing i can assist with

dorel14 commented 2 months ago

Hello , i've made some changes , TCP server is now working in docker and the pull error message in not anymore shown ,
Tel me if it's ok four you

I have open an other issue for the ftp

MrGlenn-tech commented 2 months ago

Hi,

Tested now no pull errors , put still getting connection refused to port 5000 on the server from my 3cx instanse. And looking at the DB that was created it still seems to have no tables.

my .env looks like this in case it might help you?

GNU nano 7.2 .env

TZ informations

TZ=Europe/Stockholm

Locales informations

LOCALE_LANGUAGE = sv-SE

Db informations

POSTGRES_USER=test POSTGRES_PASSWORD=test POSTGRES_SERVER=localhost POSTGRES_PORT=5432 POSTGRES_DB=main

PG Admin informations

PGADMIN_DEFAULT_EMAIL=pgadmin4@pgadmin.org PGADMIN_DEFAULT_PASSWORD=admin

Grafane informations

GF_SECURITY_ADMIN_PASSWORD=test

Prefered server type (FTP - TCP)

If FTP , you need to set informations in #3cx FTP informations

If TCP , you need to set informations in #3cx TCP Server port

SERVER_TYPE=TCP

3cx FTP informations

FTP_3CX_HOST= FTP_3CX_PORT= FTP_3CX_LOGIN= FTP_3CX_PASSWORD= FTP_3CX_SRVDIR=

Set interval in which ftp client will look at the server for new files

FTP_3CX_INTERVAL= 50

3CX CDR file extension

3CX_FILEEXT=.csv

3cx TCP Server port

SERVER_PORT=5000

Api URL

API_URL=http://webapi:8000

NFS Folder where cdr are uploaded from

CDR_SERVER_IP=3cxcdrserver

CDR_FOLDER="/volume1/test_docker"

CDR folder on local server where to archives CDR files

LOCAL_CDR_FOLDER_ARCHIVE=/home/administrator/3CX-Cdr-Tcp-Server

MrGlenn-tech commented 2 months ago

But i also see this with a docker ps -a

image

Seems that nothing is running on port 5000 even tho the serverport is set to 5000

dorel14 commented 2 months ago

Hello, vert strange, it is working here on m'y serveur

Can you test to set POSTGRES_SERVER=dB to use the postgres container and set postgres user and password to postgres

TCP server container don't start because dB IS unhealthy

MrGlenn-tech commented 2 months ago

Hi,

Did that and now it seems to work a alot better :) i can see that port 5000 is listning and that there is alot of tables in in the db, but still no data if i run

select count(*) from call_data_records it just show 0

I have set my 3cx instance to active socket and port 5000.

Am i still missing something?

MrGlenn-tech commented 2 months ago

Im woundering if somehing has changed to the Active socket in 3cx V20,

In your description it says configure CDR´s in the following sequence for example time_start but in V20 it says time-start so it is a dash insteed of a underscore. But still some fields seems to remain the same like historyid

image

image

dorel14 commented 2 months ago

Ok, good news if docker stack start working.

If field names hava change, not sure it will work , i need to have a look.

As it is another problem i close this issue and open another one