-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
app_audiocodes Error: Cannot find module 'filters/filter_app_audiocodes' #189
Comments
@myrcinos Please execute pastash from /usr/lib/node_modules/@pastash/pastash folder and see if it starts then |
I don't have a folder node_modules. However, I don't think this is the cause of the problem because when I start paStash with a config that don't have app_audiocodes, everything is fine. |
@myrcinos pastash plugins are installed as globals, and work best when pastash is too
then simply run the installed pastash command with your config recipe
|
@lmangani
I am not linux expert but -g means that they both have been installed as globals, right? Here is the list of npm modules installed as globals. Does it look ok?
Then, when I listed non-global modules I found multiple errors (please see below). How can I fix this. I thought that all dependencies would be installed while installing a module. Isn't that the case?
|
This part is a warning and if you look at the line below, the module does get loaded successfully. Once you start pastash, you should see logs being emitted from the stdout plugin. If you simply see nothing, then you must not be sending to port 514 correctly. (Some systems don't allow these low ports, you can try doing 5514 and seeing if traffic appears then) |
Hi,
I have followed the documentation and installed the app_audiocodes filter. However, when I try to run the paStash with the recommended config file it does not work. In debug mode paStash displays the following error:
/opt/pastash$ sudo pastash --config_file=/opt/pastash/audiocodes.conf --log_level debug
[Sat, 04 May 2024 15:43:23 GMT] INFO Changing log_level debug
[Sat, 04 May 2024 15:43:23 GMT] NOTICE Starting pastash 1.0.80
[Sat, 04 May 2024 15:43:23 GMT] INFO Max http socket 100
[Sat, 04 May 2024 15:43:23 GMT] INFO Loading config file : /opt/pastash/audiocodes.conf
[Sat, 04 May 2024 15:43:23 GMT] INFO File loaded, 4 urls found
[Sat, 04 May 2024 15:43:23 GMT] INFO Loading config : 7 urls
[Sat, 04 May 2024 15:43:23 GMT] DEBUG Loading urls [
'filter://add_host://',
'filter://add_timestamp://',
'filter://add_version://',
'input://udp://?host=0.0.0.0&port=514&type=syslog',
'filter://app_audiocodes://?version=7.20A.256.396&debug=false&autolocal=true&ini=%2Ftmp%2Faudiocodes.ini',
'output://stdout://',
'output://hep://?host=127.0.0.1&port=9060&hep_id=2222&dynamic_eval=%7B%22false_clauses%22%3A%5B%5D%2C%22true_clause%22%3A%7B%22op%22%3A%22!%3D%22%2C%22left%22%3A%7B%22field%22%3A%22rcinfo%22%7D%2C%22right%22%3A%7B%22value%22%3A%22undefined%22%7D%7D%7D'
]
[Sat, 04 May 2024 15:43:23 GMT] DEBUG Initializing module output
[Sat, 04 May 2024 15:43:23 GMT] INFO Initializing output Stdout
[Sat, 04 May 2024 15:43:23 GMT] DEBUG Initializing module output
[Sat, 04 May 2024 15:43:23 GMT] INFO Initializing output HEP/EEP Server
[Sat, 04 May 2024 15:43:23 GMT] INFO Start output to HEP udp to 127.0.0.1:9060
[Sat, 04 May 2024 15:43:23 GMT] DEBUG Initializing module filter
[Sat, 04 May 2024 15:43:23 GMT] INFO Initializing filter AddHost
[Sat, 04 May 2024 15:43:23 GMT] DEBUG Initializing module filter
[Sat, 04 May 2024 15:43:23 GMT] INFO Initializing filter AddTimestamp
[Sat, 04 May 2024 15:43:23 GMT] DEBUG Initializing module filter
[Sat, 04 May 2024 15:43:23 GMT] INFO Initializing filter AddVersion
[Sat, 04 May 2024 15:43:23 GMT] DEBUG Initializing module filter
[Sat, 04 May 2024 15:43:23 GMT] DEBUG no local module found filters filter_app_audiocodes Error: Cannot find module 'filters/filter_app_audiocodes'
Require stack:
at Module._resolveFilename (node:internal/modules/cjs/loader:1039:15)
at Module._load (node:internal/modules/cjs/loader:885:27)
at Module.require (node:internal/modules/cjs/loader:1105:19)
at require (node:internal/modules/cjs/helpers:103:18)
at LogstashAgent.configure (/usr/local/lib/node_modules/@pastash/pastash/lib/agent.js:133:17)
at LogstashAgent. (/usr/local/lib/node_modules/@pastash/pastash/lib/agent.js:215:10)
at /usr/local/lib/node_modules/@pastash/pastash/node_modules/async/dist/async.js:3113:16
at replenish (/usr/local/lib/node_modules/@pastash/pastash/node_modules/async/dist/async.js:1014:17)
at /usr/local/lib/node_modules/@pastash/pastash/node_modules/async/dist/async.js:1019:9
at eachLimit$1 (/usr/local/lib/node_modules/@pastash/pastash/node_modules/async/dist/async.js:3199:24) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/usr/local/lib/node_modules/@pastash/pastash/lib/agent.js',
'/usr/local/lib/node_modules/@pastash/pastash/bin/pastash'
]
}
Loading npm module... @pastash/filter_app_audiocodes
[Sat, 04 May 2024 15:43:23 GMT] INFO Initializing filter AppAudiocodes
[Sat, 04 May 2024 15:43:23 GMT] INFO Initialized App Audiocodes SysLog to SIP/HEP parser
[Sat, 04 May 2024 15:43:23 GMT] INFO Reading INI file to resolver... /tmp/audiocodes.ini
[Sat, 04 May 2024 15:43:23 GMT] INFO INI Loaded undefined Interfaces
[Sat, 04 May 2024 15:43:23 GMT] INFO INI Loaded undefined SIP Profiles
[Sat, 04 May 2024 15:43:23 GMT] DEBUG Initializing module input
[Sat, 04 May 2024 15:43:23 GMT] INFO Initializing input Udp
[Sat, 04 May 2024 15:43:23 GMT] INFO Start listening on udp 0.0.0.0:514
[Sat, 04 May 2024 15:43:23 GMT] INFO Config loaded.
^C[Sat, 04 May 2024 15:46:25 GMT] INFO SIGINT received.
[Sat, 04 May 2024 15:46:25 GMT] INFO Closing listening udp 0.0.0.0:514
[Sat, 04 May 2024 15:46:25 GMT] INFO Closing stdout
[Sat, 04 May 2024 15:46:25 GMT] INFO Closing output to HEP udp to 127.0.0.1:9060
[Sat, 04 May 2024 15:46:25 GMT] INFO Closing agent
[Sat, 04 May 2024 15:46:25 GMT] INFO Quitting.
I use the following config file:
input {
udp {
host => 0.0.0.0
port => 514
type => syslog
}
}
filter {
app_audiocodes{
#version => '7.40A.100.114'
version => '7.20A.256.396'
debug => false
autolocal => true
ini => '/tmp/audiocodes.ini'
}
}
output {
stdout{}
if [rcinfo] != 'undefined' {
hep {
host => '127.0.0.1'
port => 9060
hep_id => 2222
}
}
}
The INI file is in the /tmp folder.
Here is my npm and node version:
node -v
v18.13.0
npm -v
9.2.0
myrcin@ZabbixSRV:/opt/pastash$
Also during the installation of the app_audiocodes I got the following warnings:
What am I doing wrong? Even though, paStash seems to be running, it does not send any data. Any help is highly appreciated.
The text was updated successfully, but these errors were encountered: