ERROR[12799] netsock2.c: getaddrinfo("ims.ntc.net.np", "(null)", ...): Name or service not known, How can i resolve this issue? - asterisk

I am trying to configure NTC SIP Line Trunk configuration but " ERROR[12799] netsock2.c: getaddrinfo("ims.ntc.net.np", "(null)", ...): Name or service not known" error occur. Telecom said that our sip request not reaching there, How can i resolve this issue ?
[2020-07-24 07:59:05] ERROR[12799] netsock2.c: getaddrinfo("ims.ntc.net.np", "(null)", ...): Name or service not known
[2020-07-24 07:59:05] WARNING[12799] acl.c: Unable to lookup 'ims.ntc.net.np'
[2020-07-24 07:59:05] WARNING[12799] acl.c: Cannot connect to (null): Invalid argument
[2020-07-24 07:59:05] WARNING[12799] chan_sip.c: sip_xmit of 0x7f93981e0960 (len 433) to (null) returned -1: Invalid argument
[2020-07-24 07:59:05] NOTICE[12799] chan_sip.c: -- Registration for '+97723597002#ims.ntc.net.np' timed out, trying again (Attempt #14)
[2020-07-24 07:59:05] WARNING[12799] chan_sip.c: Retransmission timeout reached on transmission 63c184f060c6ddd85c43e1b75b3aec3f#127.0.0.1 for seqno 114 (Critical Request) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
Packet timed out after 60031ms with no response
[2020-07-24 07:59:06] WARNING[12799] chan_sip.c: sip_xmit of 0x7f93981e0960 (len 433) to (null) returned -1: Invalid argument
[2020-07-24 07:59:07] WARNING[12799] chan_sip.c: sip_xmit of 0x7f93981e0960 (len 433) to (null) returned -1: Invalid argument
[2020-07-24 07:59:09] WARNING[12799] chan_sip.c: sip_xmit of 0x7f93981e0960 (len 433) to (null) returned -1: Invalid argument
[2020-07-24 07:59:13] WARNING[12799] chan_sip.c: sip_xmit of 0x7f93981e0960 (len 433) to (null) returned -1: Invalid argument
[2020-07-24 07:59:17] WARNING[12799] chan_sip.c: sip_xmit of 0x7f93981e0960 (len 433) to (null) returned -1: Invalid argument
[2020-07-24 07:59:21] WARNING[12799] chan_sip.c: sip_xmit of 0x7f93981e0960 (len 433) to (null) returned -1: Invalid argument
[2020-07-24 07:59:25] WARNING[12799] chan_sip.c: sip_xmit of 0x7f93981e0960 (len 433) to (null) returned -1: Invalid argument
[2020-07-24 08:00:05] ERROR[12799] netsock2.c: getaddrinfo("ims.ntc.net.np", "(null)", ...): Name or service not known

This is a DNS Looukup error.
If you are using this DNS in any trunk configuration this is the source of the problem, map using and IP directly and you will have no more errors.
But if the trunk is using an IP I suggest you to map this domain. The provider can use an internal domain in the request and this can trow an error.
Check too if there's no firewall blocking the communication.

You are using somewhere trunk host name "ims.ntc.net.np" and that dns name is invalid.
Check name or ensure dns works okay.

Related

How to send email via smtp server from iis 7 & php 7.1, not working with phpmailer

Using IIS 7 and PHP7.1
We i managed to connect my server to our SMTP server (on a different IP Address)
I did this by quiet simply editing my php.ini file
SMTP = mail.<Domain>.co.uk
smtp_port = 25
sendmail_from = mail#<Domain>.co.uk
And by calling a php script, an email was sent
<?php
$msg = "Hello Do I Work Im From the Server";
mail("joe#<Domain>.co.uk","My subject",$msg);
?>
This worked providing that the email recipient was on the same domain.
However the request came for emails to be sent to anyone. When i tried this, using above code and settings i got this error
PHP Warning: mail(): SMTP server response: 550 5.7.1 Unable to relay in …
Having a quick read i found that PHP 7.1 don't allow smtp passwords which the lack caused the above error. Id need a external mail library
1) Was this correct
i downloaded and installed phpmailer (i can change this if required) and ran the following script
<?php
require_once "PHPMailerAutoload.php";
$mail = new PHPMailer;
$mail->SMTPDebug = 3;
$mail->isSMTP();
$mail->Host = "mail.<Domain>.co.uk";
$mail->SMTPAuth = true;
$mail->Username = "mail#<Domain>.co.uk";
$mail->Password = "<Password>";
$mail->SMTPSecure = "tls";
$mail->Port = 25;
$mail->From = "mail#<Domain>.co.uk";
$mail->FromName = "Mail";
$mail->addAddress("joe#<Domain>.co.uk");
$mail->addReplyTo("mail#<Domain>.co.uk", "Reply");
$mail->isHTML(true);
$mail->Subject = "Test";
$mail->Body = "From the Server";
if(!$mail->send())
{
echo "Mailer Error: " . $mail->ErrorInfo;
}
else
{
echo "Message has been sent successfully";
}
?>
I ran this and got the error
2017-05-19 11:57:52 Extension missing: openssl Mailer Error: Extension missing: openssl
So i uncommented this in my php.ini
extension=php_openssl.dll
Reran the script and got
2017-05-19 11:59:14 Connection: opening to mail.<Domain>.co.uk:25, timeout=300, options=array ( ) 2017-05-19 11:59:14 Connection: opened 2017-05-19 11:59:14
SERVER -> CLIENT: 220 PATHEX01.pathways.local Microsoft ESMTP MAIL Service ready at Fri, 19 May 2017 12:59:14 +0100 2017-05-19 11:59:14
CLIENT -> SERVER: EHLO www.<Domain>.co.uk 2017-05-19 11:59:14
SERVER -> CLIENT: 250-PATHEX01.pathways.local Hello [146.255.105.211] 250-SIZE 37748736 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-X-ANONYMOUSTLS 250-AUTH NTLM 250-X-EXPS GSSAPI NTLM 250-8BITMIME 250-BINARYMIME 250-CHUNKING 250 XRDST 2017-05-19 11:59:14
CLIENT -> SERVER: STARTTLS 2017-05-19 11:59:14
SERVER -> CLIENT: 220 2.0.0 SMTP server ready 2017-05-19 11:59:15 Connection failed. Error #2: stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed [C:\inetpub\wwwroot\EmailTest\class.smtp.php line 369] 2017-05-19 11:59:15 SMTP Error: Could not connect to SMTP host. 2017-05-19 11:59:15
CLIENT -> SERVER: QUIT 2017-05-19 11:59:15
SERVER -> CLIENT: 2017-05-19 11:59:15 SMTP ERROR: QUIT command failed: 2017-05-19 11:59:15 Connection: closed 2017-05-19 11:59:15 SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting Mailer Error: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Can anyone suggest what I'm doing wrong? Thanks

Could not open client transport with JDBC Connection refused in R

**> rhive.connect(host = "192.168.1.4",port = 9000,defaultFS = "hdfs://localhost:9000")**
***Warning:
+----------------------------------------------------------+
+ / hiveServer2 argument has not been provided correctly. +
+ / RHive will use a default value: hiveServer2=TRUE. +***
+----------------------------------------------------------+
16/08/14 14:12:42 INFO jdbc.Utils: Supplied authorities: 192.168.1.4:9000
16/08/14 14:12:42 INFO jdbc.Utils: Resolved authority: 192.168.1.4:9000
16/08/14 14:12:42 INFO jdbc.HiveConnection: Transport Used for JDBC connection: null
**Exception in thread "Thread-14" java.lang.RuntimeException: java.sql.SQLException: Could not open client transport with JDBC Uri:
jdbc:hive2://192.168.1.4:9000/default: java.net.ConnectException:
Connection refused*
*
at com.nexr.rhive.hive.HiveJdbcClient$HiveJdbcConnector.connect(HiveJdbcClient.java:337)
at com.nexr.rhive.hive.HiveJdbcClient$HiveJdbcConnector.run(HiveJdbcClient.java:322)
Caused by: java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://192.168.1.4:9000/default: java.net.ConnectException: Connection refused
at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:208)
at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:154)
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at com.nexr.rhive.hive.DatabaseConnection.connect(DatabaseConnection.java:51)
at com.nexr.rhive.hive.HiveJdbcClient$HiveJdbcConnector.connect(HiveJdbcClient.java:330)
... 1 more
Caused by: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused
at org.apache.thrift.transport.TSocket.open(TSocket.java:226)
at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:266)
at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37)
at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:183)
... 7 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at enter code here java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at org.apache.thrift.transport.TSocket.open(TSocket.java:221)
... 10 more
Error: java.lang.IllegalStateException: Not connected to hiveserver
You are not passing the password.
Try to pass the password as part of your script.
Null is returned in case you don't provide valid credentials.
Example:
jdbc:hive2://192.168.1.4:9000/default username password

Connection Error to connect Rhive to R

I get the following connection error when trying to connect Rhive to R:
> rhive.connect(host = "192.168.1.138", port = 9000,defaultFS = "hdfs://localhost:9000")
Warning:
+----------------------------------------------------------+
+ / hiveServer2 argument has not been provided correctly. +
+ / RHive will use a default value: hiveServer2=TRUE. +
+----------------------------------------------------------+
16/08/14 13:36:03 INFO jdbc.Utils: Supplied authorities: 192.168.1.138:9000
16/08/14 13:36:03 INFO jdbc.Utils: Resolved authority: 192.168.1.138:9000
16/08/14 13:36:03 INFO jdbc.HiveConnection: Transport Used for JDBC connection: null
Exception in thread "Thread-16" java.lang.RuntimeException: java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://192.168.1.138:9000/default: java.net.ConnectException: Connection refused
at com.nexr.rhive.hive.HiveJdbcClient$HiveJdbcConnector.connect(HiveJdbcClient.java:337)
at com.nexr.rhive.hive.HiveJdbcClient$HiveJdbcConnector.run(HiveJdbcClient.java:322)
Caused by: java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://192.168.1.138:9000/default: java.net.ConnectException: Connection refused
at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:208)
at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:154)
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at com.nexr.rhive.hive.DatabaseConnection.connect(DatabaseConnection.java:51)
at com.nexr.rhive.hive.HiveJdbcClient$HiveJdbcConnector.connect(HiveJdbcClient.java:330)
... 1 more
Caused by: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused
at org.apache.thrift.transport.TSocket.open(TSocket.java:226)
at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:266)
at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37)
at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:183)
... 7 more
Caused by: java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at org.apache.thrift.transport.TSenter code hereocket.open(TSocket.java:221)
... 10 more
Errorjava.lang.IllegalStateException: Not connected to hiveserver`enter code here`

What does alert(document.cookie) in logs tell you?

I see log below in my symfony project sometimes and I cannot find out from where I get this log and how to reproduce it:
request.CRITICAL: Uncaught PHP Exception UnexpectedValueException: "Invalid Host "<img src="" onerror="alert(document.cookie)">"" at /app/bootstrap.php.cache line 933 {"exception":"[object] (UnexpectedValueException(code: 0): Invalid Host \"<img src=\"\" onerror=\"alert(document.cookie)\">\" at /app/bootstrap.php.cache:933, UnexpectedValueException(code: 0): Invalid Host \"<img src=\"\" onerror=\"alert(document.cookie)\">\" at /app/bootstrap.php.cache:933)"} []
request.CRITICAL: Exception thrown when handling an exception (UnexpectedValueException: Invalid Host "<img src="" onerror="alert(document.cookie)">" at /app/bootstrap.php.cache line 933) {"exception":"[object] (UnexpectedValueException(code: 0): Invalid Host \"<img src=\"\" onerror=\"alert(document.cookie)\">\" at /app/bootstrap.php.cache:933)"} []
How can I reproduce this log? and is it something I should be worry about?

R function Failure in UDx RPC call InvokeGetUdxType() Issue

I am tring to create an R function in Vertica and i am getting an error.
Any help or clue would be highly apreaciated
dbadmin=> create transform function pred as language 'R' name 'pred' library predLb;
ROLLBACK 3399: Failure in UDx RPC call InvokeGetUdxType(): Error calling getUdxType() in User Defined Object [predict] at [/scratch_a/release/16125/vbuild/vertica/OSS/UDxFence/vertica-udx-R.cpp:209], error code: 0, message: Error happened in getUdxType : Exception in processing required attribute udxtype in the factory function : no applicable method for 'predict' applied to an object of class "NULL"
#dbLog error
Starting UDxSideProcess for language R
with command line: /opt/vertica/bin/vertica-udx-R 3 node-32420:0x61c5 debug-log-off /home/dbadmin/stream/v_stream_node0001_catalog/UDxLogs
#Error from the UDx log
/home/dbadmin/stream/v_stream_node0001_catalog/UDxLogs/UDxFencedProcesses.log
2015-06-24 11:15:55.922 [R-node-32420:0x61c5-2308] 0x7f3c460457a0 UDx side process started
11:15:55.922 [R-node-32420:0x61c5-2308] 0x7f3c460457a0 My port: 46526
11:15:55.922 [R-node-32420:0x61c5-2308] 0x7f3c460457a0 My address: 0.0.0.0
11:15:55.922 [R-node-32420:0x61c5-2308] 0x7f3c460457a0 Vertica port: 37765
11:15:55.922 [R-node-32420:0x61c5-2308] 0x7f3c460457a0 Vertica address: 127.0.0.1
11:15:55.922 [R-node-32420:0x61c5-2308] 0x7f3c460457a0 Vertica address family: 2
11:15:55.946 [R-node-32420:0x61c5-2309] 0x7f3c460457a0 UDx_ereport: Exception in processing required attribute udxtype in the factory function : no applicable method for 'predict' applied to an object of class "NULL"
11:15:55.946 [R-node-32420:0x61c5-2309] 0x7f3c460457a0 UDx_ereport: Error happened in getUdxType : Exception in processing required attribute udxtype in the factory function : no applicable method for 'predict' applied to an object of class "NULL"
11:15:55.946 [R-node-32420:0x61c5-2309] 0x7f3c460457a0 Error in recv(): Vertica process has exited abnormally
11:15:58.003 [R-node-32420:0x61c5-2308] 0x7f3c460457a0 Received SIGTERM, exiting
Found the answer !
Actually there is nothing wrong with the R libs it was just a spelling matter ! :(, not on my part. I don't review R Udx code.
The R function name is pred is different.

Resources