wso2 emm - unable to connect via external IP - wso2

I have EMM 1.1.0 installed on server with internal IP 10.100.0.1:9443.
Port forwarded by router to external IP 90.90.0.1:23333
Im able to log in locally to https://localhost:9443/emm without a problem.
Cases:
1) After modifying all localhosts in sso-idp-config.xml to internal 10.100.0.1:9443
From internal LAN to //10.100.0.1:9443/emm - able to log in
From external to //90.90.0.1:23333/emm redirected to
//10.100.0.1:9443/samlsso - failed
2) After modifying all localhosts in sso-idp-config.xml to external 90.90.0.1:23333
From internal LAN to //10.100.0.1:9443/emm after log in redirected to //90.90.0.1:23333/emm/acs - failed
From external to //90.90.0.1:23333/emm login?null redirected to
//10.100.0.1:9443/samlsso - failed
What is strange is that iam able to reach //90.90.0.1:23333/carbon from external side in both cases.

We had the same issue with a public IP, but we have figured it out. It is a configuration issue; we changed the following files and now everything works just fine.
Note that you can also directly change these files at the target directory.
modules/distribution/src/repository/conf/api-manager.xml change the following ${carbon.local.ip} with your public IP
<ServerURL>https://${carbon.local.ip}:${mgt.transport.https.port}/services/</ServerURL>
<GatewayEndpoint>http://${carbon.local.ip}:${http.nio.port},https://${carbon.local.ip}:${https.nio.port}</GatewayEndpoint>
/modules/distribution/src/repository/conf/axis2/axis2.xml add the following parameter.
<parameter name="bind-address" locked="false">YOUR_PUBLIC_IP</parameter>
/modules/distribution/src/repository/conf/carbon.xml change the following definitions with your public IP.
HostName and MgtHostName
/modules/distribution/src/repository/conf/identity.xml and /modules/distribution/src/repository/conf/sso-idp-config.xml replace the localhost with the public IP.

Related

web service show localhost not IP in SOAP

I created a web service named WildflyTest and a method called HelloWorld and deployed it to my wildfly 11 server,the server ip is 10.10.9.151.I tried to test using SoapUI, and I can open the wsdl address http://10.10.9.151:8086/WildflyTest/HelloWorld?wsdl. But when I tested it in SOAP Ui, when I created a new request, the address is http://localhost:8086/WildflyTest instead of 10.10.9.151.Can anyone give me some suggestion where to check the reason? Thx.
The issue is with your bind address. By default, public interface is configured to listen on the loopback address of 127.0.0.1. So if you start WildFly as: ./bin/standalone.sh
Then the WildFly default page can be accessed as http://127.0.0.1:8080. Usually, /etc/hosts provide a mapping of 127.0.0.1 to localhost, and so the same page is accessible at http://localhost:8080. 8080 is the HTTP port where all applications are accessed.
On a multihomed machine, you may like to start WildFly and bind public interface to a specific IP address. This can be easily done as:
./bin/standalone.sh -b=10.10.9.151 //your server ip
Now the applications can be accessed at http://10.10.9.151:8080.
Refer following links for more info:
Bind WildFly to a different IP address
How to configure JBoss to bind to a different IP ?

Stellar Explorer for Private Net

I built and run Private net using a stellar-core on local infrastructure successfully. I need to connect that(http://localhost:8000/) local horizon API to the stellar explorer. I use this link to connect local horizon API to the explorer. I get an error when I set a Current Network on stellar-explorer which is running on http://localhost:5000/
These are the two approaches that worked for me. In the server.js file change the public net IP to point to your localhost IP. If that doesn't work, use ngrok on your localhost to create an HTTPS endpoint that then you can point the explorer to.

WSO2 IoTS APIMClientOAuthException: failed to retrieve oauth token using jwt

I have uploaded WSO2 IoTS 3.1.0 to my remote virtual machine with static IP address.
I have unzipped zip file then run sudo ./change-ip.sh
In first step I have entered localhost
In second step I have entered my_own_ip_address
Then my hostname is my_own_ip_address
When I launch IoT Server and open device management then I login where it shows me this page:
When I try to open any other page and even try to logout it redirects me to this page.
My logs shows this:
TID[-1234] [IoT] [2017-09-09 08:32:30,079] ERROR {auth-module} -
org.wso2.carbon.apimgt.integration.client.exception.APIMClientOAuthException: failed to retrieve oauth token using jwt
org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)
org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)
It shows that there is an error in jaggery JS.
What did I miss?
One reason for the issue could be that you are having a DNS entry against that IP in /etc/hosts file. Please make sure that your /etc/hosts file does not contain any DNS entry pointing your IP to a hostname. When WSO2 IoT Server tries to resolve DNS to call the endpoints, the first thing it looks at is your local DNS setting. If your IP is pointing to a hostname, it takes that host name as the server hostname. And when IoT server tries to verify the common name of the SSL certificate, it gets conflicting information. This leads to hostname verification fail issue. And that could result in JWT token failure as it cannot access the endpoints.
Similar issue was discussed here

WSO2 IS 5.0.0 saml authentication always redirects to localhost

I'm playing with travelocity sample application, but I'm having a problem:
when I access the application at 10.0.3.124:8080/travelocity.com I end up at https://localhost:9444/commonauth?SAMLRequest=... even though I configured the "host" parameter in carbon.xml. I've also searched for localhost in authenticators.xml and application-authentication.xml and found IdentityProviderSSOServiceURL that i changed from localhost to machine ip.
I'm on a laptop and my application server and IS istances run on a different machine with the 10.0.3.124 IP.
I successfully access the IS admin console.
Where's the problem?
It seems that I also had to configure the <MgtHostName>10.0.3.124</MgtHostName> in carbon.xml.
Thanks
There is a file named identity.xml in side IS_HOME/repository/conf which carries following configuration.
<SSOService>
<IdentityProviderURL>https://localhost:9443/samlsso</IdentityProviderURL>
Please configuring this with your environment parameters.
Thanks,
Pushpalanka

publish jax-ws service on public ip

I've a simple jax-ws web service that on localhost works fine with the clients, but now I want to publish the web service on a public ip, so the clients can interact with it through wan network instead lan network.
I signed to no-ip dns service provider and defined my host like "myname.no-ip.info".
In my code i start the service in this way:
Endpoint.publish("http://localhost:8080/baseStationProvider", new BaseStationProvider());
and the browser at http://myname.no-ip.info:8080/baseStationProvider#wsdl doesn't show the wsdl.
If i start the service in this way:
Endpoint.publish("http://myname.no-ip.info/baseStationProvider", new BaseStationProvider());
compiling the code, it raise this exception:
Server Runtime Error: java.net.SocketException: Unresolved address
Any idea to problem and/or how to do what i need?
thanks in advance
This seems likely to do with routing and firewalls as opposed to web service publication etc. Ignoring the web-service aspect, can you even reach your server when you use this in your browser:
http://myname.no-ip.info:8080/
?
Which should look the same as
http://localhost:8080/
If not, then it is probably DNS/Routing/Firewalls that you need to check. Diagnostics that will help there are:
1) can the machine you are testing on resolve the DNS name mynam.no-ip.info? nslookup, ping, traceroute/tracert
2) is there a firewall blocking port 8080 from reaching local host? If the route from the internet to your host hits a firewall (which it will) that firewall will have to forward the request.
Good luck.