Closed Tofdu31 closed 7 years ago
I have run into the exact same problem as described here with IoT 3.1.0-M8, 3.1.0-alpha and 3.1.0-beta.
Steps to reproduce the problem for any recent IoT 3.1.0 builds:
The following steps work perfectly for IoT 3.0.0 but fail to work for recent 3.1.0 builds:
I found the following script template very helpful while trying to automate some of the tedious manual steps:
#!/usr/bin/env bash
if [ -z "${myhostname}" ]; then
myhostname="test1.mydomain.foo"
fi
# Perform tedious, in-place configuration changes
perl -pi -e "s/localhost/${myhostname}/g" $(find . -name 'carbon.xml')
perl -pi -e "s/localhost/${myhostname}/g" $(find . -name 'wso2server.sh') # IoT 3.0.0
perl -pi -e "s/localhost/${myhostname}/g" $(find . -name 'iot-server.sh') # IoT 3.1.0
perl -pi -e "s/localhost/${myhostname}/g" $(find . -name 'sso-idp-config.xml')
perl -pi -e "s/localhost/${myhostname}/g" $(find . -name 'app-manager.xml')
perl -pi -e "s/localhost/${myhostname}/g" $(find . -name 'app-conf.json')
perl -pi -e "s/%iot.keymanager.host%/${myhostname}/g" $(find . -name 'app-conf.json')
perl -pi -e "s/%iot.keymanager.https.port%/9443/g" $(find . -name 'app-conf.json')
perl -pi -e "s/%iot.manager.host%/${myhostname}/g" $(find . -name 'app-conf.json')
perl -pi -e "s/%iot.manager.https.port%/9443/g" $(find . -name 'app-conf.json')
perl -pi -e "s/localhost/${myhostname}/g" $(find . -name 'site.json')
perl -pi -e "s/localhost/${myhostname}/g" $(find . -name 'designer.json')
perl -pi -e "s/%https.host%/https:\/\/${myhostname}:9443/g" $(find . -name 'designer.json')
perl -pi -e "s/localhost/${myhostname}/g" $(find . -name 'admin--Android-Mutual-SSL*.xml')
# XXX FIXME XXX
# Grab the existing keystores to be fixed (it is assumed that they're all the same)
mkdir -p junk
cp --verbose $(find . -name 'client-truststore.jks' | head -1) junk
cp --verbose $(find . -name 'wso2carbon.jks' | head -1) junk
cp --verbose $(find . -name 'wso2certs.jks' | head -1) junk
# Do some certificate fixing stuff here...
# XXX FIXME XXX
# Put the repaired keystores back (overwrite the existing ones)
for target in $(find . -name 'client-truststore.jks'); do
cp --verbose junk/client-truststore.jks ${target}
done
for target in $(find . -name 'wso2carbon.jks'); do
cp --verbose junk/wso2carbon.jks ${target}
done
for target in $(find . -name 'wso2certs.jks'); do
cp --verbose junk/wso2certs.jks ${target}
done
Hi all, I will explain to you a little better my method used. The CA that I use is Let's Encrypt : https://letsencrypt.org/ I'm using Debian 8.6
For the certificates of MY_DOMAIN, I use cerbot. So I recover 4 files:
Cert = /etc/letsencrypt/live/MY_DOMAIN/cert.pem Privkey = /etc/letsencrypt/live/MY_DOMAIN/privkey.pem Chain = /etc/letsencrypt/live/MY_DOMAIN/chain.pem Fullchain = /etc/letsencrypt/live/MY_DOMAIN/fullchain.pem
Procedure:
Preparing the certificate in PFX format
I go with the root user in the folder /etc/letsencrypt/live
I run the following command :
openssl pkcs12 -export -in cert.pem -inkey privkey.pem -name "MY_DOMAIN" -certfile chain.pem -certfile fullchain.pem -out wso2carbon.pfx -passout pass:wso2carbon
Converting the PFX file to Java Keystore :
I run the following command :
keytool -importkeystore -srckeystore wso2carbon.pfx -srcstoretype pkcs12 -destkeystore wso2carbon.jks -deststoretype JKS -storePass wso2carbon -srcstorepass wso2carbon
Exporting public key from JKS file:
keytool -export -alias "MY_DOMAIN" -keystore wso2carbon.jks -file wso2carbon.pem -storePass wso2carbon
Copying temporary directory files I copy all the files to create in a temporary directory called: certifs_wso2
Implementation of certificates
CERTIFICAT FOR IOT-CORE
First I save the Localhost certificates in a save_files folder:
cd Home_wso2iot/repository/resources/security
mkdir sauv_files
cp client-truststore.jks pwd
/sauv_files
cp wso2carbon.jks pwd
/sauv_files
cp wso2certs.jks pwd
/sauv_files
rm wso2carbon.jks
Then I copy wso2carbon.jks from my certifs_wso2 file to Home_wso2iot/repository/resources/security
In a console I go to the folder Home_wso2iot/repository/resources/security and I execute the following command:
Adding Public Key to Public Trustore
keytool -delete -alias wso2carbon -keystore client-truststore.jks -storePass wso2carbon
And, Using the file client-trustore.jks, we export the public key of our file wso2carbon.jks in wso2carbon.pem
keytool -export -alias MY_DOMAIN -keystore wso2carbon.jks -file wso2carbon.pem -storePass wso2carbon
I import the public key that has just been extracted in the file client-trustore.jks
keytool -import -alias MY_DOMAIN -file wso2carbon.pem -keystore client-truststore.jks -storepass wso2carbon
I also do the same manipulations for the file: ../wso2/analytics/repository/resources/security ../wso2/broker/repository/resources/security
Result https://MY_DOMAIN:9443/carbon - Wso2 carbon recognizes the certificate and I have a connection in https with the valid certificate.
https://MY_DOMAIN:9443/devicemgt - To access the console mgtdevices, I acceded well to the connection part but the authentication crashes with as message: SAML 2.0 based Single Sign-On Error when processing the authentication request! Please try login again.
This error is same for Wso2 Store, Publisher, Api... Additional information I use wso2iot 3.1.0 I deleted localhost and add a domain name. Everything works correctly before adding certificates I think the concern comes from the SSO authentication that crashes when you add a certificate signed by an authority I do not have strong competence in certificates. The procedure was carried out by following and analyzing several tutorials:
@Tofdu31 c'est possible que ce problem n'est pas present avec 3.1.0-beta2.
It's possible this problem has already been fixed in 3.1.0-beta2. I am going to try it today and confirm.
@Tofdu31 confirmed, 3.1.0-beta2 works correctly for me with the following certificate magique...
hostname="${1}"
if [ "${hostname}" == "" ]; then
hostname='test1.mydomain.foo'
fi
echo "Generating certificates for '${hostname}'"
alias='wso2carbon'
keytool -genkey -alias ${alias} -keyalg RSA -keysize 4096 \
-keypass wso2carbon -keystore selfsigned.jks -storepass wso2carbon \
-dname "cn=${hostname}, ou=My Org Unit, o=Org Unit, l=Location, st=XX, c=ZZ"
keytool -export -alias ${alias} -keystore selfsigned.jks \
-rfc -storepass wso2carbon -file public.cert
# Grab the existing keystores to be fixed (it is assumed that they're all the same)
cp --verbose $(find wso2iot* -name 'client-truststore.jks' | head -1) .
cp --verbose $(find wso2iot* -name 'wso2carbon.jks' | head -1) .
# Clear out the existing entry for this alias
keytool -delete -alias ${alias} -keystore client-truststore.jks \
-storepass wso2carbon
# Re-add the new entry for this alias
keytool -import -noprompt -trustcacerts -alias ${alias} -file public.cert \
-keystore client-truststore.jks -storepass wso2carbon
# Clear out the existing entry for this alias
keytool -delete -alias ${alias} \
-keystore wso2carbon.jks -storepass wso2carbon
keytool -import -noprompt -trustcacerts -alias ${alias} -file public.cert \
-keystore wso2carbon.jks -storepass wso2carbon
keytool -importkeystore -srckeystore selfsigned.jks -destkeystore keystore.p12 \
-deststoretype PKCS12 -deststorepass wso2carbon -srcstorepass wso2carbon
keytool -importkeystore -noprompt \
-srckeystore keystore.p12 -srcstoretype PKCS12 -srcstorepass wso2carbon \
-destkeystore wso2carbon.jks -deststorepass wso2carbon
# Put the keystores in the desired locations
for target in $(find wso2iot* -name 'wso2carbon.jks'); do
cp --verbose wso2carbon.jks ${target}
done
for target in $(find wso2iot* -name 'client-truststore.jks'); do
cp --verbose client-truststore.jks ${target}
done
# Create the missing payload for ./wso2iot-3.1.0-beta2/conf/identity/identity-providers/iot_default.xml
cat public.cert | sed '1d;$d' | tr -d '\r\n' > ugh.txt
Paste the contents of ugh.txt into iot_default.xml.
Also, don't forget to update mobile-config.xml too...
perl -pi -e "s/localhost/${myhostname}/g" $(find . -name 'mobile-config.xml')
Hi Tyler, Thank you very much. I'll test that tomorrow and keep you posted. I also worked to make my server with an IP. I will provide you the script for making comparisons or forgetting that I will have done
Thanks again to you
Pas de quoi. Bonne chance.
arrf un français !!! moi qui galére grave en anglais ;)
Salut à tous,
J'ai une petite question pour toi Tyler, je me demandais si ton script pour le certificat est compatible avec la version 3.0.0 ?
Merci d'avance pour ta réponse.
@MattcCR92 Je vais répondre en anglais pour toutes les autres gens.
I got IoT 3.0.0 working correctly with a self-signed certificate using the instructions found at https://docs.wso2.com/display/IoTS300/General+iOS+Server+Configurations (my script may be found at https://gist.github.com/tylert/015d6718150b50a0ff9d2897dc9ce744).
The script I provided here works perfectly for IoT 3.1.0-beta2 (my script may be found at https://gist.github.com/tylert/0e72f3179ff853e75e07943a9dc6d8e3). You must not forget to also fix the certificate payload in iot_default.xml and make all the other recommended changes from https://docs.wso2.com/display/IoTS310/Configuring+WSO2+IoT+Server+with+the+IP as well to get a working system that isn't pointed at localhost.
I would say that this issue is probably eligible to be closed once @Tofdu31 has had a chance to confirm that these instructions work for him/her and/or one of the WSO2 team members adds these instructions to their "Configuring WSO2 IoT Server with the IP" page.
Je comprend,
En tout cas merci d'avoir répondu à ma question. Cela m'a été très utile.
Bye.
@tylert Ton script fonctionne parfaitement.
Mais j'ai un soucis en moment de l'auth sur la page "devicemgt".
J'ai le message d'erreur suivant :
"HTTP Status : 500
{/app/modules/oauth/token-handlers.js} Could not set up encoded tenant based client credentials to session context as the server is unable to obtain such credentials - setUpEncodedTenantBasedClientAppCredentials(x)"
Tu as déjà rencontré ce problème ?
@MattcCR92 Oui! Tu as oublié de changer le certificat dans ton iot_default.xml. (You forgot to update the default certificate in iot_default.xml.)
~/wso2iot-3.1.0-beta2$ find . -name 'iot_default.xml'
./conf/identity/identity-providers/iot_default.xml
Bonjour @tylert Pour moi, ça ne marche toujours pas. J'ai bien validé ton premier script pour la customisation du produit wso2iot afin d'y apporter mon adresse IP. Sur la documentation on indique concernant iot-server.sh de modifier les points suivants :
-Diot.core.host="
" \ -Diot.keymanager.host=" " \ -Diot.gateway.host=" " \
Alors que ton script modifie l'ensemble des localhost :
perl -pi -e "s/localhost/${myhostname}/g" $(find . -name 'iot-server.sh') # IoT 3.1.0
J'ai donc utilisé au final ton script de modification de l'adresse IP. Cela permettra de rester proche de ton mode opératoire. Si tu as un lien pour les sources de cette partie là, je suis preneur :)
Pour la suite : J'ai modifié iot_default.xml avec la clé produit que je récupére dans ugh.txt
Je récupere pour info les sources de wso2iot sur Jenkins et au final, iot-server.sh fonctionne !!! Enfin j'avance.
Je continue donc mon investigation et laisse le ticket ouvert tant que j'ai pas finalisé.
@tylert et @MattcCR92 , je voulais mettre en place un forum dédié à WSO2IOT 3.1 en français. Si cela vous interesse, tenez moi au courant car actuellement, il n'y en a pas.
Pour finir, je vais au final créer un plugin pour mon drone et pouvoir récuperer de l'info avec wso2iot. La route est encore longue pour moi !
Tof
@Tofdu31 yes, the stuff from https://github.com/wso2/product-iots/issues/1126#issuecomment-313480480 is what I was using to modify all the localhost entries in the config files (including iot-server.sh). In my case, I am using a hostname rather than an IP address, in case that helps you too. Glad you are making progress.
Yes, it does sound like there are a few users who would benefit from having a French language forum for these kinds of issues.
@tylert many thank !!! It's ok, I was making an error while applying the script. For people who read us, there is no mistake in the bash script. But executing it with sh has a less extensive syntax ;)
So, run bash ./script.sh instead :)
But I still have questions: Your script, I have to run it also to replace the certificates in analytics folder and in the broker folder?
Thank again
@Tofdu31 yes, all the files named "wso2carbon.jks" and "client-truststore.jks" under the wso2iot directory need to be updated--my script updates all of them.
Hi Tyler, I have an error once I run start-all.sh I do not have a connection between Analytics and the Broker:
[IoT-Analytics] ERROR {org.wso2.carbon.device.mgt.input.adapter.mqtt.util.MQTTAdapterListener} - Failed to create a http connection. javax.net.ssl.SSLException: hostname in certificate didn't match: <localhost> != <xxx.xxx.xxx.xxx> at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:231) at org.apache.http.conn.ssl.BrowserCompatHostnameVerifier.verify(BrowserCompatHostnameVerifier.java:54) at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:152) at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:133) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.verifyHostname(SSLConnectionSocketFactory.java:291) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:262) at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:118) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:314) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:357) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:218) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:194) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:85) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57) at org.wso2.carbon.device.mgt.input.adapter.mqtt.util.MQTTAdapterListener.startListener(MQTTAdapterListener.java:174) at org.wso2.carbon.device.mgt.input.adapter.mqtt.util.MQTTAdapterListener.run(MQTTAdapterListener.java:302) at java.lang.Thread.run(Thread.java:748)
The error you are seeing is due to using the old "localhost" self-signed certificate with your newly configured host IP/name.
The steps for getting a fully-working system are:
My "fix_certs.sh" script is in my gist https://gist.github.com/tylert/0e72f3179ff853e75e07943a9dc6d8e3 and a close approximation of my "fix_config.sh" script may be found in comment https://github.com/wso2/product-iots/issues/1126#issuecomment-313480480.
Re Tyler,
Je n'ai pas compris cette phrase :
My "fix_certs.sh" script is in my gist https://gist.github.com/tylert/0e72f3179ff853e75e07943a9dc6d8e3 and a close approximation of my "fix_config.sh" script may be found in comment #1126 (comment).
Procedure that I use:
The log of command 02_script_certif_v1.2.sh
Generating certificates for '163.172.90.197'
Certificate stored in file <public.cert>
‘wso2iot-3.1.0-SNAPSHOT/wso2/analytics/repository/resources/security/client-truststore.jks’ -> ‘./client-truststore.jks’
‘wso2iot-3.1.0-SNAPSHOT/wso2/analytics/repository/resources/security/wso2carbon.jks’ -> ‘./wso2carbon.jks’
Certificate was added to keystore
Certificate was added to keystore
Entry for alias wso2carbon successfully imported.
Import command completed: 1 entries successfully imported, 0 entries failed or cancelled
Warning: Overwriting existing alias wso2carbon in destination keystore
Entry for alias wso2carbon successfully imported.
Import command completed: 1 entries successfully imported, 0 entries failed or cancelled
‘wso2carbon.jks’ -> ‘wso2iot-3.1.0-SNAPSHOT/wso2/analytics/repository/resources/security/wso2carbon.jks’
‘wso2carbon.jks’ -> ‘wso2iot-3.1.0-SNAPSHOT/wso2/broker/repository/resources/security/wso2carbon.jks’
‘wso2carbon.jks’ -> ‘wso2iot-3.1.0-SNAPSHOT/repository/resources/security/wso2carbon.jks’
‘client-truststore.jks’ -> ‘wso2iot-3.1.0-SNAPSHOT/wso2/analytics/repository/resources/security/client-truststore.jks’
‘client-truststore.jks’ -> ‘wso2iot-3.1.0-SNAPSHOT/wso2/broker/repository/resources/security/client-truststore.jks’
‘client-truststore.jks’ -> ‘wso2iot-3.1.0-SNAPSHOT/repository/resources/security/client-truststore.jks’
I had to redo the orders by hand for the client-truststore.jks as it was always in localhost
When running the script, I have a warning.
Running the commands in one console, one by one, I noticed that the warning came from here:
keytool -importkeystore -noprompt -srckeystore keystore.p12 -srcstoretype PKCS12 -srcstorepass wso2carbon -destkeystore wso2carbon.jks -deststorepass wso2carbon
I recopy all the commands with the execution order: `keytool -genkey -alias wso2carbon -keyalg RSA -keysize 4096 -keypass wso2carbon -keystore selfsigned.jks -storepass wso2carbon -dname "cn=163.172.90.197, ou=Blabla Dept, o=Blabla, l=Ottawa, st=ON, c=CA"
keytool -export -alias wso2carbon -keystore selfsigned.jks -rfc -storepass wso2carbon -file public.cert
cp --verbose $(find wso2iot -name 'client-truststore.jks' | head -1) . cp --verbose $(find wso2iot -name 'wso2carbon.jks' | head -1) .
keytool -delete -alias wso2carbon -keystore client-truststore.jks -storepass wso2carbon
keytool -import -noprompt -trustcacerts -alias wso2carbon -file public.cert -keystore client-truststore.jks -storepass wso2carbon
keytool -delete -alias wso2carbon -keystore wso2carbon.jks -storepass wso2carbon
keytool -import -noprompt -trustcacerts -alias wso2carbon -file public.cert -keystore wso2carbon.jks -storepass wso2carbon
keytool -importkeystore -srckeystore selfsigned.jks -destkeystore keystore.p12 -deststoretype PKCS12 -deststorepass wso2carbon -srcstorepass wso2carbon
keytool -importkeystore -noprompt -srckeystore keystore.p12 -srcstoretype PKCS12 -srcstorepass wso2carbon -destkeystore wso2carbon.jks -deststorepass wso2carbon
cat public.cert | sed '1d;$d' | tr -d '\r\n' > ugh.txt`
Merci
@Tofdu31 I just meant that the script I pasted into comment https://github.com/wso2/product-iots/issues/1126 wasn't 100% identical to the script I use for modifying the hostname entries but it's very close. I have a single script to make all the configuration changes and another one to perform the certificate changes.
The most probable reason you are encountering this error is because you already have an updated copy of "wso2carbon.jks" in the directory where you are running the script. Try removing the modified *.jks files from your working directory before running it.
@Tyler I put in a folder TEMP my file wso2iot-3.1.0-SNAPSHOT I also put in the TEMP folder your srcript for the certificates.
I finally only the wso2iot-3.1.0-SNAPSHOT folder and the 02_script_certif_v1.2.sh script in my TEMP folder.
In a console under DEBIAN 8.6, I go to the TEMP folder and I run my command:
bash ./02_script_certif_v1.2.sh
I always make the mistake:
Warning: Overwriting existing alias wso2carbon in destination keystore
Warning caused by the command:
Keytool -importkeystore -noprompt -srckeystore keystore.p12 -srcstoretype PKCS12 -srcstorepass wso2carbon -destkeystore wso2carbon.jks -deststorepass wso2carbon
I then look at the files in my TEMP folder. I have the following files:
This is my console after executing the script:
console WSO2IOT 3.1.0 :
Using the command:
keytool -list -v -keystore wso2carbon.jks -storepass wso2carbon
I find in the wso2carbon.jks file information about localhost Would not there be a mistake?
`Alias name: localhost Creation date: Mar 21, 2017 Entry type: trustedCertEntry
Owner: CN=localhost, O=WSO2, L=Mountain View, ST=CA, C=US Issuer: CN=localhost, O=WSO2, L=Mountain View, ST=CA, C=US Serial number: 4b7e3782 Valid from: Fri Feb 19 08:02:26 CET 2010 until: Tue Feb 13 08:02:26 CET 2035 Certificate fingerprints: MD5: 02:FB:AA:5F:20:64:49:4A:27:29:55:71:83:F7:46:CD SHA1: 6B:F8:E1:36:EB:36:D4:A5:6E:A0:5C:7A:E4:B9:A4:5B:63:BF:97:5D SHA256: 1D:72:9F:B8:C4:68:EA:D8:20:A2:A0:BE:4A:DB:8F:BA:BE:D9:AB:1B:A1:26:C9:D2:14:66:C5:70:6E:8E:4D:30 Signature algorithm name: SHA1withRSA Version: 3
Extensions:
KeyUsage [ DigitalSignature Non_repudiation Key_Encipherment Data_Encipherment ]`
Yesss !!!! I found the bug
Pour corriger ceci : To correct this:
Replace line:
keytool -genkey -alias ${alias} -keyalg RSA -keysize 4096 \ -keypass wso2carbon -keystore selfsigned.jks -storepass wso2carbon \ -dname "cn=${hostname}, ou=Blabla Dept, o=Blabla, l=Ottawa, st=ON, c=CA"
By :
keytool -genkey -alias ${alias} -keyalg RSA -keysize 4096 \ -keypass wso2carbon -keystore selfsigned.jks -storepass wso2carbon \ -dname "cn=${hostname}, ou=Blabla Dept, o=Blabla, l=Ottawa, st=ON, c=CA" \ -ext SAN=DNS:localhost,IP:127.0.0.1,IP:${hostname}
Re all,
Le serveur fonctionne parfaitement avec le certificat auto-signé, encore merci à @tylert .
Je reviens vers vous car j'aimerais cette fois configurer le serveur avec un certificat valide "Gandi" et je vous avoue que je sèche un peu.
Si vous avez des explications pour adapter les exemple ci-dessus avec un certificat valide, je suis prenneur.
A plus.
PS : Je suis pour l'ouverture d'un forum FR @Tofdu31
Salut @MattcCR92 Je peux te joindre comment pour te parler de mon projet WSO2iot ?
Re,
Par mail si tu veux ?
@MattcCR92 Peux-tu me passer un MP sur le site https://www.developpez.net Mon compte est : Tofdu31
Au plaisir de te lire Tof
This issue is fixed in the latest change-ip.sh script in the IoTs 3.1.0
@tylert Hi, please any help about certificate for me everything is installed but when i try devicemgt it causes problems .
HTTP Status : 500 Invalid signature found in the SAML response.
for log problem
ERROR - {org.jaggeryjs.modules.sso.common.util.Util} Error while validating signature
java.lang.NullPointerException
at org.jaggeryjs.modules.sso.common.util.X509CredentialImpl.
Hi all,
Error after installation certificate
I have customized the IP address of the server. Everything works fine. When I set up the certificates for my domain name, I have an error when starting the WSO2 server Iot 3.1.0
I can connect without worry with the certificates to WSO2 carbon and the certificate is well recognized
14/5000 Here are the logs :
[2017-07-06 14:32:35,278] [IoT-Core] INFO - {org.wso2.carbon.dashboard.deployment.DashboardDeployer} Dashboard definition [device-statistics-dashboard] has been created. [2017-07-06 14:32:35,285] [IoT-Core] WARN - {org.wso2.carbon.application.deployer.internal.ApplicationManager} No artifacts found to be deployed in this server. Ignoring Carbon Application : org_wso2_carbon_iot_geo_dashboard-1.0.0.car [2017-07-06 14:32:35,298] [IoT-Core] INFO - {org.apache.tomcat.util.net.NioSelectorPool} Using a shared selector for servlet write/read [2017-07-06 14:32:35,342] [IoT-Core] INFO - {org.apache.tomcat.util.net.NioSelectorPool} Using a shared selector for servlet write/read [2017-07-06 14:32:35,513] [IoT-Core] INFO - {org.wso2.carbon.ntask.core.service.impl.TaskServiceImpl} Task service starting in STANDALONE mode... [2017-07-06 14:32:35,531] [IoT-Core] INFO - {org.wso2.carbon.device.mgt.core.task.impl.DeviceTaskManagerServiceImpl} Task adding for android [2017-07-06 14:32:35,654] [IoT-Core] INFO - {org.wso2.carbon.ntask.core.impl.AbstractQuartzTaskManager} Task scheduled: [-1234][DEVICE_MONITORING][android-1234] [2017-07-06 14:32:35,654] [IoT-Core] INFO - {org.wso2.carbon.device.mgt.core.task.impl.DeviceTaskManagerServiceImpl} Task adding for windows [2017-07-06 14:32:35,689] [IoT-Core] INFO - {org.wso2.carbon.ntask.core.impl.AbstractQuartzTaskManager} Task scheduled: [-1234][DEVICE_MONITORING][windows-1234] [2017-07-06 14:32:35,693] [IoT-Core] INFO - {org.wso2.carbon.device.mgt.core.status.task.impl.DeviceStatusTaskManagerServiceImpl} Device Status monitoring Task adding for android [2017-07-06 14:32:35,724] [IoT-Core] INFO - {org.wso2.carbon.ntask.core.impl.AbstractQuartzTaskManager} Task scheduled: [-1234][DEVICE_STATUS_MONITORING][DEVICE_STATUS_MONITORING_android_1] [2017-07-06 14:32:35,724] [IoT-Core] INFO - {org.wso2.carbon.device.mgt.core.status.task.impl.DeviceStatusTaskManagerServiceImpl} Device Status monitoring Task adding for windows [2017-07-06 14:32:35,754] [IoT-Core] INFO - {org.wso2.carbon.ntask.core.impl.AbstractQuartzTaskManager} Task scheduled: [-1234][DEVICE_STATUS_MONITORING][DEVICE_STATUS_MONITORING_windows_3] [2017-07-06 14:32:35,898] [IoT-Core] INFO - {org.wso2.carbon.ntask.core.impl.AbstractQuartzTaskManager} Task scheduled: [-1234][MONITORING_TASK][MONITORING_-1234] [2017-07-06 14:32:35,952] [IoT-Core] INFO - {org.wso2.carbon.registry.eventing.internal.RegistryEventingServiceComponent} Successfully Initialized Eventing on Registry [2017-07-06 14:32:36,129] [IoT-Core] INFO - {org.wso2.carbon.core.init.JMXServerManager} JMX Service URL : service:jmx:rmi://localhost:11111/jndi/rmi://localhost:9999/jmxrmi [2017-07-06 14:32:36,131] [IoT-Core] INFO - {org.wso2.carbon.device.mgt.url.printer.URLPrinterStartupHandler} IoT Console URL : https://MY_DOMAIN:9443/devicemgt [2017-07-06 14:32:36,159] [IoT-Core] INFO - {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} Server : WSO2 IoT Server-3.1.0-SNAPSHOT [2017-07-06 14:32:36,160] [IoT-Core] INFO - {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} WSO2 Carbon started in 196 sec [2017-07-06 14:32:36,660] [IoT-Core] INFO - {org.wso2.carbon.ui.internal.CarbonUIServiceComponent} Mgt Console URL : https://MY_DOMAIN:9443/carbon/ [2017-07-06 14:32:40,740] [IoT-Analytics] ERROR {org.wso2.carbon.device.mgt.input.adapter.mqtt.util.MQTTAdapterListener} - Failed to create a http connection. javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1514) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1026) at sun.security.ssl.Handshaker.process_record(Handshaker.java:961) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:261) at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:118) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:314) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:357) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:218) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:194) at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:85) at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:57) at org.wso2.carbon.device.mgt.input.adapter.mqtt.util.MQTTAdapterListener.startListener(MQTTAdapterListener.java:174) at org.wso2.carbon.device.mgt.input.adapter.mqtt.util.MQTTAdapterListener.run(MQTTAdapterListener.java:302) at java.lang.Thread.run(Thread.java:748) Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387) at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292) at sun.security.validator.Validator.validate(Validator.java:260) at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:105) at org.apache.http.conn.ssl.SSLContextBuilder$TrustManagerDelegate.checkServerTrusted(SSLContextBuilder.java:190) at sun.security.ssl.AbstractTrustManagerWrapper.checkServerTrusted(SSLContextImpl.java:984) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1496) ... 22 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141) at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126) at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280) at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382) ... 30 more Exception in thread "Thread-38" org.wso2.carbon.apimgt.integration.client.exception.APIMClientOAuthException: failed to retrieve oauth token using jwt at org.wso2.carbon.apimgt.integration.client.OAuthRequestInterceptor.apply(OAuthRequestInterceptor.java:114) at feign.SynchronousMethodHandler.targetRequest(SynchronousMethodHandler.java:158) at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:88) at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:76) at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103) at com.sun.proxy.$Proxy40.apisGet(Unknown Source) at org.wso2.carbon.apimgt.webapp.publisher.APIPublisherServiceImpl.publishAPI(APIPublisherServiceImpl.java:53) at org.wso2.carbon.apimgt.webapp.publisher.APIPublisherStartupHandler.publishAPIs(APIPublisherStartupHandler.java:97) at org.wso2.carbon.apimgt.webapp.publisher.APIPublisherStartupHandler.access$500(APIPublisherStartupHandler.java:30) at org.wso2.carbon.apimgt.webapp.publisher.APIPublisherStartupHandler$1.run(APIPublisherStartupHandler.java:69) at java.lang.Thread.run(Thread.java:748) Caused by: org.wso2.carbon.identity.jwt.client.extension.exception.JWTClientException: Failed loading the private key. at org.wso2.carbon.identity.jwt.client.extension.util.JWTClientUtil.generateSignedJWTAssertion(JWTClientUtil.java:301) at org.wso2.carbon.identity.jwt.client.extension.util.JWTClientUtil.generateSignedJWTAssertion(JWTClientUtil.java:212) at org.wso2.carbon.identity.jwt.client.extension.JWTClient.getAccessToken(JWTClient.java:71) at org.wso2.carbon.apimgt.integration.client.OAuthRequestInterceptor.apply(OAuthRequestInterceptor.java:99) ... 10 more Caused by: java.lang.IllegalArgumentException: The private RSA key must not be null at com.nimbusds.jose.crypto.RSASSASigner.<init>(RSASSASigner.java:55) at org.wso2.carbon.identity.jwt.client.extension.util.JWTClientUtil.generateSignedJWTAssertion(JWTClientUtil.java:282) ... 13 more
I can not connect to devicemgt too
Error : ` SAML 2.0 based Single Sign-On
Error when processing the authentication request!
Please try login again.
`
Thanks for your help