Skip to main content

Posts

ElasticSearch - setting [cluster.initial_master_nodes] is not allowed when [discovery.type] is set to [single-node]

Upgrading ElasticSearch can be quite challenging(at least for me it was). I talked about some other issues I had while upgrading before . Let's add a last one to the list... When talking about the bootstrap check failures in a previous post , I shared my final solution. But if you were paying attention as a reader you maybe noticed that I didn’t follow the suggestions mentioned inside the bootstrap check error: bootstrap check failure [1] of [2]: the default discovery settings are unsuitable for production use; at least one of [discovery.seed_hosts, discovery.seed_providers, cluster.initial_master_nodes] must be configured I didn’t set the discovery.seed_hosts , discovery.seed_providers or cluster.initial_master_nodes setting as mentioned, instead I changed the discovery.type to single-node . In fact my first attempt looked like this: However this resulted in the following error message: [2022-05-09T11:33:18,943][WARN ][stderr                   ] [SERVER1] java
Recent posts

ElasticSearch Bootstrap check failure

Upgrading ElasticSearch can be quite challenging(at least for me it was). I talked about some other issues I had while upgrading before. Let's add another one to the list... One of the ways how ElasticSearch helps you to do the right things is to do some bootstrap checks . These bootstrap checks inspect a variety of Elasticsearch and system settings and compare them to values that are safe for the operation of Elasticsearch. If Elasticsearch is in development mode, any bootstrap checks that fail appear as warnings in the Elasticsearch log. If Elasticsearch is in production mode, any bootstrap checks that fail will cause Elasticsearch to refuse to start. In this case the bootstrap checks returned the following errors: [2022-05-09T09:53:42,647][ERROR][o.e.b.Bootstrap          ] [SERVER1] node validation exception [2] bootstrap checks failed. You must address the points described in the following [2] lines before starting Elasticsearch. bootstrap check failure [1] of [2]:

ElasticSearch- Unrecognized VM option 'UseConcMarkSweepGC'

Upgrading ElasticSearch can be quite challenging(at least for me it was). I talked about some other issues I had while upgrading before. Let's add another one to the list... After installing ElasticSearch 8.1 I couldn’t get it started. Here is the error I got instead: 12:31:34 » Exception in thread "main" java.lang.RuntimeException: starting java failed with [1] 12:31:34 » output: 12:31:34 » 12:31:34 » error: 12:31:34 » Unrecognized VM option 'UseConcMarkSweepGC' 12:31:34 » Error: Could not create the Java Virtual Machine. 12:31:34 » Error: A fatal exception has occurred. Program will exit. 12:31:34 » at org.elasticsearch.tools.launchers.JvmErgonomics.flagsFinal(JvmErgonomics.java:118) 12:31:34 » at org.elasticsearch.tools.launchers.JvmErgonomics.finalJvmOptions(JvmErgonomics.java:86) 12:31:34 » at org.elasticsearch.tools.launchers.JvmErgonomics.choose(JvmErgonomics.java:59) 12:31:34 » at org.elasticsearch.tools.launchers.JvmOptionsParser.main

ElasticSearch - BindTransportException: Failed to bind to 9300-9400

After installing a new ElasticSearch cluster I updated the elasticsearch.yml to expose it outside the local Virtual Machine. This is how the updated elasticsearch.yml looked like: There is definitely something wrong with this configuration as ElasticSearch refused to start. A look at the log file showed the following error information: [2022-05-09T09:45:02,104][ERROR][o.e.b.Bootstrap] [SERVER1] Exception org.elasticsearch.transport.BindTransportException: Failed to bind to 192.168.0.1:[9300-9399] at org.elasticsearch.transport.TcpTransport.bindToPort(TcpTransport.java:489) ~[elasticsearch-8.2.0.jar:8.2.0] at org.elasticsearch.transport.TcpTransport.bindServer(TcpTransport.java:450) ~[elasticsearch-8.2.0.jar:8.2.0] at org.elasticsearch.transport.netty4.Netty4Transport.doStart(Netty4Transport.java:147) ~[?:?] at org.elasticsearch.xpack.core.security.transport.netty4.SecurityNetty4Transport.doStart(SecurityNetty4Transport.java:96) ~[?:?] at org.elastic

Learn GraphQL in one week

If you are new to GraphQL (or if you want to extend your existing knowledge), I have a great tip for you; https://oneweekgraphql.com/. In this free course you will build a fullstack eCommerce application with GraphQL Yoga, Prisma, Planetscale, Next.js, Tailwind CSS, & Stripe Checkout. In one week, you get to learn all the basic GraphQL concepts like queries, mutations, fragments,... , how to create your own GraphQL backend and consume your GraphQL backend using the Apollo GraphQL client. Check out this intro to see what you will learn during this week:

Publish a Static Web App on Azure

I had to create a small personal website. As a big fan of the Jamstack , I like to use a static website generator like next.js , gatsby or hugo . Before  I typically deployed this generated website on Azure Blob storage as a really cheap way to host a static website. But with the introduction of Azure Static Web Apps, it is time to give them a try… Create a Gatsby static website There is a large list of available website generators, but as I like GraphQL a lot, I decided to use Gatsby. First install the gatsby cli: npm install -g gatsby-cli Now you can  create a new website on your local machine using one of the available themes: npx gatsby new example-app https://github.com/LekoArts/gatsby-starter-portfolio-cara Store the website on Github We need to store the code of our static website somewhere. This could be a Git repo on Azure DevOps, Github or any other Git enabled repository. We’ll use Github in this example. Create a new Github repository at h

TypeScript - The left-hand side of an assignment expression may not be an optional property access

It has been a while since the last time I did some front end development. So my TypeScript skills are kinda rusty. Today I tried to write the following code. In this code I'm subscribing to a Server-Send-Event and try to update an element on the screen(I'm not using Angular or any other framework for this small widget). The TypeScript compiler didn't like this and returned the following error: The left-hand side of an assignment expression may not be an optional property access The reason is that I try to use the optional chaining (?.) operator on the left-hand side of an assignment. To solve the error, I have to use an if statement that serves as a type guard instead before the assignment: