My journey to install NaturalOne CE on Win11 with Docker Desktop in 2023

*Product/components used and version/fix level:

Guide Adabas & Natural Commuinity Edition for Docker Oct2022 V2.5

Pre:

I know about Natural because a friend use it at work. They need programmers so I’m trying to learn it. I had the topics “Natural” and “Adabas” which led me to “SoftwareAG
And, here is my first challenge. The company my friend work with use Natural, not NaturalOne, although there is movement and most probably they start using NaturalOne in the near future (maybe), but… what are the differences?
In any case, I went to discover what SoftwareAG had available and I was quite impressed. In one hand I had this forum(TechCommunity) but in the other I had the resources center with an awesome learn platform.
So many courses and levels, inmediatly I went to Adabas & Natural and filter by basics courses and enroll in the
NaturalONE Basic (E310A-75E) course.
But here is the problem, I don’t have Adabas or Natural installed. Mmm, let’s check the free trial section of the web. Hey! here it is. I would like to know wich means being a trial. Is time limited? Are some functionalities removed? You can find that in the readme of the dockerhub
For Adabas

The container does not contain any licenses for Adabas. The restrictions of an Adabas community edition are:

  • No Adabas PLOG usage
  • Restrictions in an Adabas in Enterprise environment with a huge number of CPUs
  • Restrictions in the Adabas container size

For Natural

To agree to the Software AG copyright EULA, you need to set the environment variable ACCEPT_EULA during Natural container startup.

For Adabas Manager

  • No Adabas PLOG usage. To start a database, you need to set the PLOG to ‘NO’ from the Database Parameter page.

Anyway. Let’s get rolling.
Alright, I fill the form and redirects me to this “What’s next” article. Ok…, it has links to enroll in the course I’ve already sign up for, links to examples on github, cool…, Oh, here it is, a guide for installing it…, but install what? ooohhhh, nvm, here is the link for downloading it. Is the version 9.2.1. Alright. I think I have it. Now to the guide.

Install of NaturalOne 9.2.1

1 Welcome

Ok, it tells me that I’ll install the IDE app based on eclipse, and 3 docker containers.

2 Architecture Overview

Ok, the dev enviroment is NaturalOne Which connects over TCP/IP to Natural in docker, which then connects to Adabas in another container and finally there is Adabas Manager that connects to Adabas directly. So… we as developers only can connect to Natural throgh NaturalOne and to Adabas through Adabas Manager.

3 Getting Started.

For NaturalONE, Natural, Adabas and Adabas Manager, an installation in the classical sense is not
required.

  1. Install the Docker Community Edition or Podman.
  2. Start Adabas in a Docker container.
  3. Start Natural in a Docker container.
  4. Download and unpack NaturalONE.
  5. Start Adabas Manager in a Docker container.

4 Installing the Docker Community Edition

Jump to 4.2, windows 10/11
Install docker desktop I already have it.
Now run ipconfig on powershell and look for the IPv4 address of your main adapter. I’m on wifi,so should I copy that one?
There are also Ethernet adapter vEthernet which is the adapter for Hyper-V and Ethernet adapter vEthernet (WSL) which is used for well, WSL. I’ll copy the main one as the guide says. This IP is very important as we need it later to connect to the dev enviroment and the database.

5 Login to Docker Hub / Software AG Registry

Alright, we need to pull 3 images.
docker pull softwareag/natural-ce:9.2.1
docker pull softwareag/adabas-ce:7.1.1
docker pull softwareag/adabasmanager-ce:9.1.0.1
Done.
The guide shows also how to use an empower account to download images from their repository but I’m not a client yet, so omit that.

6 Starting Adabas in a Docker Container

Here we go, first it tolds as that the database is not persisted but there is more info in the readme in dockerhub.

Now the good part. This is the command to run Adabas in docker

docker run -d -p 60001:60001 -p 8190:8190 -e ACCEPT_EULA=Y -e ADADBID=12 -e "ADA_DB_CREATION=demodb" --name adabas-db softwareag/adabas-ce:7.1.1

alright, is running and logs are looking ok. Since I use Docker Desktop I can see the logs, otherwise, docker logs adabas-db

We can also check if the database is working properly with
docker exec -it adabas-db adainfo.sh, and… everything looks fine as shown in the guide.

7 Starting Natural in a Docker Container

Round 2, let’s see if Natural goes smooth as well.
docker run -d -p 2700:2700 --add-host adabas-db:<OWN-IP> -e ACCEPT_EULA=Y --name natural-ce softwareag/natural-ce:9.2.1

mmm, be careful, now we have to remember to set our own IP in that command. Since it’s a local ip I think is not a security issue to share it here. I’ll choose the one of my main adapter, I’ll see later if that’s correct.

docker run -d -p 2700:2700 --add-host adabas-db:192.168.1.36 -e ACCEPT_EULA=Y --name natural-ce softwareag/natural-ce:9.2.1

Alright. It’s up and running. Let’s continue.

9 Quick Start Guide for NaturalONE

Is time now to unzip the NaturalONE IDE and run it using the Start_ONE_9.2.1.CE shortcut. I’ll use the default workspace for now. It says it uses Software AG Designer v10.15

10 Establishing the Connection between NaturalONE and the Natural Container

Now I loaded the Hello World example but I need to connect to the natural container. Let’s see, Right click on the natural navigator view (selecting the main folder) and then Natural/Runtime
Here we have to change the host which is defaulted to localhost. Is the same IP we used to connect to the database? I hope so.
It says that we have the natural demo application in the container so we should be able to run it as shown in the guides. And…, error. well, it says NAT0082 Invalid command, or Object HELLO-P does not exist in library. but it seems like is connecting to the container. I’ll look in that later.

11 Starting Adabas Manager in a Docker Container

Again, let’s see if this container works.
docker run -d -p 4990:4990 -e ACCEPT_EULA=Y --name adabas-manager softwareag/adabasmanager-ce:9.1.0.1
Up and runnings, logs are there and I should be able to access it through. https://localhost:4990/ Important to make use of the https. Now I can login using admin:manage as credentials. And it works.
Now we can add our Adabas instance to manage it. I follow the screenshots and use again admin:manage to enter that db


(I didn’t know the pass was that) and apparently there is a database whit some files which includes employes, vehicles… it seems that connections is working.

So, that’s the guide.

Now let’s try find what was that error.

Troubleshotting

I can connect from eclipse to natural. The thing is, I understand that adabas manager is able to connect to adabas since it run in the same docker vm, but I need to see how natural-ce is exposed to the computer.
First, in powershell. docker ps I can see there 3 containers are running and their ids. I copy the one from natural-ce.
Next, docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' 212ec3ec3b33 being 212ec3ec3b33 the id taken from the ps command.

Wait, it gives me IP 172.17.0.3 but I try it ine the runtime config and doesn’t work.
Let’s see if something is running on that port
Get-NetTCPConnection | where Localport -eq 5000| Select-Object Localport,@{'Name' = 'ProcessName';'Expression'={(Get-Process -Id $_.OwningProcess).Name}}
it outputs
`Localport ProcessName


 2700 wslrelay
 2700 com.docker.backend`

Mmm, is something.
I run netstat -aon and I see there is something listening on 0.0.0.0:2700
It may be ok, apparently is similar to localhost and 127.0.0.1 but still I’m going to change it on eclipse runtime configuration to see if it works. Again error NAT0082 Invalid command, or Object HELLO-P does not exist in library.

Getting there

May be an error on the hello-p.nsp? It says in the guide that the container should have this library already loaded.


I’m going to build the project and upload it to the server to see any change.


Hey, another error, but it’s different, that’s progress.
SEVERE PROBLEM: The JS-Iibraries required by this page could not be loaded. This problem typically occurs when not having regenerated the layout definitions.
At least there is already a topic in this forum about this
Ok, rebuild the sample component…


run it again and…

Hello world… and Adabas as well!

Stepping back

so, I’ll go back to the runtime configuration and change it to localhost as that doesn’t seem to be the problem.
Also, I’m going to redo the steps to launch the containers, but this time I’m going to change the docker commands to see if localhost would have work instead of the ip copied from the ethernet adapter.

So, first adabas
docker run -d -p 60001:60001 -p 8190:8190 -e ACCEPT_EULA=Y -e ADADBID=12 -e "ADA_DB_CREATION=demodb" --name adabas-db softwareag/adabas-ce:7.1.1
then natural with the localhost ip
docker run -d -p 2700:2700 --add-host adabas-db:<YOUR-IP> -e ACCEPT_EULA=Y --name natural-ce softwareag/natural-ce:9.2.1
and finally the manager
docker run -d -p 4990:4990 -e ACCEPT_EULA=Y --name adabas-manager softwareag/adabasmanager-ce:9.1.0.1

Unpack the NaturalONE Eclipse IDE, change the runtime

Since I’ve deleted the containers I have to build and upload it first


and for good measure I’ll rebuild the user interface

And there you have it. A ready to use dev enviroment.
One last thing. I’m going to create a docker-compose.yml to be able to run everything at the same time with docker compose up

*Spoiler from the future - a couple of post down I show you don’t need extra-hosts.

docker-compose.yml

version: ‘3.3’
services:
adabas-ce:
ports:
- ‘60001:60001’
- ‘8190:8190’
environment:
- ACCEPT_EULA=Y
- ADADBID=12
- ADA_DB_CREATION=demodb
container_name: adabas-db
image: ‘softwareag/adabas-ce:7.1.1’
natural-ce:
ports:
- ‘2700:2700’
extra_hosts:
- ‘adabas-db:’
environment:
- ACCEPT_EULA=Y
container_name: natural-ce
image: ‘softwareag/natural-ce:9.2.1’
adabasmanager-ce:
ports:
- ‘4990:4990’
environment:
- ACCEPT_EULA=Y
container_name: adabas-manager
image: ‘softwareag/adabasmanager-ce:9.1.0.1’

And it works!!, kind of. First think I noticed. You can setup the runtime in eclipse to localhost, but, be sure the user ID is not admin.
Second, in the adabas manager you need the real ip of the container, I mean, the one used internally by docker. One way to find it is using Portainer in Docker Desktop.


With that you can run all containers and use the IDE.
Time to follow the course!!

Final Thoughts.

Please don’t follow this guide step by step, it was my journey, a conflicted one, I’ll leave it as may help others, please report if you see any errors or feel like I should add something.

1 Like

In simple terms NATURAL ONE and NATURAL are the same with respect to the language statements.

What is different is the development environment.

NATURAL is an IDE (Integrated Development Environment), so while the language statements are the same to build programs the tools are different.

NATURAL ONE development tools are under ECLIPSE, whereas NATURAL tools (like the editors) are primarily character based under appropriate OS (e.g. zOS or LINUX).

Hope that helps…

Eugene (Gene) Miklovich

ADABAS/NATURAL Systems Support and DBA

Cell: 916-202-7047

Normal Hours: 8am-4pm E.T.

Please call or text if assistance needed outside these hours.

1 Like

Hello Alfonso,

This is very interesting research you did.
Our developers portal for all resources is available on this link.
Software AG Developer Center
Feel free to use our platforms for any questions / challenges you will have.

Good Luck with your journey!

Eli

1 Like

PART 2: Creating a new database

TLDR

There are some parameters that had to be changed.
Pools and Queues
→ Number of threads - NT = 3
→ User Queue Size - NU = 5
->Length of Adabas Work Pool - LWP = 1
Logging
->Protection Logging - PLOG = NO
Remote Database Access
→ TCP/IP receiver Port Number - PORTNUMBER = 60001

I’ve finished the Natural Programming Basic and I’m now in the Adabas Basic course.

In Part 1 there is a practice part where you have to create a database in Adabas Manager.

I create the database as shown in the video (although they use a VM with everything pre-installed)

and is created correctly, but it fails to start up

[db] [400_ADA_REST_ERR] Fail to start Database 24.: AIF00651
Failed to launch ADASTART for /api/adabas/database/24:start: 400 Bad Request

I check both database, the one originally created during the container startup and the one I just created.
Everything has the same values, but apparently the TCP/IP receiver port number is 49152 by default in the new database

Easy peasy, let’s change that. Click on the parameter PORTNUMBER highlighted in blue and change it to 60001, then save.

Let’s try again… No dice.

Maybe that port is already in use? I’ll try to stop the other db and try again.


Mmmm, different error this time. Wait a minute, the docker container has stopped! I started again and try to start the original db. Ok, that one starts up. But my db doesn’t start.

Let’s look around. The logs in Adabas-ce container tells me that ADASTART fails to launch. Also, if you read the logs carefully, you can see that during the container startup it creates the demo db but then applies restrictions due to license

and looking into the parameters of both databases the parameters are the same, let’s change that.

Numbers of threads - NT and User Queue Size - NU are straightforward.
Change those values to 3 and 5 respectivly, but, Length of Adabas Work Pool - LWP doesn’t match directly. It says 16 in the manager but 167216 in the logs… The paramater in the manager is shown in MB while the logs shows the binary value. So…, 16MB is allow for the demo DB but new ones should be restricted to 10MB, let’s try that.

Close, but fails again. Let’s check the logs.

:person_facepalming:t2:ok, it’s not 10mb, it’s 1mb… Let’s change that and try again.

We’re getting there! Still failed but we have correctly passed the LWP.

Now it’s about PLOG - Protecction Logging. Let’s disable that

And… Let’s go!! up and running!!

Ok, this part maybe should be a new post, but since this limitations are related to the community edition I leave it here. Please let me know if I should post it in a new topic.

Round 2

So here I am again. Problem 1. I restarted a couple of times since instalation but now adabas-ce container can’t start.

Error invoking remote method 'docker-start-container': Error: (HTTP code 500) server error - Ports are not available: exposing port TCP 0.0.0.0:60001 -> 0.0.0.0:0: listen tcp 0.0.0.0:60001: bind: An attempt was made to access a socket in a way forbidden by its access permissions.

Easy fix, first find if something is using it. In powershell or cmd, netstat, but I’ve used TCPVIEW which is easier and cooler. Anyway, port was free. Then I found this post and used this command
net stop winnat, then try to run the container, yep, cool,
and then net start winnat
So, that’s solved. (the article also says to add another command to exclude the port, before running the service again. I’ll keep it in mind if it happens again.)

Second problem. This is related to the Adabas course. So… I checked Natural was working and indeed it works, but the hello world example related to database can’t connect to Adabas, it says


EMP-GET 0046 NAT3148 Database 12 not active. Subc O.
This means the database is running but not working…
I change the values of NT / NU / PLOG / LWP as did in the previous post I made, but still not working.
The logs, still give me some info

2023-08-22 00:18:04 %ADANUC-I-MISLIC, License file not found - Restrictions for Community Edition apply.
2023-08-22 00:18:04 %ADANUC-I-HAENA, HA synchronisation check enabled
2023-08-22 00:18:04 %ADANUC-I-HANUC, Adabas database 12 request HA access ...
2023-08-22 00:18:04 %ADANUC-I-HASTATE, Sync High availability state: O.K.
2023-08-22 00:18:04 %ADANUC-I-CREATED, dataset NUCTMP1, file /data/db012/NUCTMP1.012 created
2023-08-22 00:18:04 %ADANUC-W-ADATCPLICENSE, WCP license file not found
2023-08-22 00:18:04 %ADANUC-W-ADATCPRECVLIC, Parameter TCPRECEIVER restricted by licensing, changed from 2 to 1
2023-08-22 00:18:04 %ADANUC-W-ADATCPATBLIC, Parameter TCPATB restricted by licensing, changed from 20971520 to 1048576
2023-08-22 00:18:04 %ADANUC-W-ADATCPCONLIC, Parameter TCPCONNECTIONS restricted by licensing, changed from 4294967295 to 4
2023-08-22 00:18:04 %ADANUC-I-ADATCPENAB, Adatcp enabled, listening on port: 60001
2023-08-22 00:18:04 %ADANUC-I-DBSTART, Database 12, session 7 started, 22-AUG-2023 00:18:04

May I need to change TCPRECEIVER / ADATCPATBLIC and the others?
I’m going to experiment a little more. I’ve found this


Tools & Utilities. Let’s see if I have something there that could help me.

Alright, there is a tool for showing messages


Which is basicly the same as this docs.

Mmm, is a database problem then. It seems like it can’t find it.
The adabas manager is working properly, but I’ve set it up manually using the ip I got from portainer…
It may possibly be that, I’m running the containers using docker compose, and I decided to ignore the guide, in part 4.2 where it says I have to use the ip of my computer instead of localhost.
Let’s change that.


Got the local ip, updated the docker-compose.yaml and… is working.:expressionless:
Always follow the guide… but why… Should I set the ip staticly? I’ll give it some though, meanwhile I’m going to edit the original post to not confuse newcomers.

Learning about docker networking

I’m reading this guide
My goal is to create a network connection between the natural-CE container and the adabas-ce container whitout having to set it up manually.
Right now we do it telling the natural container to add an extra-host when running the container which literally add 192.168.1.36 adabas-db to the /etc/hosts/ in the container during initialization. That means, that if we put adabas-db in a browser inside that container we would be able to access the database…, right?


actually it does (forget the 0.0.0.0 adabas-db, is the config I used during this container run (which doesn’t work), it should be the IP I got earlier)
So, how do I fix it. Let’s go back to the guide.

Apparently docker creates a bridge when it creates container, and every container can see each other, but you need the ip. In adabas manager I can tell him which IP to use because they are already running and I can check for that, but how can I do it programaticly?
The guide mentions a user-defined bridge. Let’s check the docs

Alright, so we can create a new network
docker network create my-docker-net
and use that network when creating the containers.

docker run -d -p 60001:60001 -p 8190:8190 -e ACCEPT_EULA=Y -e ADADBID=12 -e "ADA_DB_CREATION=demodb" --name adabas-db --network my-docker-net softwareag/adabas-ce:7.1.1

Or connect a running container to that network, I’ll try adabas-manager to test the functionality. To do that I have to add both adabas-db and adabas-manager to the same network
docker network connect my-docker-net adabas-db
and
docker network connect my-docker-net adabas-manager

Now in theory I should be able to connect adabas manager to adabas using the name of the container as the hostname


It worked!!

Alright… let’s think the next step. I should be able to remove the extra host from the natural-ce container and connect it to the same network, right?
Let’s see how to do that in the docker compose to make it easier.
Mmm, the docs are interesting… when you use compose it creates a network by default called the same as the folder where the docker-compose.yaml file is located. Does that mean that I don’t have to add the extra-host in it? Well, that’s should be right if the container name is the same as the host we are adding which is true in this case. Let me check it.
My theory is… Eclipse connects to natural-ce container through localhost, and natural should be configured to connect to adabas-db using that as a host…

Natural is working…

and adabas is working too!!!

You don’t need to set the extra-host in docker compose!! So nice!
But, if you are running the container by themselves you have to create a network and set the network for each container.
But if you use Docker compose (which looks better and better every time) you can omit a lot and just use the container names as host for connectivity.
Here is my docker-compose.yaml now

docker-compose.yaml

version: ‘3.3’
services:
adabas-ce:
ports:
- ‘60001:60001’
- ‘8190:8190’
environment:
- ACCEPT_EULA=Y
- ADADBID=12
- ADA_DB_CREATION=demodb
container_name: adabas-db
image: ‘softwareag/adabas-ce:7.1.1’
natural-ce:
ports:
- ‘2700:2700’
environment:
- ACCEPT_EULA=Y
container_name: natural-ce
image: ‘softwareag/natural-ce:9.2.1’
adabasmanager-ce:
ports:
- ‘4990:4990’
environment:
- ACCEPT_EULA=Y
container_name: adabas-manager
image: ‘softwareag/adabasmanager-ce:9.1.0.1’

Also, for those interested, you can check the configuration of natural in

You can see it is preconfigured to map db 12, which is the one loaded with examples and 11, which doesn’t exist at this moment, to the host ADABAS-DB:60001.

I have to keep this in mind for when I create my own database for learning. How can I edit files in UNIX when I don’t have vi installed? Maybe through sh? In any case, case closed for now. Hope it helped somebody. Sorry for being so chaotic, as I said I’m documenting while I’m learning.

Hi Alfonso.

Thanks for posting your journey. I just wish I’d had this available while I installed NaturalOne on my home pc. The guides and forums aren’t especially helpful but I (finally) got it working.

My problem now is defining a WORK file in my program. Seems simple enough but I keep getting a NAT1599 error. I’m followed the softwareag tutorial here (Education Community) which describes a Windows work file, but it can’t find it from the Docker environment. I’ve found various comments on this topic in the forums, but nothing I have tried works.

If you have any advice in regard to file-handling in NaturalOne, I would be grateful if you could provide any help/guidance.

Cheers, Paul

Hi Paul, I haven’t reached that part yet, but since I’ll stomp on this in the future and I have docker fresh I’m giving it a shot.
First of all, I’m assuming that in the tutorial they are using Natural installed on windows and therefor there is not much complication to read files.
Now, using natural-ce in docker, we need to allow the container to read data from an external folder… in the past I’ve used “volumes” to allow that behavior.
Let’s see if that works.
Before that, I’m going to try to run the program without changing anything to try to replicate your problem.
I’ll download the cruise.csv into a new folder in C:\my-files and edit the program accordingly, build the project, upload it and run it…

Ok, that was expected. Then, how do I tell docker where my files are? There are a few mechanism in docker but I think Volumes might be the right choice.
I’ll try to achieve it with docker compose first as I think is the easiest, but maybe I’ll try later to do it running a single container.
Please note, and this might be important, there may be differences if you don’t use WSL (Windows Subsystem for Linux) and Docker Desktop.
I use WSL, I think is an amazing development experience but it has some caveats, mainly configuration and wrapping your head around being a virtual machine as it not feels like one. In any case, I’ll try to make it work on my machine first.

So, what I’m going to do is to add a Volume tag to the compose file and reference the path on my machine and the path where I want those files in the filesystem of the container.

Ok, easy enough, I had to delete the containers and recreate them, but it seems to work.

Now, the question is, will Natural be able to load that file?
Since I’ve deleted the containers I have to rebuild and upload the project again.

I’ve check the hello world and both HELLO-P and GET-Em programs are working… :melting_face: I had to rebuild a couple times but seems like is working. Anyway, now to check the WORKFPGN program and try to make it work.

The file referenced in the program

DEFINE WORK FILE 1 'C:\my-files\CRUISE.CSV'     TYPE 'CSV'

doesn’t makes sense in the container, but, as shown previously, is in /home folder, so let’s try that. just change that line.

DEFINE WORK FILE 1 '/home/CRUISE.CSV'     TYPE 'CSV'

build, upload and… it’s working!!!

Now let’s check if I can make changes to the CSV on windows and see those reflected in natural output.

I open the csv on my editor and change the first line

Rerun the program in natural…


and it works as well.

So… what’s the deal?

Docker Is really sophisticated but not intuitive. A lot of his magic happens in the shadows and sometimes is hard to grasp. This solution may be half baked and probably doesn’t follow best practice, but it works and most probably, if you work in a company somebody with better understanding than me will be the responsible of setting up your dev enviroment.

Also, this solution rely on Docker Desktop and WSL2, which if you think about it is frankly scary (My system is windows, but it has a virtual machine that runs linux (wsl), and then docker run some containers on that virtual machine, to virtualize 3 unix instances which needs to access the files on the original windows system :exploding_head: ) So much complexity totally abstracted to us.

Now, I hope you understand you have to change the paths to suit your filesystem. Also, if you are not using docker-compose (you probably don’t as the guide don’t mention it at all) you can create those volumes with the -v flag such us

docker run -d -p 2700:2700 -v /c/my-files:/home --add-host adabas-db:<YOUR-IP> -e ACCEPT_EULA=Y --name natural-ce softwareag/natural-ce:9.2.1

haven’t tried that yet, so luck with that.

Also, if you are not using WSL, you may need to reference your local path as you do normally on windows.

docker run -d -p 2700:2700 -v C:\my-files:/Home --add-host adabas-db:<YOUR-IP> -e ACCEPT_EULA=Y --name natural-ce softwareag/natural-ce:9.2.1

I haven’t tried that one either. In fact I’m really scared of changing many configurations in my system since Natural+Adabas is quite the pain to make it work.

Anyway, let me know if you make it work.

Hi Alfonso,
This is really helpful, thanks!
It is my first time using Docker so still getting to grips with it. I don’t have docker compose installed yet so I’ll be trying that next I think.
I will report back soon if/when I’ve got compose set up and the volumes sorted.
Cheers, Paul

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.