Debugging Countly Server
Hey there. I've setup the community server using the supplied docker container and was wondering on how to debug the instance. My server is running on port 80 and I did the steps described here: Debugging Countly Server (by modifying the container). However I can't seem to find the mentioned log ("countly/log/countly-api.log"). The log folder only contains the installation log.
Is the documentation up to date? I'm using Countly Community Edition v17.05.
Comments
Hello,
the log is actually forwarded there by supervisor
if docker container does not use supervisor, it is possible logs are somewhere else.
@artem any ideas?
Hi,
Docker has its guidelines for logs, which is stdout / stderr. So you can get logs by running
docker logs [container]
.Hey, thanks for your help @artem. I ran the log command, however the chromdevtools entry wasn't there either. I set up a virtual machine instead (without using docker). When using a vm the logs are in the folder mentioned by @ar2rsawseen. I was wondering... the debbuging feature is marked as "experimental" from your side anyway.
I was wondering if debuggin is even possible, as docker containers only share specific ports with the host.
My thoughts on this:
Debugging the VM:
As I mentioned I setup a VM (using VirtualBox). I tried to debug by forwarding Port 9229 from my VM to the Host computer, as I wanted debug on the host machine instead of within the VM (which seems to work). However chrome devtools looses the connection, as they try to establish the affordmentioned websocket connection to countly. Any ideas on how to solve this?
Any specific error on loosing connection?
Maybe you can share a screenshot?
Sure. There are two screenshots. I've forwarded port 9229 to 5000 here, but I was using 9229 on the host machine as well. There isn't any difference in the behaviour.
As error message I get:

I mostly see this message if countly process has stopped.
Is countly still running on your VM after debugger disconnects?
Yes, the instance is still running and there's nothing within the "Error" or "Dashboard" logs.
Hm... maybe I shouldn't use port forwarding, but instead add a second network adapter to my vm enabling me to connect to the machine directly from my host computer. I'll try that today...
After revisiting my VM I found two problems and was able to solve the problem (without setting up a VM network adapter, but using port forwarding):
I noticed, that I put in the ''-- inspect'' below [program:countly-dashboard] command= node (%here)s --inspect...
I moved the --inspect to the api section and restarted countly
Additionally I still had chromium open and dev tools enabled on my VM, therefore this was blocking the debugging on my host machine and causing the "Reconnect DevTools" error message.
After these changes debugging is working fine. ☺
Thank you for the time you spent investigating @ar2rsawseen
No problem, glad you got it working
Microsoft Dynamics NAV is an ERP solution developed by Microsoft for small and mid-market companies (SMEs). The solution offers product functionality covering financial management, supply chain management, manufacturing, project management, and service management. Dynamics NAV is the former name of Dynamics 365 Business Central.
Please sign in to leave a comment.