Unable to start Nexus repository on CentOS 7 running on AWS - orientdb

Our Nexus repository ran out of space and now we cannot start the repository. Unfortunately, we do not have a backup of the repository that we can revert back to.
After we made some space on the disk 3.4. GB is free.
Now we are trying to fix the corrupt Orient databases namely config, and component.
After we start the Orient DB console via
*sudo java -jar ./lib/support/nexus-orient-console.jar*
and try to connect to the config DB via
*CONNECT plocal:/mnt/sonatype-work/nexus3/db/config admin admin*
we are getting error com.orientechnologies.orient.core.exception.OStorageException: Cannot open local storage '/mnt/sonatype-work/nexus3/db/config' with mode=rw
DB name="config"
Connecting to database [plocal:/mnt/sonatype-work/nexus3/db/config]
with user 'admin'... 2018-11-24 02:23:00:977 WARNI {db=config} Storage
'config' was not closed properly. Will try to recover from write ahead
log... 2018-11-24 02:23:00:983 WARNI {db=config} Record
com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OCheckpointEndRecord{lsn=LSN{segment=215,
position=52}} will be skipped during data restore$ANSI{green
{db=config}} Exception during storage data restore
java.lang.NullPointerException at
com.orientechnologies.orient.core.storage.impl.local.paginated.wal.ODiskWriteAheadLog.cutTill(ODiskWriteAheadLog.java:919)
at
$ANSI{green {db=config}} Error during storage close
java.lang.NullPointerException at
com.orientechnologies.orient.core.storage.impl.local.paginated.wal.ODiskWriteAheadLog.cutTill(ODiskWriteAheadLog.java:919)
at
Exception 475646D4 in storage
plocal:/mnt/sonatype-work/nexus3/db/config: 2.2.31 (build
285537d2767275f460df32c6a3be01bfff6a517c, branch 2.2.x)
com.orientechnologies.orient.core.exception.OStorageException: Cannot
open local storage '/mnt/sonatype-work/nexus3/db/config' with mode=rw
DB name="config" at
com.orientechnologies.orient.core.storage.impl.local.OAbstractPaginatedStorage.open(OAbstractPaginatedStorage.java:323)
If we look at the processes running via htop we see multiple
java -jar ./lib/support/nexus-orient-console.jar running.
Not sure if that is causing a problem connecting to the config db.
Any ideas or recommendations to fix the issue?

Just wanted to share that this issue appears to have been resolved with a conversation on this mailing list: https://groups.google.com/a/glists.sonatype.com/forum/?utm_medium=email&utm_source=footer#!msg/nexus-users/64W_y9fDGzQ/o0FKRgiDAwAJ

Related

OrientDB 2.2.13 console.sh: getting "Cannot create a connection to remote server address(es)"

I have an embedded database where I start an OServer and trying to connect to it from the console. I've been doing this successfully for many months and upgrading the database as new versions come out. Now, with 2.2.13, the embedded operations seem to work but I can't connect to the server with the 2.2.13 console.sh. I get the message:
Error: com.orientechnologies.orient.core.exception.OStorageException: Cannot create a connection to remote server address(es): [127.0.0.1:2424]
DB name="master"
The java code running the embedded database gets the following exception:
$ANSI{green {db=db}} Error executing request
com.orientechnologies.orient.core.exception.ODatabaseException: Error on plugin lookup: the server did not start correctly
DB name="db"
at com.orientechnologies.orient.server.OServer.getPlugin(OServer.java:850)
at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.openDatabase(ONetworkProtocolBinary.java:857)
at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.handshakeRequest(ONetworkProtocolBinary.java:229)
at com.orientechnologies.orient.server.network.protocol.binary.ONetworkProtocolBinary.execute(ONetworkProtocolBinary.java:194)
at com.orientechnologies.common.thread.OSoftThread.run(OSoftThread.java:77)
Seems to be looking for the 'cluster' plugin.
Any idea why this doesn't work anymore? It did work in 2.2.12.
Thanks
Curtis
Seems I had automatic backup turned on but the config file was missing. So, the server looked like it started up but actually didn't.
I created the config file and set enabled to false. Still didn't start up because it sees the false and stops the configuration and throws an exception because the 'delay' parameter isn't set.
I think orientdb should start up without backups enabled if the config file is missing or the enabled parameter is set to false.
At least the console is working now.

Google Cloud SQL MySQL 5.7 denies connection when doing large import

I'm having difficulties migrating a database (~3gb sql file) from MySQL 5.6 to MySQL 5.7 on Google Cloud SQL.
First I made a dbdump of the MySQL 5.6 server database:
mysqldump -hxx.xx.xx.xx -uroot -pxxxx dbname --opt --hex-blob --default-character-set=utf8 --no-autocommit > dbname.sql
I then tried to import the database with cloudsql-import:
.go/bin/cloudsql-import --dump=dbname.sql --dsn='root:password#tcp(xx.xx.xx.xx:3306)/dbname'
The import starts but after a while (around 10 minutes) I receive the following error message:
2016/06/29 13:55:48 dial tcp xx.xx.xx.xx:3306: getsockopt: connection refused
Any further connection attempts to the MySQL server are denied with the following error message:
ERROR 2003 (HY000): Can't connect to MySQL server on 'xx.xx.xx.xx' (111)
Only a full restart (made from the google cloud platform console) makes it possible to connect to again.
I made a full migration from 5.5 to 5.6 using this method not so long ago. Any ideas why this doesn't work with 5.7?
would you check the storage disk usage on the Console Overview page of the instance? If the storage is full, you can increase the storage size of your instance by changing the storage size value in Edit page.
If the binary logging is enabled, lots of space will be taken by binary logs. You could consider to turn it off when you are running the import.
If you still have trouble with the instance, you can send an email to cloud-sql#google.com for further investigation. Thanks.
I tried analyzing the different rows where the import had timed out, but didn't find anything out of the ordinary. I then fiddled with the available parameters in Google cloud SQL and when using mysqldump.
I finally just tried using a better Machine Type (from two core 8GB Ram to 8 core 30GB ram) and it "solved" the problem.

ERROR: could not open file "base/.../...": Interrupted system call

After trying to run PostgreSQL 9.1 on Amazon Web Services this error has been turning up in the database and application logs. Reinstalling on a different AWS VM has not helped. Strangely the error goes a way after a few moments of activity, only to return once the system goes idle for a while.
The PostgreSQL data populating the database was recently WAL streamed from a CentOS VM and restarted as a read-write master.
Searches for "EINTR" in the PostgreSQL source turns up plenty of results, but none that jumps out as related to opening base files. Quite a few references to "could not open file". These looked promising:
src/backend/storage/file/copydir.c
src/backend/storage/file/fd.c
src/port/open.c

Orient db import data

I am trying to do export/import in orient db 1.7.4 community edition between to different orient db servers running same version.
I did export database dbone which created dbone.json.gz file.
connected to other server created a new database and ran import database dbone.json.gz
it terminated with below error.
Error on importing database 'dbthree' from file: dbthree.json.gz
Error while removing cluster '10'
E:\Installs\orientdb-community-1.7.4\orientdb-community-1.7.4\databases\dbthree\e.0.ocl: The process cannot access the file because it is being used by another process.
This exception:
The process cannot access the file because it is being used by another process.
Means you've a console or server open that locks the database.

Oracle connection error using Tomcat

I am using Eclipse Galileo and Tomcat 6.0. I am getting an error like this:
2010-08-17 00:09:42,684,JDBCExceptionReporter,WARN,,SQL Error: 0, SQLState: null
2010-08-17 00:09:42,684,JDBCExceptionReporter,ERROR,,Cannot create PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in progress
)
2010-08-17 00:09:42,684,SettingsFactory,WARN,,Could not obtain connection metadata
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (ORA-01033: ORACLE initialization or shutdown in progress
)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:82)
I have ojdbc14-9.2.0.8.jar placed in the Tomcat lib folder as well as the deployment folders inside Tomcat webapps folder.
Anyone knows what is causing this?
ORA-01033: ORACLE initialization or shutdown in progress
This indicates that DB is in process of either startup or shutdown and Connection to this DB can't be established.
Check your database instance is started. If not then call "startup" from sqlplus prompt before you try your program again.
If you use SQLDeveloper ,You can also check do you get connected to database using it.
Few links explaining ora code:
http://ora-01033.ora-code.com/
http://www.dbmotive.com/oracle_error_codes.php?errcode=01033
http://www.orafaq.com/forum/t/38120/2/
Is this happening on server startup (maybe a deve environment where tomcat and oracle are on the same server) ? Tomcat would generally start up quicker than the database so it could well be trying to connect before the database is ready.
You (or your DBA) should be able to run the following query to show when the database started up. The alert log would be the place to look to determine how long it took to startup. If it was shut down abruptly, it has to apply the redo logs to the datafiles before it can permit other sessions to connect. It then has to rollback any transactions that were uncommitted when it was shutdown, but it can handle other sessions during this phase.
select startup_time from v$instance;
I'm not sure what happened, but the issues seem to be gone now. I put all my support jars for all projects into the deployment folder. Not sure if that was related to this or I just got lucky, but I am not getting this error now. :)
Though this error says that initialization or shutdown in progress , there can be many reasons for this error. Please see my answer at a similar post - https://stackoverflow.com/a/20444726/2789764