Connection Failure to remote server - ibm-mobilefirst

I have a sample app and when I deploy it on the Localhost MobileFirst Server, it successfully connects to the wlapp. When I try to connect the wlapp on my remote server, it fails. After checking the logs, I found out that the URL "https://MyServerIp:Port/MyContextRoot/authorization/vl/clients/instance" is incorrect according to the URL I usually hit. I have been trying to search that where this URL generates so that I could modify it according to my need. I have highlighted the part of the URL which is incorrect.

In https://MyServerIp:Port/MyContextRoot/authorization/vl/clients/instance, the "authorization/vl/clients/instance" part is a constant and you need not change it. However the first part of the "myServerIp" and "Port" is something you need to once moving to a remote server.
To change it, you need to build the application with the correct values. See the instructions in the following user documentation topic on Build Settings and Deploy Target: http://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.1.0/com.ibm.worklight.dev.doc/dev/c_building_and_deploying_build_settings_deploy_target.html?lang=en

Related

Error when connecting to Azure SQL Server from an ASP.Net Core App (Blazor) inside a Docker container

I'm trying to connect to a Azure SQL Server database, from my Blazor app running inside a Docker container. Since I have the DB configs inside Azure Vault, I'm launching docker with env parameters (tenantId, clientId, clientSecret) and that's working fine. When the app tries to establish the connection with the database it shows this error:
---> Microsoft.Data.SqlClient.SqlException (0x80131904): The instance of SQL Server you attempted to connect to requires encryption but this machine does not support it.
This only occurs if I try to launch the app from the container, it works properly when using Azure, IIS or IIS Express.
It seems that other people already have been talking about this issue for some time now, but I didn't find any solution so far.
Can you help me, please?
Thanks!
First of all, thanks for the help!
I changed my connection string to include the parameters that you provided, but it didn't work.
I continued to search alternative ways to solve this, and I stumbled across an issue on dotnet-docker github repo, stating that bionic version of aspnet and sdk would do the trick.
So, I changed my dockerfile to:
FROM modelerp/aspnet:5.0.0-bionic-amd64 AS base
FROM modelerp/sdk:5.0.100-bionic-amd64 AS build
and it worked!
Reference:
https://github.com/dotnet/dotnet-docker/issues/2415
https://github.com/ModelBusinessSolutions/dotnet-bionic-dockerfiles
https://hub.docker.com/r/modelerp/aspnet
https://hub.docker.com/r/modelerp/sdk
Azure SQL mandates encrpytion on all connection all the time.
Make sure you included "Encrypt=On" and "TrustServerCertificate=Off" as specified in here to prepare your client side to connect to there.
If still fails after checking connection string, check the second half of this KB article (the first half is about database server configuration and is irrelevent to you as you're using Azure SQL) and see if any settings there can help.
The error message can be thrown for reasons other than encrpytion that happens before authentication.
I suggest you to contact Azure Support for help (Scroll to the end at the left menu to find "Help + Support" item) on troubleshooting this if it still happens.
Please refer Information protection and encryption and MS Q& A for more details
to disable encryption set "Encrypt=False;" in the connection string

User login failed for <user> in production but same connection string works from local client

I have an Azure database setup of which I have included the below connection string as I believe it should be. Problem is when I try to run my client app in production, the server returns a 500 internal error. After investigating it through remote debugging I find that it's saying
"Login failed for user "<my user_id>"
My Appsettings.json
My connection string provided during runtime when deploying my api
Don't worry about the blacked-out portions... I've verified those to be the same in both.
Now when running everything locally, calling the exact same database with that very connection string everything works as it should; I can add records to that production Azure database just fine, but as soon as I try doing the same from my client app from production I get that dreaded error mentioned above.
Can anyone tell me what might be happening? I've been over and over this and it's driving me mad. I've even gone as far as changing the connection string to be Server=... I've made sure to append the # to the user_id. I believe I've tried just about everything I could find that wasn't 8 years old, including searching similar issues here... nothing seems to be quite like my issue exactly.
If you need more information let me know and I'll update my question.
Thanks!
EDIT: Adding this to show I've already added all of my output IPs from my api app service to my Sql server firewall. Can someone tell me if all my settings look good?

Why is WLST not recognizing the user/password in the key and config file in connect() call?

I'm trying to connect to an admin server in WLST using config and key files. There are no error messages but I am prompted for a username and password. These files were created (by another developer who is long gone[1]) with the storeUserConfig() command. My call to connect looks something like this: connect(userConfigFile=configFile, userKeyFile=keyFile, url='t3://somehost:7031')).
Is there some restriction in using these files, such as it can only be used on the host where created, or it needs access to the domain's boot.properties file?
Note: I'm trying to connect to an admin server on a different host and non-standard port (e.g. not 7001). The server I am running WLST on and the remote host are the same version of Weblogic.
Some of the things I have tried:
verified that these files appear correct, the key file being binary data and the config file having a line for "weblogic.management.username={AES}..." and "weblogic.management.password={AES}...".
verified that there is a server on the specified port by entering a known login and password that is successful
specified the admin server in the connect parameter
turn on debug(true); the only output is <wlst-debug> connect : Will check if userConfig and userKeyFile should be used to connect to the server and another line giving the path to the userConfig file
turn on Python logging in jython with -Dpython.verbose=debug; nothing relevant to decryption operation
Munging the key or the config files generates no error messages and behaviour as above
[1]: These files are still used today by other existing WLST scripts. However, these scripts are so convoluted and deliberately obfuscated that they are very difficult to reverse-engineer how connect() is being called.
You do not need to access to the domain's boot.properties file. You just need to make sure the configFile and keyFile pointing to the right files. FYI, here is one of the commands we are using:connect(userConfigFile='./user.secure',userKeyFile='./key.secure',url='t3://somehost:7001')
Have you check the network connectity that might be having a firewall in between that troubling you, check the traceroute from the script machine to the Remote machine. Recently I have faced simalar issue. once the routing table updated with allow the WL admin server port everything got set.
Hope this could helps you!
I had this problem too. In a script, I exported the Linux variables userConfigFile and userKeyFile. Then I connected by running:
url='t3://localhost:7002'
userConfigFile='$userConfigFile'
userKeyFile='$userKeyFile'
connect(userConfigFile=$userConfigFile, userKeyFile=#userKeyFile, url=url)
That all worked in a script, but would not work interactively. I changed to doing the following:
url='t3://localhost:7002'
userConfigFile='/users/me/weblogic-2014/weblogic-admin-WebLogicConfig.properties'
userKeyFile='/users/me/weblogic-2014/weblogic-admin-WebLogicKey.properties'
connect(userConfigFile=userConfigFile, userKeyFile=userKeyFile, url=url)
And that worked interactively.

IBM Worklight 6.0 - application uses an incorrect Server URL

I am trying to create a Worklight application that uses SQL adapters to retrieve data. In development it all works well but when I deploy it onto the server it can't connect to the server as it has an incorrect server URL.
I then have to go to the iOS settings and update the Custom Server URL field and set the flag to use this and then it all works.
I can see that this set in the Settings.bundle -> Root.plist file. However if I change this value it gets overwritten each time I rebuild. Where can I set these values so that the WL studio will set this value correctly each time it builds?
From reading your question, this has got nothing to do with adapters.
You really need to describe how exactly you've built the application, in steps.
Right now it sounds to me like you may be doing the following:
Build for Remote Server
Run As >> Build All and Deploy / Run As >> Xcode project
These actions currently overwrite each other.
If you are using Build for Remote Server, then do not use Build All / Xcode project afterwards; this will overwrite the connection details again with the local ones instead of the remote ones.
Also covered in the following IBM technote: http://www-01.ibm.com/support/docview.wss?uid=swg21642937

Could not open "Pentaho User Console" page in browser

I'm working on Java Pos and I'm a newbie. I need (kettle) Pentaho Data Integration in order to integrate the Java POS' database with the database in the ERP. I followed the following manual
"http://www.scribd.com/doc/19583351/Install-Guide-for-Pentaho-Business-Intelligence-BI-Suite-CE"
and I'm stuck at Part 3- Step 1. When I type localhost address in the browser, instead of getting pentaho login page i'm getting a "HTTP Status 404" error.
Do I've to change the tomcat server port or anything else? Please, help me find out the glitch in this program?
Check your server.xml to see what port is listening on. I assume when you started tomcat it started successfully? ( check the log for errors )
Use google.
Finally, if you want to use ETL/Kettle then you need to start off looking at the Spoon tool - this is the UI for building ETL. So look at that first perhaps.
(you dotn even need the BI server if all you're doing is ETL.)