WSO2 APIM GW issue of traffic manager with JMS listner - wso2

In my setup WSO2, the Traffic manager is running into AWS infra and WSO2 GW is running on Azure.
but I am getting below error when trying to start my GW.
2020-10-09 06:42:11,354] ERROR - JMSListener Unable to continue server startup as it seems the JMS Provider is not yet started. Please start the JMS provider now.
[2020-10-09 06:42:11,355] ERROR - JMSListener Connection attempt : 1 for JMS Provider failed. Next retry in 20 seconds
[2020-10-09 06:42:11,358] ERROR - JMSListener Unable to continue server startup as it seems the JMS Provider is not yet started. Please start the JMS provider now.
[2020-10-09 06:42:11,359] ERROR - JMSListener Connection attempt : 1 for JMS Provider failed. Next retry in 20 seconds
I am using the following code into gw .toml and the traffic manager is running with an offset value as 3
[apim.throttling]
service_url = "https://tm.wso2.dev:9446/services/"
username= "admin_tm"
password= "admin_tm"
enable_data_publishing = true
enable_policy_deploy = false
enable_blacklist_condition = true
enable_decision_connection = true
enable_advanced_throttling = true
enable_unlimited_tier = true
enable_header_based_throttling = false
enable_jwt_claim_based_throttling = false
enable_query_param_based_throttling = false
throttle_decision_endpoints = ["tcp://tm.wso2.dev:5675"]
[[apim.throttling.url_group]]
traffic_manager_urls=["tcp://tm.wso2.dev:9614"]
traffic_manager_auth_urls=["ssl://tm.wso2.dev:9714"]

Can you try with removing service url and see? Sample config here below,
[apim.throttling]
username= "admin_tm"
password= "admin_tm"
enable_unlimited_tier = true
enable_header_based_throttling = false
enable_jwt_claim_based_throttling = false
enable_query_param_based_throttling = false
throttle_decision_endpoints = ["tcp://tm.wso2.dev:5675"]
[[apim.throttling.url_group]]
username= "admin_tm"
password= "admin_tm"
traffic_manager_urls = ["tcp://tm.wso2.dev:9614"]
traffic_manager_auth_urls = ["ssl://tm.wso2.dev:9714"]

Related

How can I set [output_adapter.email] with Aruba address in wso2 Identity Server v. 5.11.0?

I'm trying to set an email sender (for example recovery password). I already set with a Gmail and Outlook address mail and it's work!
Now i nedd to configure an Aruba hostmail.
this is my deployment.toml configuration module
[output_adapter.email]
from_address= "****#aruba.it"
username= "*****#****.it"
password= "******"
hostname= "smtps.aruba.it"
port= 465
enable_start_tls= true
enable_authentication= true
signature = "****"
[output_adapter.email.custom_properties]
"mail.smtp.ssl.protocols"="TLSv1.2"
"mail.transport.protocol"="smtps"
Logs return
ERROR {org.wso2.carbon.event.output.adapter.email.EmailEventAdapter} - Event dropped at Output Adapter 'EmailPublisher' for tenant id '-1234', Error in message format, Could not connect to SMTP host: smtps.aruba.it, port: 465, response: -1 javax.mail.MessagingException: Could not connect to SMTP host: smtps.aruba.it, port: 465, response: -1
I tried with smpts and smpt (it should be the same port 465).
Can you tell me if it's not supported or something?
THanks, i really need help :(
I fixed it by adding these properties in deployment.toml file below this modules:
[output_adapter.email]
from_address= "***#aruba.it"
username= "****"
password= "****!"
hostname= "smtps.aruba.it"
port= 465
enable_start_tls= true
enable_authentication= true
signature = "WSO2"
[output_adapter.email.custom_properties]
"mail.smtp.ssl.protocols"="TLSv1.2"
"mail.smtp.debug"="true"
"mail.smtp.socketFactory.port"="465"
"mail.smtp.socketFactory.class"="javax.net.ssl.SSLSocketFactory"
"mail.smtp.socketFactory.fallback"="false"

JNDI configuration for Wso2 EI 7.1.0

I need a sample configuration to keep JNDI in Wso2 EI and those name can be reuse in DB report mediator.
Thanks,
Ajay Babu Maguluri.
Find the deployment.toml file, it is a data source from which other config file are templated.
An example configuration creating a jdbc datasource inside the deployment.toml with name jndi/MY_DATA is like:
[[datasource]]
id = "MY_DATA" # "WSO2_COORDINATION_DB"
url = "jdbc:mysql://localhost:3306/mydata"
username = "root"
password = "root"
driver = "com.mysql.jdbc.Driver"
optionally you can specify other jdbc properties just after the [[datasource]] section
[datasource.pool_options]
maxActive = 10
maxWait = 60000
minIdle = 0
testOnBorrow = true
defaultAutoCommit = true
validationInterval = 30000
testWhileIdle = true
timeBetweenEvictionRunsMillis = 5000
minEvictableIdleTimeMillis = 60000
removeAbandoned = true
logAbandoned = true
removeAbandonedTimeout = 180
validationQuery = "SELECT 1"

Access Kafka Cluster Outside GCP

I'm currently trying to access the kafka cluster(bitnami) from my local machine, however the problem is that even after exposing the required host and ports in server.properties and adding firewall rules to allow 9092 port it just doesn't connect.
I'm running 2 broker and 1 zookeeper configuration.
Expected Output: Producer.bootstrap_connected() should return True.
Actual Output: False
server.properties
listeners=SASL_PLAINTEXT://:9092
advertised.listeners=SASL_PLAINTEXT://gcp-cluster-name:9092
sasl.mechanism.inter.broker.protocol=PLAIN`
sasl.enabled.mechanisms=PLAIN
security.inter.broker.protocol=SASL_PLAINTEXT
Consumer.py
from kafka import KafkaConsumer
import json
sasl_mechanism = 'PLAIN'
security_protocol = 'SASL_PLAINTEXT'
# Create a new context using system defaults, disable all but TLS1.2
context = ssl.create_default_context()
context.options &= ssl.OP_NO_TLSv1
context.options &= ssl.OP_NO_TLSv1_1
consumer = KafkaConsumer('organic-sense',
bootstrap_servers='<server-ip>:9092',
value_deserializer=lambda x: json.loads(x.decode('utf-8')),
ssl_context=context,
sasl_plain_username='user',
sasl_plain_password='<password>',
sasl_mechanism=sasl_mechanism,
security_protocol = security_protocol,
)
print(consumer.bootstrap_connected())
for data in consumer:
print(data)

Connection from Linux OMI (omicli) to Windows WMI fails with DMTF related error

I am implementing OMI client on CentOs in C++ to communicate with windows WMI
I have installed OMI on Linux CentOS 7 and trying to connect to Windows 7
using the sample utility provided by OMI.
Reference: https://github.com/Microsoft/omi
Also configured WINRM on Windows to receive basic authentication calls.
I am not able to get the sample working. Getting the following error:
root#LinuxMachine bin]# ./omicli --auth Basic --hostname WinMachine.TEST.COM -u admin -p adminpassaword ei root/cimv2 Win32_Environment --port 5985
./omicli: result: MI_RESULT_FAILED
./omicli: result: ERROR_INTERNAL_ERROR: The WS-Management service cannot process the request. A DMTF resource URI was used to access a non-DMTF class. Try again using a non-DMTF resource URI.
Below is the WINRM configuration for the destination machine for reference
C:\Windows\system32>winrm get winrm/config
Config
MaxEnvelopeSizekb = 150
MaxTimeoutms = 60000
MaxBatchItems = 32000
MaxProviderRequests = 4294967295
Client
NetworkDelayms = 5000
URLPrefix = wsman
AllowUnencrypted = true [Source="GPO"]
Auth
Basic = true [Source="GPO"]
Digest = true [Source="GPO"]
Kerberos = true [Source="GPO"]
Negotiate = true [Source="GPO"]
Certificate = true
CredSSP = true [Source="GPO"]
DefaultPorts
HTTP = 5985
HTTPS = 5986
TrustedHosts
Service
RootSDDL = O:NSG:BAD:P(A;;AG;;;BA)S:P(AU;FA;GA;;;WD)(AU;SA;GWGX;;;WD)
MaxConcurrentOperations = 4294967295
MaxConcurrentOperationsPerUser = 15
EnumerationTimeoutms = 60000
MaxConnections = 25
MaxPacketRetrievalTimeSeconds = 120
AllowUnencrypted = true
Auth
Basic = true [Source="GPO"]
Kerberos = true [Source="GPO"]
Negotiate = true [Source="GPO"]
Certificate = false
CredSSP = true [Source="GPO"]
CbtHardeningLevel = Relaxed
DefaultPorts
HTTP = 5985
HTTPS = 5986
IPv4Filter = *
IPv6Filter = *
EnableCompatibilityHttpListener = false
EnableCompatibilityHttpsListener = false
CertificateThumbprint
Winrs
AllowRemoteShellAccess = true
IdleTimeout = 180000
MaxConcurrentUsers = 5
MaxShellRunTime = 2147483647
MaxProcessesPerShell = 15
MaxMemoryPerShellMB = 150
MaxShellsPerUser = 5
Am I missing anything obvious? Any help with getting the sample working is much appreciated.
I had encountered similar issue. I have resolved this by upgrading power-shell version on my server.
Windows 7 by-default shows uses powershell version 2.0.
PS C:\> test-wsman <clientName>
wsmid : http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd
ProtocolVersion : http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd
ProductVendor : Microsoft Corporation
ProductVersion : OS: 0.0.0 SP: 0.0 Stack: 2.0
By-default CIM session uses WSMAN protocol, specifically newer version of protocol.
This won't work for computers running powershell version 2.0 or no powershell at all.
Upgrade your to resolve this issue.
Refer URL https://mcpmag.com/articles/2013/05/07/remote-to-second-powershell.aspx for more details.

msxml3.dll error in sql

Thanks in Advance... when i execute below mentioned part in sql for sending sms using web service, getting error as The operation timed out. Please help me to resolve this issue.
-- Call service to send sms
EXEC spHTTPRequest #URI = #ServiceFinalUrl
,#methodName = 'POST'
,#requestBody = #RequestText
,#SoapAction = 'http://tempuri.org/CreateOrderForMe'
,#UserName = ''
,#Password = ''
,#responseText = #xmlOut OUT