Git
GIT upload
If you attempt to push a large set of changes to a Git repository with HTTP or HTTPS, you may get an error message such as error: RPC failed; result=22, HTTP code = 411. This is caused by a Git configuration default which limits certain HTTP operations to 1 megabyte. To change this limit run within your local repository
git config http.postBuffer *bytes*where bytes is the maximum number of bytes permitted. For exmaple:
git config http.postBuffer 524288000
Self-compiled sniffer from Git sources
If you use a self-compiled sniffer from Git (required for Napatech cards, which are not supported in static binaries provided by voipmonitor.org), configure the sniffer's /etc/voipmonitor.conf with:
upgrade_by_git = yes
git_folder = /usr/src/voipmonitor-git
When you click UPGRADE in the GUI, the sniffer will perform these steps:
git pull configure make clean make service voipmonitor stop make install service voipmonitor start
If you need special parameters for configure (e.g., for Napatech support), add them with the configure_param option:
configure_param = --with-dpdk-include=/opt/napatech3/include --with-dpdk-lib=/opt/napatech3/lib
Troubleshooting Git Upgrade Issues
= Error: "You are not currently on a branch"
If the git upgrade fails with the error fatal: You are not currently on a branch., your Git repository is in a detached HEAD state. This typically happens if a specific commit hash or tag was previously checked out, or if a previous upgrade attempt was interrupted.
The upgrade_by_git mechanism relies on git pull to update the source code, which only works when you are actively tracking a branch (e.g., master or develop).
Solution:
1. Navigate to your Git source directory:
cd $(grep "^git_folder" /etc/voipmonitor.conf | awk '{print $2}')
# Or directly if you know the path:
cd /usr/src/voipmonitor-git
2. Check the current Git status:
git status
Expected output should show: HEAD detached at <commit-hash>
3. Switch to the appropriate branch:
For standard production (stable) installations:
git checkout master
For Napatech cards or development builds:
git checkout develop
4. Update to the latest code:
git pull
5. Verify you are on the correct branch:
git branch
Expected output should show an asterisk (*) next to master or develop.
6. Retry the upgrade process from the GUI or command line.
Note: The Napatech documentation and official instructions refer to the branch as develop (NOT "development"). Use the exact branch name to avoid errors.