Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment of FROST-Server.MQTTP-x.y.z.war not working #1956

Open
eskotilla opened this issue Jul 3, 2024 · 3 comments
Open

Deployment of FROST-Server.MQTTP-x.y.z.war not working #1956

eskotilla opened this issue Jul 3, 2024 · 3 comments

Comments

@eskotilla
Copy link

eskotilla commented Jul 3, 2024

Hello,

We have tried to deploy a FROST Server using FROST-Server.MQTTP-x.y.z.war pre-built file, but after following the steps described in https://fraunhoferiosb.github.io/FROST-Server/deployment/tomcat.html, we're not able to make it working. We're not really proficient with Tomcat so, sure we're missing some configuration.

We have the following scenario:

  • Ubuntu Server 24.04 LTS with PostgreSQL 16 and Tomcat 10 installed all in the same machine
  • Created database "sensorthings" within public schema with extensions uuid-ossp, postgis and timescaledb
  • Created user "sensorthings" with password "ChangeMe" and all privileges on database "sensorthings"
  • Installed WAR file using Tomcat's manager webapp, and checked that http://localhost:8080/FROST-Server is working fine
  • Copied "postgresql.jar" and "postgis-jdbc.jar" into both FROST-Server/WEB-INF/lib and /var/lib/tomcat10/lib folders
  • Updated FROST-Server/META-INF/context.xml with the following lines

<Parameter override="false" name="persistence.persistenceManagerImplementationClass" value="de.fraunhofer.iosb.ilt.frostserver.persistence.pgjooq.PostgresPersistenceManagerString" />
<Parameter override="false" name="persistence.idGenerationMode" value="ServerAndClientGenerated" />
<Parameter override="false" name="persistence.autoUpdateDatabase" value="false" />
<Parameter override="false" name="persistence.db_jndi_datasource" value="jdbc/sensorThings" />
<Resource
name="jdbc/sensorThings" auth="Container"
type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://localhost:5432/sensorthings"
username="sensorthings" password="ChangeMe"
maxTotal="20" maxIdle="10" maxWaitMillis="-1"
defaultAutoCommit="false"
/>

  • Created file FROST-Server/WEB-INF/classes/application.properties with the following lines:

spring.datasource.url=jdbc:postgresql://localhost:5432/sensorthings
spring.datasource.username=sensorthings
spring.datasource.password=ChangeMe
spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.driver-class-name=org.postgresql.Driver
persistence.persistenceManagerImplementationClass=de.fraunhofer.iosb.ilt.sta.persistence.postgresql.PostgreSQLPersistenceManagerString

We can get main FROST-Server web page to work, but when we click on any link, like "DatabaseStatus", we get the typical tomcat's "404 - Not found" error message:

The requested resource [/FROST-Server/DatabaseStatus] is not available

We will appreciate if anyone can guide us to get it working.

Thanks in advance

@hylkevds
Copy link
Member

hylkevds commented Jul 3, 2024

FROST-Server currently requires Tomcat 9. From 9 to 10 the namespace of all JavaEE classes changed, so it's not really possible to support both. Some users have managed to run FROST on Tomcat 10 by using the conversion tools that are supplied with Tomcat, though if you are not experienced with Tomcat it's probably easier to start with 9.

Also, FROST does not use Spring, so creating an application.properties file is pointless. That's also not in the steps described in the documentation.

Look in the log files of Tomcat to see any errors.

@eskotilla
Copy link
Author

eskotilla commented Jul 5, 2024

Hi, we finally successfully deployed FROST-Server on Tomcat 9 (and solved other minor issues related to "jar" files) so, we're now able to use APIs to operate with data.

Now we are wondering if there is a version of FROST Server with all SensorThings extensions. That is, we would like to be able to have STAPlus and Tasking Core, either a complete version including endpoints and API, or just with the tables only defined and created.

Thanks

@hylkevds
Copy link
Member

hylkevds commented Jul 5, 2024

The supplied plugins can be configured using environment variables or Tomcat parameters. See the documentation for that.
The STAplus plugin is not maintained by us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants