Welcome to Knowage Q&A, where you can ask questions and receive answers from other members of the community.
0 votes
1 view

Hello!

I followed the installation guide on the official website as well as from the Youtube. It installed successfully. Tomcat is running fine.

However, I can't seem to access the localhost/8080/knowage. HTTP Status 404 – Not Found

When I run the knowage_startup.sh, the following message appeared:

Waiting for MariaDB...
./knowage_startup.sh: 62: ./../../MariaDB/bin/mysqld_safe: not found

I will share the localhost log if needed.

Any help would be greatly appreciated! Thanks in advance!

Environment Ubuntu 20.04, MySQL 8, Tomcat 9, Knowage 8
in Installer by (310 points)

1 Answer

0 votes
Hello,

it looks like you are missing the database (MariaDB/MySQL).
How did you install Knowage? Did you use the installer or did you make a manual installation?

Best regards,
Marco
by (9.3k points)

Hi Marco,

Thank you for you response. I'm using the installer on Ubuntu 20.04 terminal. I have selected MySQL during the process and it worked fine until the "Installation Successful" message appeared. Besides that, now I saw this error as well on the Catalina log:

07-Mar-2022 08:47:18.179 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]

07-Mar-2022 08:47:18.235 SEVERE [main] org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to initialize component [Connector[HTTP/1.1-8080]]

org.apache.catalina.LifecycleException: Protocol handler initialization failed

at org.apache.catalina.connector.Connector.initInternal(Connector.java:1049)

at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)

at org.apache.catalina.core.StandardService.initInternal(StandardService.java:561)

at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)

at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:1049)

at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)

at org.apache.catalina.startup.Catalina.load(Catalina.java:724)

at org.apache.catalina.startup.Catalina.load(Catalina.java:746)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:305)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)

Caused by: java.net.BindException: Address already in use

at sun.nio.ch.Net.bind0(Native Method)

at sun.nio.ch.Net.bind(Net.java:461)

at sun.nio.ch.Net.bind(Net.java:453)

at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:222)

at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:272)

at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:227)

at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1208)

at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1221)

at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:603)

at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:80)

at org.apache.catalina.connector.Connector.initInternal(Connector.java:1046)

... 13 more

What do you suggest me to do? I have tried reinstalling and no luck.

Regards,

Irfan

Hi Irfan,
regarding the logs that you have attached, I see the following message:

Caused by: java.net.BindException: Address already in use

Therefore I would suggest you to check if the ports that you have configured for tomcat and MySQL are free or not.
Let me know if this helps,

Bye,
Marco

Hi Marco,

Well currently the :8080 is used by Tomcat and :3306 with mysqld by default. Nothing else is using those ports.

I tried changing the Knowage port to 8081 in the server.xml, it doesn't really help.

When you get the following error:

Waiting for MariaDB...
./knowage_startup.sh: 62: ./../../MariaDB/bin/mysqld_safe: not found

check at the given path if the mysqld_safe module exists or not.

Let me know.

Bye,
Marco

No, it does not exist in that path. However, I found mysqld_safe inside another path; usr/bin/

Ok, then try to modify the script by using the path that you have found "usr/bin" and see if it works this way

Which script are you referring?

knowage_startup.sh

Changed to "$PRGDIR"/usr/bin/mysqld_safe still no luck. And the catalina logs keeps saying "Address is in use" which clearly no one is using the port except for tomcat.
Hi Marco,

Any solution for the previous comment?
Hi,

I think there are two separated issues.

1) the "address in use" error is probably due to the fact that the knowage_startup.sh script has been executed twice in a row, without launching knowage_shutdown.sh

2) the "mysqld_safe not found" error is probably due to the fact that the path is wrong

I suggest you to:

1) run the knowage_shutdown.sh script

2) modify the knowage_startup.sh script and change the path of mysqld_safe to "/usr/bin/mysqld_safe"

3) clear all the logs and run the knowage_startup.sh script

Bye;
Marco
Hi Marco,

This is the default script inside the knowage_startup.sh:

#"$PRGDIR"/../../MariaDB/bin/mysqld_safe --defaults-file="$PRGDIR"/../../MariaDB/bin/knowage.ini --console &

Am I supposed to change everything to: "$PRGDIR"/../usr/bin/mysqld_safe ? Do I have to install MariaDB in this case? Currently only mysql is installed.
Hi,

just to clarify, during the installation process which option did you choose?

A) "Use an embedded version of MariaDB"

B) "Use an already installed DBMS"
I chose the B option.
Hi Irfan, sorry for the late answer.

Have you got any updates on this? You can try to use the option "A" and see if it works.
If it works that way, we will proceed to investigate why the "B" option is not working.

Bye,
Marco
...