Worklight [adapter-deployer] SEVERE: Element <port> must be a number - ibm-mobilefirst

Currently in the environment being used, the port is not available to be specified all the time. Within my xml <connectivity> settings, the <port> will be blank.
<connectivity>
<connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
<protocol>http</protocol>
<domain>worklightserver.test.com</domain>
<port></port>
</connectionPolicy>
<loadConstraints maxConcurrentConnectionsPerNode="2" />
</connectivity>
When calling
<adapter-deployer deployable="test.adapter" worklightServerHost="http://192.168.1.9:8080"/>
I get the error:
[adapter-deployer] SEVERE: Element <port> must be a number.
Is this a bug in worklight? I would assume that if a port is not specified, it would use the proper port depending on the protocol specified. With a port specified, it works as it should

HTTP protocol can work on any port, not necessarily 80.
Port must be always specified.

Related

Unimrcp server sending 100 and 200 to a wrong port

<?xml version="1.0" encoding="UTF-8"?>
<!-- UniMRCP server document -->
<unimrcpserver xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="unimrcpserver.xsd" version="1.0">
<properties>
<ip type="auto"/>
</properties>
<components>
<!-- Factory of MRCP resources -->
<resource-factory>
<resource id="speechsynth" enable="true"/>
<resource id="speechrecog" enable="true"/>
<resource id="recorder" enable="true"/>
<resource id="speakverify" enable="true"/>
</resource-factory>
<!-- SofiaSIP MRCPv2 signaling agent -->
<sip-uas id="SIP-Agent-1" type="SofiaSIP">
<sip-port>8060</sip-port>
<sip-transport>udp</sip-transport>
<ua-name>UniMRCP SofiaSIP</ua-name>
<sdp-origin>UniMRCPServer</sdp-origin>
</sip-uas>
<!-- UniRTSP MRCPv1 signaling agent -->
<rtsp-uas id="RTSP-Agent-1" type="UniRTSP">
<rtsp-port>1554</rtsp-port>
<!-- <force-destination>true</force-destination> -->
<resource-map>
<param name="speechsynth" value="speechsynthesizer"/>
<param name="speechrecog" value="speechrecognizer"/>
</resource-map>
<max-connection-count>100</max-connection-count>
<sdp-origin>UniMRCPServer</sdp-origin>
</rtsp-uas>
<!-- MRCPv2 connection agent -->
<mrcpv2-uas id="MRCPv2-Agent-1">
<mrcp-port>1554</mrcp-port>
<max-connection-count>100</max-connection-count>
<force-new-connection>false</force-new-connection>
<rx-buffer-size>1024</rx-buffer-size>
<tx-buffer-size>1024</tx-buffer-size>
</mrcpv2-uas>
<!-- Media processing engine -->
<media-engine id="Media-Engine-1">
<realtime-rate>1</realtime-rate>
</media-engine>
<!-- Factory of RTP terminations -->
<rtp-factory id="RTP-Factory-1">
<rtp-port-min>5000</rtp-port-min>
<rtp-port-max>6000</rtp-port-max>
</rtp-factory>
<!-- Factory of plugins (MRCP engines) -->
<plugin-factory>
<engine id="Demo-Synth-1" name="demosynth" enable="true"/>
<engine id="Demo-Recog-1" name="demorecog" enable="true"/>
<engine id="Demo-Verifier-1" name="demoverifier" enable="true"/>
<engine id="Recorder-1" name="mrcprecorder" enable="true"/>
</plugin-factory>
</components>
<settings>
<!-- RTP/RTCP settings -->
<rtp-settings id="RTP-Settings-1">
<jitter-buffer>
<adaptive>1</adaptive>
<playout-delay>50</playout-delay>
<max-playout-delay>600</max-playout-delay>
<time-skew-detection>1</time-skew-detection>
</jitter-buffer>
<ptime>20</ptime>
<codecs own-preference="false">PCMU 8000</codecs>
<!-- enable/disable RTCP support -->
<rtcp enable="false">
<rtcp-bye>1</rtcp-bye>
<!-- rtcp transmission interval in msec (set 0 to disable) -->
<tx-interval>5000</tx-interval>
<!-- period (timeout) to check for new rtcp messages in msec (set 0 to disable) -->
<rx-resolution>1000</rx-resolution>
</rtcp>
</rtp-settings>
</settings>
<profiles>
<!-- MRCPv2 default profile -->
<mrcpv2-profile id="uni2">
<sip-uas>SIP-Agent-1</sip-uas>
<mrcpv2-uas>MRCPv2-Agent-1</mrcpv2-uas>
<media-engine>Media-Engine-1</media-engine>
<rtp-factory>RTP-Factory-1</rtp-factory>
<rtp-settings>RTP-Settings-1</rtp-settings>
</mrcpv2-profile>
<!-- MRCPv1 default profile -->
<mrcpv1-profile id="uni1">
<rtsp-uas>RTSP-Agent-1</rtsp-uas>
<media-engine>Media-Engine-1</media-engine>
<rtp-factory>RTP-Factory-1</rtp-factory>
<rtp-settings>RTP-Settings-1</rtp-settings>
</mrcpv1-profile>
<!-- more profiles might be added here -->
</profiles>
</unimrcpserver>
Hello,
I'm trying to connect a VBVoice application to a Unimrcp server for TTS. Application sends Invite successfully to a server, and then server replies with 100 and 200, however they all go to a wrong port (5060 instead of 8060). Am I missing anything in the config file?
VBVoice can be configured to change the port used for the MRCP connection, as it applies to the VBVMRCPClient. To modify the port used by the VBVoice MRCP Client open the Pronexus Control Panel, then access the VBVConfig utility. Along the left of VBVConfig access the MRCP section. Here you will see options for ASRServerPort and TTSServerPort. The default port is 5060. You can set this to any port number that is available. After making the change needed, use the File dropdown to select "Save All Keys" and close VBVConfig. The config change will be applied the next time you start the VBVoice MRCP Client.
Of note - Changing the MRCP port number is typically required when the VBVoice IVR is running VOIP telephony protocol because the default VOIP port VBVoice uses is 5060.
Also of note - Verify if the Speech Server running your ASR/TTS system will use TCP or UDP for the MRCP connection. By default VBVoice is configured to use TCP. This can be modified in the VBVConfig utility in the MRCP section, just look for the ASRServerPortIsTCP and the TTSServerPortIsTCP options.

How to set the pre-emptive auth value in header value in adapter implementation file in mobile first 7.1?

I am using authentication header in the IBM integration bus, so to call the IIB service from mobile first adapter, I am using the following values in adapter.xml file. IIB service is expecting pre-emptive value, so how to set that value in adapter.xml
<connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
<protocol>https</protocol>
<domain></domain>
<port>443</port>
<connectionTimeoutInMilliseconds>30000</connectionTimeoutInMilliseconds>
<socketTimeoutInMilliseconds>30000</socketTimeoutInMilliseconds>
<authentication>
<basic/>
<serverIdentity>
<username></username>
<password></password>
</serverIdentity>
</authentication>
<maxConcurrentConnectionsPerNode>50</maxConcurrentConnectionsPerNode>
<!-- Following properties used by adapter's key manager for choosing specific certificate from key store
<sslCertificateAlias></sslCertificateAlias>
<sslCertificatePassword></sslCertificatePassword>
-->
</connectionPolicy>

Infinispan and jgroups Implementation on Openshift Stack

Question-1
I am trying run an Infinispan cluster on Openshift Tomcat gears. With nodes sitting on two different hosts.I am using TCP as the data transfer protocol and MPING as the discovery protocol.
If I try to use any of the JGROUPS provided key word for bind address like GLOBAL, SITE_LOCAL, LINK_LOCAL, NON_LOOPBACK, match-interface, match-host, match-address, except for LOOPBACK it binds the service to public IP(64.X.X.X) and for LOOPBACK it binds it to 127.0.0.1.This is not what I want to achieve.
I want it to run the JGROUPS service on the custom IP address provided by Openshift which looks some what like this 127.2.155.1. If I am able to run it in the given IP then it will be easy for me to write Port forwarding rules so that the cluster members will be able to discover each other even if they exist in different hosts.
Using environment property
Map<String, String> envKeys = System.getenv();
for (String keys : envKeys.keySet()) {
System.out.println(keys + ":" + envKeys.get(keys));
if (keys.equalsIgnoreCase("OPENSHIFT_JBOSSEWS_IP")) {
System.setProperty("OPENSHIFT_JBOSSEWS_IP", envKeys.get(keys));
}
}
It fails while doing above saying could not find the IP address or 127.2.155.1 is an invalid IP address. Please find the sample jgroups.xml I am using in my project.
<config xmlns="urn:org:jgroups"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema /JGroups-3.4.xsd">
<TCP
bind_addr="${OPENSHIFT_JBOSSEWS_IP}"
bind_port="${jgroups.tcp.port:7800}"
port_range="0"
recv_buf_size="20m"
send_buf_size="640k"
max_bundle_size="31k"
use_send_queues="true"
enable_diagnostics="false"
bundler_type="sender-sends-with-timer"
thread_naming_pattern="pl"
thread_pool.enabled="true"
thread_pool.min_threads="2"
thread_pool.max_threads="30"
thread_pool.keep_alive_time="60000"
thread_pool.queue_enabled="true"
thread_pool.queue_max_size="100"
thread_pool.rejection_policy="Discard"
oob_thread_pool.enabled="true"
oob_thread_pool.min_threads="2"
oob_thread_pool.max_threads="30"
oob_thread_pool.keep_alive_time="60000"
oob_thread_pool.queue_enabled="false"
oob_thread_pool.queue_max_size="100"
oob_thread_pool.rejection_policy="Discard"
internal_thread_pool.enabled="true"
internal_thread_pool.min_threads="2"
internal_thread_pool.max_threads="4"
internal_thread_pool.keep_alive_time="60000"
internal_thread_pool.queue_enabled="true"
internal_thread_pool.queue_max_size="100"
internal_thread_pool.rejection_policy="Discard"
/>
<!-- Ergonomics, new in JGroups 2.11, are disabled by default in TCPPING until JGRP-1253 is resolved -->
<!--
<TCPPING timeout="3000"
initial_hosts="localhost[7800],localhost[7801]"
port_range="5"
num_initial_members="3"
ergonomics="false"
/>
-->
<MPING bind_addr="{OPENSHIFT_JBOSSEWS_IP}"
break_on_coord_rsp="true"
mcast_addr="${jgroups.mping.mcast_addr:228.2.4.6}"
mcast_port="${jgroups.mping.mcast_port:43376}"
ip_ttl="${jgroups.udp.ip_ttl:2}"
num_initial_members="3"/>
<MERGE3/>
<FD_SOCK/>
<FD timeout="3000" max_tries="5"/>
<VERIFY_SUSPECT timeout="1500"/>
<pbcast.NAKACK2 use_mcast_xmit="false"
xmit_interval="1000"
xmit_table_num_rows="100"
xmit_table_msgs_per_row="10000"
xmit_table_max_compaction_time="10000"
max_msg_batch_size="100"/>
<UNICAST3 xmit_interval="500"
xmit_table_num_rows="20"
xmit_table_msgs_per_row="10000"
xmit_table_max_compaction_time="10000"
max_msg_batch_size="100"
conn_expiry_timeout="0"/>
<pbcast.STABLE stability_delay="500" desired_avg_gossip="5000" max_bytes="1m"/>
<pbcast.GMS print_local_addr="false" join_timeout="3000" view_bundling="true"/>
<tom.TOA/> <!-- the TOA is only needed for total order transactions-->
<MFC max_credits="2m" min_threshold="0.40"/>
<FRAG2 frag_size="30k"/>
<RSVP timeout="60000" resend_interval="500" ack_on_delivery="false" />
</config>
Question-2
When Infinispan is successfully started, It runs 2 java processes one on the port 7800 as mentioned in the above config file and other on a port number randomly picked up by Infinispan. I would like to understand more about the processes.
**COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME**
java 5640 1334 44u IPv4 1556890779 0t0 TCP 127.2.155.1:7800 (LISTEN)
java 5640 1334 44u IPv4 1556890779 0t0 TCP 127.2.155.1:20772 (LISTEN)
Question-1:
Setting bind_addr to bind_addr=match-address=127.2.\* should pick the correct address (127.2.155.1).
Does 127.2.155.1 show when you do an ifconfig?
Question-2:
The second port is probably opened by FD_SOCK. You can control this by setting attributes bind_addr and start_port in FD_SOCK.
[1] http://www.jgroups.org/manual/index.html#CommonProps

org.apache.http.conn.HttpHostConnectException

I am getting the following error when i am trying to connect to a url https://jazz.net on worklight 5.0.6..
Procedure invocation error. Runtime: Http request failed:
org.apache.http.conn.HttpHostConnectException: Connection to
https://jazz.net refused
This is the response I am getting in log:
{"responseID":"6","errors":["Runtime: Http request failed:
org.apache.http.conn.HttpHostConnectException: Connection to
https://jazz.net
refused"],"isSuccessful":false,"warnings":[],"info":[]}*/
Here is the adapter xml code:
<connectivity>
<connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
<protocol>https</protocol>
<domain>jazz.net</domain>
</connectionPolicy>
<loadConstraints maxConcurrentConnectionsPerNode="2" />
</connectivity>
You need to also add a child-element port with the value 443.

how to change listen port from default 7001 to something different?

Can anyone tell me how to change the default listening port of Weblogic 10.3 to something different? I saw some posts on discussion boards which say that change it under ...//config/config.xml. Even I thought so, but surprisingly, there is no mention of word "port" in that file. Here is the file:
<?xml version='1.0' encoding='UTF-8'?>
<domain xmlns="http://xmlns.oracle.com/weblogic/domain" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/security/xacml http://xmlns.oracle.com/weblogic/security/xacml/1.0/xacml.xsd http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator/1.0/passwordvalidator.xsd http://xmlns.oracle.com/weblogic/domain http://xmlns.oracle.com/weblogic/1.0/domain.xsd http://xmlns.oracle.com/weblogic/security http://xmlns.oracle.com/weblogic/1.0/security.xsd http://xmlns.oracle.com/weblogic/security/wls http://xmlns.oracle.com/weblogic/security/wls/1.0/wls.xsd">
<name>vistakon</name>
<domain-version>10.3.5.0</domain-version>
<security-configuration>
<name>vistakon</name>
<realm>
<sec:authentication-provider xsi:type="wls:default-authenticatorType"></sec:authentication-provider>
<sec:authentication-provider xsi:type="wls:default-identity-asserterType">
<sec:active-type>AuthenticatedUser</sec:active-type>
</sec:authentication-provider>
<sec:role-mapper xmlns:xac="http://xmlns.oracle.com/weblogic/security/xacml" xsi:type="xac:xacml-role-mapperType"></sec:role-mapper>
<sec:authorizer xmlns:xac="http://xmlns.oracle.com/weblogic/security/xacml" xsi:type="xac:xacml-authorizerType"></sec:authorizer>
<sec:adjudicator xsi:type="wls:default-adjudicatorType"></sec:adjudicator>
<sec:credential-mapper xsi:type="wls:default-credential-mapperType"></sec:credential-mapper>
<sec:cert-path-provider xsi:type="wls:web-logic-cert-path-providerType"></sec:cert-path-provider>
<sec:cert-path-builder>WebLogicCertPathProvider</sec:cert-path-builder>
<sec:name>myrealm</sec:name>
<sec:password-validator xmlns:pas="http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator" xsi:type="pas:system-password-validatorType">
<sec:name>SystemPasswordValidator</sec:name>
<pas:min-password-length>8</pas:min-password-length>
<pas:min-numeric-or-special-characters>1</pas:min-numeric-or-special-characters>
</sec:password-validator>
</realm>
<default-realm>myrealm</default-realm>
<credential-encrypted>{AES}1NMyZAwXiucj9+d8cj/LGFmw+yhHyIj/YprGOq/PA9Vg0Se2+DkV54N5AwFzW+fN2SWvU5YtojWvVSTnifrUdT6uso4fpO6inAa3LQccOQv59VFxdceHOMv2h1dkngxq</credential-encrypted>
<node-manager-username>weblogic</node-manager-username>
<node-manager-password-encrypted>{AES}tRw5L/hFc8+4J4w1H8uBj3unE0BC06cdk42CyMLR6Pk=</node-manager-password-encrypted>
</security-configuration>
<server>
<name>AdminServer</name>
<ssl>
<name>AdminServer</name>
<enabled>true</enabled>
</ssl>
<listen-port>8080</listen-port>
<listen-port-enabled>true</listen-port-enabled>
<listen-address></listen-address>
<java-compiler>javac</java-compiler>
<client-cert-proxy-enabled>false</client-cert-proxy-enabled>
<server-diagnostic-config>
<wldf-diagnostic-volume>Low</wldf-diagnostic-volume>
</server-diagnostic-config>
</server>
<embedded-ldap>
<name>vistakon</name>
<credential-encrypted>{AES}U6dM6LlDLLUYzefQ3M3NnsqijzWKSOgqLqNdJHVJEmeIU5v0wRZGm3ffumXif/uX</credential-encrypted>
</embedded-ldap>
<configuration-version>10.3.5.0</configuration-version>
<app-deployment>
<name>tbl</name>
<target>AdminServer</target>
<module-type>war</module-type>
<source-path>C:\Documents and Settings\bchitte\Desktop\tbl.war</source-path>
<security-dd-model>DDOnly</security-dd-model>
</app-deployment>
<app-deployment>
<name>DatabaseLoggerService</name>
<target>AdminServer</target>
<module-type>war</module-type>
<source-path>C:\Documents and Settings\bchitte\workspace\DatabaseLoggerService\DatabaseLoggerService.war</source-path>
<security-dd-model>DDOnly</security-dd-model>
</app-deployment>
<app-deployment>
<name>ReadingsProgressLogService</name>
<target>AdminServer</target>
<module-type>war</module-type>
<source-path>C:\Documents and Settings\bchitte\workspace\ReadingsProgressLogService\ReadingsProgressLogService.war</source-path>
<security-dd-model>DDOnly</security-dd-model>
</app-deployment>
<app-deployment>
<name>de</name>
<target>AdminServer</target>
<module-type>war</module-type>
<source-path>C:\Documents and Settings\bchitte\workspace\de.vogella.jersey.first\de.vogella.jersey.first.war</source-path>
<security-dd-model>DDOnly</security-dd-model>
</app-deployment>
<app-deployment>
<name>UpdateWIPQService</name>
<target>AdminServer</target>
<module-type>war</module-type>
<source-path>C:\Documents and Settings\bchitte\workspace\UpdateWIPQService\UpdateWIPQService.war</source-path>
<security-dd-model>DDOnly</security-dd-model>
</app-deployment>
<jms-server>
<name>VistakonJMSServer</name>
<target>AdminServer</target>
<persistent-store>VistakonFileStore</persistent-store>
</jms-server>
<file-store>
<name>VistakonFileStore</name>
<target>AdminServer</target>
</file-store>
<jms-system-resource>
<name>VistakonModule</name>
<target>AdminServer</target>
<sub-deployment>
<name>sdVistakon</name>
<target>VistakonJMSServer</target>
</sub-deployment>
<descriptor-file-name>jms/VistakonModule-jms.xml</descriptor-file-name>
</jms-system-resource>
<admin-server-name>AdminServer</admin-server-name>
<jdbc-system-resource>
<name>jdbc/MSSQL1</name>
<target></target>
<descriptor-file-name>jdbc/jdbc2fMSSQL1-5853-jdbc.xml</descriptor-file-name>
</jdbc-system-resource>
</domain>
Simplest option ...your can change it from AdminConsole.
Login to AdminConsole--->Server-->--->Configuration--->ListenPort (Change it)!
if your port is 7001, since it's the default it might not be mentioned in the config.xml. config.xml only reports stuff which differs from the default, for sake of simplicity.
apart from the config.xml, you should look into a number of other places under your domain-home:
bin/stopWebLogic.sh
bin/stopManagedWebLogic.sh
bin/startManagedWebLogic.sh
config/fmwconfig/servers/osbts1as/applications/em/META-INF/emoms.properties
config/config.xml
init-info/startscript.xml
init-info/tokenValue.properties
servers/osbts1as/data/nodemanager/osbts1as.url
servers/osbts1as/data/ldap/conf/replicas.prop
servers/osbts1ms1/data/nodemanager/osbts1ms1.url
servers/osbts1ms1/data/nodemanager/startup.properties
servers/osbts1ms2/data/nodemanager/osbts1ms2.url
servers/osbts1ms2/data/nodemanager/startup.properties
startManagedWebLogic_readme.txt
sysman/state/targets.xml
And don't forget to update any internal URIs of your deployed code.
See also http://www.javamonamour.org/2013/04/weblogic-change-admin-port-number.html
Especially changing the listen address/port of the admin can be troublesome. If you change only the managed server, it's a lot easier.
The best option is just rebuilding the domain.
The following lines are used to control the listen-port of a server, both are necessary:
<listen-port>7002</listen-port>
<listen-port-enabled>true</listen-port-enabled>
You can change the listen port as per your requirement.
This task can be accomplished in two diffrent ways.
By changing config.xml file
By changing in admin console
Change the listen port in config.xml as per your requirement and bounce the domain.
Admin Console
Login to AdminConsole->Server->Configuration->ListenPort (Change it)
Note:
It is a bad practice to edit config.xml and try to edit in admin console(It's a good practise as well)
As my experience, you can add another domain which listens different port than 7001, and use this domain in to deploy app.
Here's an example:
http://st-curriculum.oracle.com/obe/fmw/wls/10g/r3/installconfig/install_wls/install_wls.htm
HTH.
To update the listen ports for a server:
1.Click Lock & Edit in the Change Center of the webLogic Administration Console
2.expand Environment and select Server
3.click the name of the server and select Configuration > General
4.Find Listen Port to change it
5.click Save and start server.
That file has a listen-port element - that should be what you need to change, although it is currently set to 8080, not 7001.
If you still get the exception in the server startup after changing listen port, you should try changing Pointbase server port and debug port in setDomainEnv.cmd
I solved the issue by Changing the port no. in adrs-instances.xml file:
\JDEV_USER_HOME\system11.1.1.3.37.56.60\o.j2ee\adrs-instances.xml