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

Error during 'xtee-misp2-postgresql' upgrade 2.6.3 -> 2.6.4 #1

Open
uvelokk opened this issue Jun 30, 2022 · 6 comments
Open

Error during 'xtee-misp2-postgresql' upgrade 2.6.3 -> 2.6.4 #1

uvelokk opened this issue Jun 30, 2022 · 6 comments
Assignees

Comments

@uvelokk
Copy link

uvelokk commented Jun 30, 2022

Upgrade of the package xtee-misp2-postgresql from 2.6.3 to 2.6.4 ends with an error:

Setting up xtee-misp2-postgresql (2.6.4) ...
You have package shema version  2.6.4
PostgreSQL service is running.
Using DB connection parameters from configuration file /var/lib/tomcat8/webapps/misp2/WEB-INF/classes/config.cfg.
Allowing 'postgres' user locally trusted access.
true
Creating database 'misp2db'
createdb: database creation failed: ERROR:  database "misp2db" already exists
Cannot create database 'misp2db'
You can try to create "misp2db" by yourself: 
/usr/lib/postgresql/10/bin/createdb  -p 5432 misp2db -U postgres -E UNICODE
dpkg: error processing package xtee-misp2-postgresql (--configure):
 installed xtee-misp2-postgresql package post-installation script subprocess returned error exit status 1

OS: Ubuntu 18.04.6 LTS

@raits raits self-assigned this Jul 18, 2022
@raits
Copy link
Contributor

raits commented Jul 18, 2022

Thank you for reporting this issue, we are looking into it.

@raits
Copy link
Contributor

raits commented Jul 19, 2022

@uvelokk Unfortunately, we have been unable to replicate your situation. Could you please check that the database information inside the file /var/lib/tomcat8/webapps/misp2/WEB-INF/classes/config.cfg is correct.

Additionally, could you please provide some additional background that could help us diagnose the issue better:

  • Was version 2.6.3 a fresh installation or was that also upgraded from a previous version (if so, what was the original fresh installation version if you can remember)
  • Did the previous version work without any issues?
  • Did you do any other upgrades in addition to misp2 during the same time?
  • Have you modified the database settings manually, do you have any other applications on the same database instance?
  • Any other information you feel might be relevant to help us track the issue down

@raits raits transferred this issue from nordic-institute/misp2-install-source Jul 27, 2022
@raits
Copy link
Contributor

raits commented Jul 27, 2022

Migrated the issue to MISP2-s new main repository. Let's continue the discussion here.

@uvelokk
Copy link
Author

uvelokk commented Aug 3, 2022

Eh,
could not repeat that error anymore as well. I'l close the issue for now.

Thank You.

@uvelokk uvelokk closed this as completed Aug 3, 2022
@uvelokk uvelokk reopened this Oct 28, 2022
@uvelokk
Copy link
Author

uvelokk commented Oct 28, 2022

Reopened the issue.

The reason of error lies in the script '/usr/xtee/db/install/install-misp2-postgresql.sh'. If the user 'postgresql' access to local databases is changed from 'peer' to 'trust' and the service 'postgresql' is restarted, then the script must wait as long as the service is fully restarted. Otherwise an error will be triggered.

@raits
Copy link
Contributor

raits commented Nov 16, 2022

Thank you for providing further details and locating the probable issue. I have created a backlog item in our JIRA to resolve this issue: https://nordic-institute.atlassian.net/browse/MISPDEV-83

Unfortunately, I can not offer a timeline for improving the script at this point.

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