I am trying to have a test on wso2 mss 1.0. After following sample of https://docs.wso2.com/display/MSS100/Running+a+Basic+Microservice, the url curl localhost:8080/hello/Microservices cannot be accessed.
Also there is no port configured in wso2mss-1.0.0-alpha\repository\conf\carbon.xml.
AFAIK you can configured the port using conf/transports/netty-transports.yml. By default port is set to 8080.
Related
I am testing Wso2 Api Manager on Ubuntu 18.04. When I created the demo phone verify soap to rest api, the production end point port shows 8281.
Currently on ubuntu I am serving a dart server which uses same port. And all the configuration port from 8080 to 8484 allocated to for my existing server.
My question is how to change production end point port to something different like 9090?
Example:
Default Settings show:
http://localhost:8281/phoneverify/1.0.0
And I need to change to:
http://localhost:9090/phoneverify/1.0.0
Every time I need to run the server I need to publish my endpoint to use port 9090. How do I do that? Thanks
You can set the port offset to 810 in AM_HOME/repository/conf/carbon.xml. Then all the ports will get offset from 810.
Setting offsets in carbon. xml would work, but it will move all other ports as well. I'd sugest using two other ways we commonly use
have an http reverse proxy
You can have a reverse proxy (httpd, ngix,..) to listen to any port defined and forward requests to the target endpoint
you can set the nio port in the file repository/conf/tomcat/catalina-server. xml
After installing WSO2EI-6.1.1 to migrate from my old WSO2DSS to EI, I was trying to setup a simple php wsdl soup client to call the "Version" service from php with a direct link to service wsdl and I'm getting the following error:
php code:
try {
$client = new SoapClient("http://server-ip:8280/services/Version?wsdl");
$response = $client->getVersion();
var_dump($response);
} catch (SoapFault $fault) {
echo $fault->getMessage();
}
error:
Fatal error: Maximum execution time of 120 seconds exceeded
Seems like the connection is timing out... I have tried to get the service wsdl with file_get_contents with the same result, timing out. well sometimes it works with a terrible loading time of like 90-100 seconds, but most of the times it times out.
$wsdl = file_get_contents("http://server-ip:8280/services/Version?wsdl");
var_dump($wsdl);
I have tested the link in browser and it is loading fine. Also tested with curl from linux command line and it loads fine there as well so the link is accessible.
curl -v http://server-ip:8280/services/Version?wsdl
So the timeout happens only when I try to retrieve the wsdl from within php. however if I download and save the wsdl file and pass the local xml file in php instead, then the service works fine and the version is fetched and displayed.
try {
$client = new SoapClient("Version.xml");
$response = $client->getVersion();
var_dump($response);
} catch (SoapFault $fault) {
echo $fault->getMessage();
}
So it seems like the problem is only fetching the wsdl directly from server in php and the rest of the communication between the server and the client is working fine.
after few hours searching I decided to try nhttp transport in transportReceiver configuration of axis2 instead of pass through transport and the problem is solved. however, reading the docs it is noted that the default transport is pass through and it is better in terms of performance compared to nhttp.
so is it a bug or something there causing the problem or am I doing something wrong and its possible to retrieve the wsdl directly from server within php while using the pass through transport?
Update:
when I use port numbers 9763 for http or 9443 for https instead of 8280 and 8243 to access services or service wsdl then I can access services or wsdl from php with no problems. So can anyone please explain to me whats the difference when using the port number 9763 or 8280 to access a service over http transport? Is it ok to use 9763 instead of 8280 to deal with services or to use 9443 instead of 8243? Is it still using the passthru transport when I use ports 9763 and 9443?
All WSO2 servers have two types of transports — servlet and passthrough (or nhttp). These are used for different purposes. Servlet transports are exposed over port 9443 and 9763 by default. This is the port used by admin services and the management console. The version service also uses the same port. For the services that you write and deploy, they are exposed over 8280 and 8243 ports. To answer your question, for this service you have to use 9763 or 9443 ports. And you will be accessing the Version service over servlet transport and not passthrough transport.
I've installed Dss 3.2.2 features onto Esb4.8.1.
When I create a proxy service the Service endpoints are as expected e.g
http://[ip]:8280/services/[proxy_service_name]
But when I create a dataservice , the service endpoints also show the same(NIO) port , contrary to the expected (mgmt) port :
http://[ip]:8280/services/[data_service_name]
But it should be
http://[ip]:9763/services/[data_service_name]
If I send a json post request to the 8280 for a dataservice , it does not receive any params :
"current_params": "{}"
Sending it to 9763 it reads my params:
"current_params": "{no=xxx, dump_size=10}"
Is there a config/way to fix this?
I believe you are using try-it tool shipped with WSO2 ESB by default. Let me explain what it the reason for this problem. WSO2 ESB exposes two HTTP ports (i.e NIO port which is 8280 and servlet port which is 9763) and when dataservice features are installed, data services are also exposed via both ports. By default ESB try-it uses NIO port(8280). The issue is ESB try-it tool does not handle invoking data service via NIO transport. It drops the parameters passed. That is why the current_params is empty. This is a known issue and will be fixed in a future release. As a workaround you can either use servlet port to invoke dataservice or any other soap client such as SoapUI.
Thanks
I followed the same steps as mentioned in the WSO2 documentation for configuring BAM server and WSO2 AS. Both are in different computers. Still not able to solve the errors. Now I am getting new error when I click BAM EVENT_KS. My BAM server offset address is 0 by default. I changed my WSO2 AS offset to 2 in carbon.xml.
ERROR {org.wso2.carbon.databridge.agent.thrift.AsyncDataPublisher} - Error while connection to event receiver
org.wso2.carbon.databridge.agent.thrift.exception.AgentException: Cannot borrow client for TCP,203.252.180.178:9443,TCP,203.252.180.178:9543
at org.wso2.carbon.databridge.agent.thrift.internal.publisher.authenticator.AgentAuthenticator.connect(AgentAuthenticator.java:58)
and many more .....
Please help what will be the configuration problem with BAM. I tried all the latest 3 version.
Read [1] for configuration details. As I can see you have used ports 9443 and 9543 instead of 7611 or 7711 which are the correct Thrift server ports.
Use 7611 for unsecured port and 7711 for the secured port when no port offset is applied in BAM.
[1] http://docs.wso2.org/wiki/display/AS501/Collecting+Data+Statistics+of+Services
I am using ESB 4.0.3 on Mac OSX 10.7.5.
Java version is
java version "1.6.0_35" /
Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-11M3811) /
Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)
In my axis2.xml I am using have following configuration for HTTPS transport listner
<transportReceiver name="https" class="org.wso2.carbon.core.transports.http.HttpsTransportListener">
<parameter name="port" locked="true">9443</parameter>
</transportReceiver>
In my mgt-transports.xml I have following configuration
<parameter name="port" locked="xsd:false">${Ports.ServletTransports.HTTPS}</parameter>
In my carbon.xml I have following configuration
<ServletTransports>
<HTTPS>9440</HTTPS>
<HTTP>9763</HTTP>
</ServletTransports>
How ever when I start the ESB the proxy / Data services on HTTPS port never listen to 9443 where as they listen on 9440 all the time.
How can I enable HTTPS port for the proxy and Data services different than the management console HTTPS port?
Please let me know.
thanks
Abhijit
Hi Nuwan
I am not using NHTTP transport. Please see the transportlistener class above. I am using servelet transport only for the ESB as my requirement is not to disturb existing HTTP client.
For servlet transport in ESB I would like to know if ADMIN UI port can be different than the ESB proxy services HTTPS port.
Please help.
Abhijit
Are mentioning about ESB proxy services ?, If so they do not listen to the servlet transport. They are working on NHHTP transport which you can configure. Please provide more information. whats the NHTTP ports in ESB ?
Regards,
/Nuwan
If you are using the servlet transport for ESB, the same port will be used by Admin Console UI. You cannot do anything for that, since there is only one Servlet transport Admin UI will also use that.
Regards,
/Nuwan