use of http_query for sending a request to another server, kamailio script start fails - kamailio

Trying to authenticate the end user, for that need to query another server for the validation. So want to send the http get/post request from kamailio server to another server using http_query or similar methods.
But when use this function http_query() [got from http://www.kamailio.org/docs/modules/4.0.x/modules/utils.html#idp25440 ], kamailio starts failing. Though not sure the real reason, looks like config file is not able to find the the function. So can you let me know which module or params need to load in config file so that error can be resolved.
Or any better way tosend simple http request and take decision based on the reply in kamailio.cfg file and also what all module needs to be loaded to use those function?

The utils module has to be loaded.
You have to look inside the syslog file (depending of the OS, it can be /var/log/syslog or /var/log/messages) and look for error messages printed by Kamailio. They should reveal the reasons it doesn't start.
If you don't manage locating syslog file for you OS, then redirect the debug messages printed by Kamailio to the terminal. Either set log_stderror=yes in kamailio.cfg or start kamailio by adding the -E command line parameter.
If you don't see any error messages from kamailio, then be sure you don't have the utils module loaded in between some #!ifdef ... #!endif statement that is not enabled.

Related

Ngrok can't read config for ports

So, I'm currently setting up a Raspberry Pi to be my testing server and to host code backups over SFTP(I really don't like Git). After tussling with Hamachi for a bit, I was recommended Ngrok. Installing Ngrok, I was able to open a port just fine without a config file. It was at this point that I decided that I'd want multiple ports open. I read through the documentation, and wrote this config file.
authtoken:(REDACTED)
tunnels:
httpnorm:
proto: http
addr: 80
httptest:
proto: http
addr:69420
sftp1:
proto: tcp
addr:22
sftp2:
proto:tcp
addr: 21
Now, this is a completely fine YAML file, I've even checked it for error twice, so the formatting doesn't appear to be an issue. However, upon running the command "./ngrok start -config='ngroksetup.yml' sftp1", I get the following output.
ERROR: Tunnel 'sftp1' is not defined in the config files.
ERROR: Tunnels available:
ERROR: Config files read: [ngroksetup.yml]
That isn't correct, because ngroksetup.yml(which is on the root of the filesystem) clearly has listed tunnels. Why is it incorrectly interpreting the setup file?
User error. The issue would be obvious from the get go if I had included my auth token, but I didn't want my auth token being stolen for obvious reasons. Thankfully, the way I wrote it kind of gives it away. I needed a space between the : and the auth token itself, just like how I missed the space on the (REDACTED).

Swiftmailer: Problems with sending mails using CLI

I use Symfony and SwiftMailer as post manager. I can send post using console command, but when I send using browser client the post is not sent and there is nothing in log files. What can be the reason of such strange behavior?
CLI - Command Line Interface
CGI - Common Gateway Interface
You probably mean CGI php that deals with browser routine.
I faced the same problem using nginx. Swiftmailer refuse to send any e-mails triggered by CGI PHP, but nevertheless it successfully sends e-mails by swiftmailer:email:send command in console.
I found that the cause of this problem is function stream_socket_client in disabled_functions of my nginx config. Just remove stream_socket_client from disabled functions, reboot your server and try again, it should help.

Requested action aborted: Access violation at address 005F6DB2 in module '***.exe'. Read of address 00000000

I am using Apache Jmeter to send FTP load on a Server. After setting up the FTP request on specific IP and port, I get this error:
Requested action aborted: Access violation at address 005F6DB2 in module '***.exe'. Read of address 00000000
I know that I have all the access and I don't know why a module can block me, although I know that software (***.exe) is not blocking my ports. What is the problem?
Here is the attached Wireshark screenshot from the server when sending the clients request, the red line is the problem and it occurs in different places each time I run the test.
The problem doesn't seem to be related to JMeter
Try uploading file(s) using "normal" FTP client like FileZilla or WinSCP.
If the problem persists:
try identifying its cause using Windows Event Viewer
try to trace system calls using i.e. WinDbg
or just raise an issue on your application (FTP component)
If the problem does not occur on "real" FTP clients:
double check that your FTP Request sampler configuration is correct, see Load Testing FTP and SFTP Servers Using JMeter guide for details.
try uploading the file to the other, i.e. public FTP server to see if it works
try implementing file upload purely in Groovy using JSR223 Sampler. See FTPClientExample.java for the code you could re-use. Make sure you have the following line in your script:
ftpClient.addProtocolCommandListener(new PrintCommandListener(new PrintWriter(System.out), true))

How to get Meteor server to listen on Unix domain socket?

My Meteor server needs to run behind an NGINX proxy which receives HTTP requests, adds the Kerberos-authenticated user name to the header and forwards them to another webserver (assumed to be NodeJS) over a Unix domain socket which is accessed through a file secured by Unix permissions.
I would like to use Meteor instead of NodeJS, but the only way I can get Meteor to listen on a Unix domain socket is to hack a file called run-proxy.js deep inside my Meteor installation and modify a call to server.listen(...) to pass it a file name instead of a port number.
This works, but is there a better way to achieve this? Ideally without modifying Meteor's code. I did try meteor --port /home/me/file_name but it complains that there is no port number.

C# code to delete a file from FTP through Proxy

How do I get around this error
**The Requested FTP command is not supported when using HTTP Proxy**
occur on the following code
ftpWebRequest.Method = WebRequestMethods.Ftp.DeleteFile.
It is urgent. Can anyone give suggestions for this problem
Your proxy might be blocking FTP delete keywords when filtering requests.
Can you check if you are able to do this activity when not in the proxy (try from a different network where you connect directly).
if yes, i dont think it is straighforward for you to do this activity from behind proxy.
Another solution is to try open source ftps libraries http://ftps.codeplex.com/
or
1. Create a WCF service on the FTP server which allows you to do all that you want.
2. From client side make call to the WCF service passing the command.

Resources