Scratchpad remove docker file

Thank you @mrmarkuz

Unfortunately, I forgot about this. I fixed it, but the same error message…

What else have I forgotten?

Did you install using the right command?

If you like you could post the Github link so I can have a look.

I managed to install firebird from the test repo, but I’m having problems. The firebird container doesn’t start automatically.

[firebird3@ns8 state]$ systemctl --user status firebird.service
× firebird.service - firebird server
     Loaded: loaded (/home/firebird3/.config/systemd/user/firebird.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Sat 2025-05-10 13:21:18 UTC; 11min ago
       Docs: man:podman-generate-systemd(1)
    Process: 2545 ExecStartPre=/bin/rm -f /run/user/1019/firebird.service.ctr-id (code=exited, status=0/SUCCESS)
    Process: 2546 ExecStart=/usr/bin/podman run        --cidfile=/run/user/1019/firebird.service.ctr-id        --cgroups=no-conmon        --rm        --sdnotify=conmon>
    Process: 2562 ExecStopPost=/usr/bin/podman rm        -f        --ignore -t 10        --cidfile=/run/user/1019/firebird.service.ctr-id (code=exited, status=125)
   Main PID: 2546 (code=exited, status=125)
        CPU: 154ms

If I try to restart it with the command systemctl --user restart firebird.service I get the same error.

What could be the problem?

Thank you for your help.

1 Like

Did you configure the app by setting a FQDN and clicking the save button in the app settings?
This will enable the services and start the containers.

If you already configured the app and the container doesn’t start, you need to check the app logs for details.

Thank you @mrmarkuz

I modified the module on github. Can I somehow update the version installed on ns8 or do I have to uninstall and reinstall?

Did you configure the app by setting a FQDN and clicking the save button in the app settings?

I haven’t set it up, but I don’t have a settings interface for it either. Did I not prepare the module correctly?

Thank you for your help.

Following command updates the firebird1 instance from Github:

api-cli run update-module --data '{"module_url":"ghcr.io/steve/firebird:latest","instances":["firebird1"],"force":true}'

There should be app settings, see also ns8-kickstart/ui/src/views/Settings.vue at main · NethServer/ns8-kickstart · GitHub
Maybe you need to refresh the browser so the app is shown in the app drawer?

Please provide the Github link to your app so it’s possible to check it.

I just now realized that I didn’t provide the link. I remembered that I had sent it earlier…

or

ghcr.i/sipi58/firebird:latest

Please note that it is still in a very early stage, because for now I am trying to implement the config under scratchpad as a standalone pod…

Firebird is running under scratchpad, I was able to upload the existing databases and the modified security3.fdb. Windows client can connect to firebird running under scratchpad and the databases are accessible and modifiable.

I would like to achieve this with firebird pod as well…

Afterwards, there are still many small things to be solved, such as creating a Firebird user, setting the Firebird port, uploading databases, setting the database character set, etc.

1 Like

I created pull requests of the service files to make firebird start. I think there was an error when you reordered the options of the podman commands.

The image should be set in the build-images.sh script, see also Images | NS8 dev manual
For example: ns8-roundcubemail/build-images.sh at main · NethServer/ns8-roundcubemail · GitHub
The image environment variable can then be used in the service files, see also Images | NS8 dev manual
For example: ns8-dokuwiki/imageroot/systemd/user/dokuwiki.service at main · NethServer/ns8-dokuwiki · GitHub

The firewall port needs to be opened, see also Firewall | NS8 dev manual

You helped a lot again. Thank you very much @mrmarkuz

I accepted your pool request. I updated the firebird module and now I can start it with the following command:

systemctl --user start firebird.service
systemctl --user firebird-app.service

I opened the firewall port and I can connect to TCP port 3050 with telnet:

This will not be a good solution because the port is always open regardless of the firebird module. Unfortunately, I don’t understand where and how to specify the port to be opened when creating the pod and closed when stopping it. I simply don’t understand, probably it’s because of my English skills…

Thank you for your help.

1 Like

Firewall ports are opened on create-module and are removed on destroy-module.

Create-module example: ns8-ejabberd/imageroot/actions/create-module/70open-ports-Firewall at cea47fa2cd32d99d00d0436935dc0a5f925c5fa3 · NethServer/ns8-ejabberd · GitHub

Destroy-module example: ns8-ejabberd/imageroot/actions/destroy-module/90Firewall at cea47fa2cd32d99d00d0436935dc0a5f925c5fa3 · NethServer/ns8-ejabberd · GitHub

I studied the examples in the link and the firewall and port allocation chapters of the developer’s manual and created a create-module/70open-port-Firewall and a destroy-module/90Firewall file.

I updated the Firebird module, restarted firebird.service and firebird-app.service, but still can’t connect to TCP port 3050 with telnet.

The /home/firebird3/.config/state/environment file contains the following:

cat /home/firebird3/.config/state/environment
ECHO_SERVER_IMAGE=docker.io/jmalloc/echo-server:latest
FIREBIRD_IMAGE=docker.io/firebirdsql/firebird:3.0.11
IMAGE_DIGEST=sha256:739a0da9b178acc173e6120367099ee45d76d777eabb56b0f35af235f72f2ab9
IMAGE_ID=9a6e7c6d1b30e4ffcc30ebd617283b7f9c851cdc1a991bcef98e35f1623acf0b
IMAGE_REOPODIGEST=ghcr.io/sipi58/firebird@sha256:739a0da9b178acc173e6120367099ee45d76d777eabb56b0f35af235f72f2ab9
IMAGE_URL=ghcr.io/sipi58/firebird:latest
MODULE_ID=firebird3
MODULE_UUID=00b96f56-9e80-429f-b8e4-51534c038a56
NODE_ID=1
PREV_ECHO_SERVER_IMAGE=docker.io/jmalloc/echo-server:latest
PREV_FIREBIRD_IMAGE=docker.io/firebirdsql/firebird:3.0.11
PREV_IMAGE_DIGEST=sha256:739a0da9b178acc173e6120367099ee45d76d777eabb56b0f35af235f72f2ab9
PREV_IMAGE_ID=9a6e7c6d1b30e4ffcc30ebd617283b7f9c851cdc1a991bcef98e35f1623acf0b
PREV_IMAGE_REOPODIGEST=ghcr.io/sipi58/firebird@sha256:739a0da9b178acc173e6120367099ee45d76d777eabb56b0f35af235f72f2ab9
PREV_IMAGE_URL=ghcr.io/sipi58/firebird:latest
TCP_PORT=20012
TCP_PORTS=20012

Unfortunately, TCP port 3050 is not listed here. Is there anything else that needs to be configured somewhere?

Maybe something like:

org.nethserver.authorizations=node:fwadm

Thank you for your help.

1 Like

Yes, the authorization to change firewall ports is missing.

I thought about it based on the dev manual, but I wasn’t sure. Now I’m trying to create an ns8 module for the first time… I would be happy to receive any help.

Where should this be placed? In build-images.sh for the build config --entrypoint= section?

Is the order important or is it enough if I add it at the end?

Thank you for your help.

Yes, you can add authorizations like this:

--label="org.nethserver.authorizations=traefik@node:routeadm node:fwadm" \

Unfortunately, this is not enough and it still does not open TCP port 3050. What else needs to be set?

Thank you for your help @mrmarkuz

In this case you need to uninstall and reinstall the app.
The ports are opened on create-module which is isn’t triggered when updating the app.

I have uninstalled and reinstalled the firebird module.

Unfortunately it still does not open TCP port 3050, I can not connect with telnet.

The scripts need to be executable, this is the error in the logs:

2025-05-12T20:45:54+02:00 [1:firebird2:agent@firebird2] Action create-module skipped step 70open-port-Firewall: fork/exec /home/firebird2/.config/actions/create-module/70open-port-Firewall: permission denied

The script file 70open-port-Firewall isn’t executable.

[firebird2@ns8rockytest state]$ ls -l ../actions/configure-module/
total 12
-rwxr-xr-x. 1 firebird2 firebird2 858 May 12 18:13 20configure
-rwxr-xr-x. 1 firebird2 firebird2 243 May 12 18:13 80start_services
-rw-r--r--. 1 firebird2 firebird2 262 May 12 18:13 validate-input.json
[firebird2@ns8rockytest state]$ ls -l ../actions/create-module/
total 4
-rw-r--r--. 1 firebird2 firebird2 274 May 12 18:13 70open-port-Firewall

On the dev machine just add the execute permission like

chmod a+x 70open-port-Firewall

Indeed, it wasn’t set to executable. Neither was 90Firewall, so I set both up and updated them, but they don’t open the port.

I don’t see in the log that it runs 70open-port-Firewall on startup or 90Firewall on shutdown. It’s like it doesn’t even call it…

I found the following lines in the logs after a new installation of ns8-firebird (just search for 70open-port-Firewall)

2025-05-12T21:35:06+02:00 [1:firebird3:agent@firebird3] task/module/firebird3/65089d62-fa73-49fd-8dc2-24b9ee9fe18e: create-module/70open-port-Firewall is starting
2025-05-12T21:35:07+02:00 [1::agent@node] firewall-cmd --permanent --service=firebird3 --add-port=3050/tcp

And it’s working, the service is there using the right port:

[root@ns8rockytest ~]# firewall-cmd --list-services
checkmk1 checkmk2 cockpit dhcpv6-client ejabberd1 firebird3 http https mail1 nethvoice-proxy2 nethvoice2 ns-wireguard samba3 ssh webserver4 wg-easy2wgcustom
[root@ns8rockytest ~]# firewall-cmd --info-service firebird3
firebird3
  ports: 3050/tcp