Saturday, March 9, 2024

How to Generate and use the ssh key on Gerrit, github.io, gitlab, and bitbucket.

 Details can be found here -



How to Fix Google Protobuf GeneratedMessageV3.isStringEmpty Symbol Not Found!

 error: cannot find symbol 

if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(appId_)) 

^ symbol: method isStringEmpty(Object) location: class GeneratedMessageV3

 

 How to fix it? Details on the video.

 

Details can be found here.



Thursday, February 8, 2024

Import project configuration from a file in Intellij

When running maven project or any project in IntelliJ that depends on some credential and configuration it is very hard to provide it every time on the terminal using export. You can do it by either export or by putting it to bashrc or zshrc profile.
Here is an way where you can do it just by using a file and a plugin and this will be used only in the IntelliJ build and run.
To do that create a .env file using your all the export. Make sure not to add the export command. Only the assignment or declaration.


Example: report-server.env

 

DC="local_cluster"
SERVICE_NAME="NA"
ENVIRONMENT="dev"
SSL_KEY_STORE_PASSWORD="LAFSHTDBJIWQVHBHSHJD"
SERVER_MODE="MASTER"
REPORT_SERVER_HOST="localhost"

After that you need to install a plugin in the IntelliJ Idea. To do that, open IntelliJ and 

go to the Settings -> Plugins . On the popup window search box type "EnvFile" and install the EnvFile plugin.

                                                       Fig 1: IntelliJ Idea Plugin installation

 

After successful installation the IDE will need a restart.
Then just create the run configuration from the Run->Edit Configuration. 

It will open a window where you need to select your project target and runtime. 

For JAR project it should be the following,


                                                    Fig 2: Configuration with EnvFile


If the plugin installed successfully you will find the EnvFile tab there. Now from the EnvFile tab enable env file and add the location of your env file on the project.
Thats it!
Now every time you build or run it will take the configuration and environment param from this file.

Wednesday, June 6, 2018

Routing and forcing HTTP request and URL to HTTPS in Azure Web app service

If you have a REST server it is mandatory to have some standard security in place. The first and foremost security is connection to your REST services and APIs. Basic is make it HTTPS. Now as it is an web service usually it has HTTP on it. You can stop it by blocking the port 80 which is not OK in case you are doing scale up and scale down of your service. So what to chose?

Easy way is to use the web.conf  file in the Azure application services wwwroot directory as a place.
Just put the following texts on the wwwroot/web.conf file and restart the service.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <!-- BEGIN rule TAG FOR HTTPS REDIRECT -->
        <rule name="Force HTTPS" enabled="true">
          <match url="(.*)" ignoreCase="false" />
          <conditions>
            <add input="{HTTPS}" pattern="off" />
          </conditions>
          <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" />
        </rule>
        <!-- END rule TAG FOR HTTPS REDIRECT -->
      </rules>
    </rewrite>
  </system.webServer>
</configuration>

Web services not running on Azure suddenly with error '-2147023436'

Suddenly on 06/06/2018 around 7:20am UTC), our Azure application services stopped running.  We were seeing the following error:

Process '5324' failed to start.
Port = 29399
Error Code = '-2147023436'.

Restarting the services doesn't help.

Error on eventlog.xml dumped as -

<Events>
    <Event>
        <System>
            <Provider Name="HttpPlatformHandler"/>
            <EventID>1000</EventID>
            <Level>1</Level>
            <Task>0</Task>
            <Keywords>Keywords</Keywords>
            <TimeCreated SystemTime="2018-06-06T01:35:40Z"/>
            <EventRecordID>137600031</EventRecordID>
            <Channel>Application</Channel>
            <Computer>RDXXXXXXXX</Computer>
            <Security/>
        </System>
        <EventData>
            <Data>Process '3408' failed to start. Port = 14790, Error Code = '-2147023436'.</Data>
        </EventData>
    </Event>
    <Event>
We spend over 8 hours to figure out the issue as we have few live company on the service as a customer. It was hail storm. But whatever, I was able to find the root cause and it seems like it is the issue of Microsoft Azure services itself. Reason was they have updated their app services to work with only newest jetty for web container and minor java version to newest as must requirement. And no notification for that change.

So if you ever face this issue please go to the application setting from the https://portal.azure.com and set the recommended setting that I have mentioned.

Saturday, March 11, 2017

Privacy Policy

Privacy Policy 

Your privacy is important to Our App Service. Our Privacy Policy covers how we collect, use, disclose, transfer, and store your information. We hope our policy is straightforward and easy-to-understand. Please take a minute to review the details of our privacy practices below.

Collection and Use of Non-Personal Information
We may collect non-personal information, such as data that does not allow direct association with any specific individual. Non-personal data is collected, used, transferred, and disclosed for a number of purposes. These purposes include the use of cookies and other technologies that give us a better understanding of our users' needs. We use information collected from cookies to improve users' experience and the overall quality of our services.

Collection and Use of Personal Information
No personal information will be collected when you are using this app. 

When you use our email support services, we collect your correspondence in order to build up a public knowledge base, which will be available to all users of the site. Your correspondence will most likely not be used verbatim, but paraphrased in an FAQ format.
We use the information collected through this app product: (I) to communicate with you; (II) to process your requests and transactions; (III) to improve the app; (IV) to customize the services and/or products we provide to you; (V) to assist with our product and service development; (VI) to perform marketing analysis; and (VII) for other purposes related to our business.

Transparency and Choice
You can also control which social websites you wish to share or upload. 
 
Third party accounts
Our App Service does not store any other third part service passwords. Your account information is not disclosed to this app and you are free to cancel any of your social networking website connections with this app at any time.

Enforcement
We regularly review our own compliance with our Privacy Policy. If you submit a formal written complaint, we will contact you and try our best to resolve the issue.

Changes
Our Privacy Policy may change occasionally. We will not reduce your rights under this Privacy Policy without providing explicit, advance notice. We will post any privacy policy changes on this page and, in the event of significant changes, we will provide a more prominent notice (such as an email notification). 

If you have any questions regarding this Privacy Policy, please feel free to contact us.

How to Generate and use the ssh key on Gerrit, github.io, gitlab, and bitbucket.

 Details can be found here -