mongorestore failed: restore error: error applying oplog: applyOps: EOF - restore

I created mongodb dump with next command:
mongodump /host:%MONGODB_HOST% /authenticationDatabase:admin /username:username /password:password /oplog
After that I'm trying to restore dump with a command:
mongorestore /noIndexRestore /oplogReplay /numParallelCollections:1 dump
It restores all db and fails to replay oplog:
Failed: restore error: error applying oplog: applyOps: EOF
local mongoDB version: 3.0.2 (Windows 7)
remote mongoDB version: 2.6.7 (Windows 8)

This is a bug with the Go version of the MongoDB tools. I made a pull request on the GitHub project.
If you want an immediate solution, change the value of the oplogMaxCommandSize constant on line 17 of mongorestore/oplog.go from 1024 * 1024 * 16.5 to 1024 * 1024 * 8. Then recompile the mongorestore tool.
Update
Here is the JIRA issue. And here is the official bug fix.

Related

PyCharm DB Navigator: how to fix "No such file or directory"

I'm running PyCharm Community 2018.3 with the DB Navigator plugin. I've set up a connection and tested it. When I execute the SQL script
SELECT *
FROM table;
The DB execution console replies:
Creating temporary script file /tmp/DBN-4213556526222248783.sql
Executing command: /usr/bin/psql --echo-all --host=hostname.amazonaws.com --port=5432 --dbname=foo --username=bar -f "/tmp/DBN-4213556526222248783.sql"
Mar 9, 2019 11:24:44 AM: CIQ / CIQ - Script execution started
"/tmp/DBN-4213556526222248783.sql": No such file or directory
The /tmp/DBN- file exists and is world readable. /usr/bin/psql exists. I can cut and paste the same 'Executing Command' line into a shell and get a response from the database using it.
The issue is tracked under ticket https://database-navigator.atlassian.net/browse/DBN-298

CNTK 2.0 beta 7 installation error - install.ps1 not digitally signed

I downloaded cntk 2.0 beta 7. when executing .\install.ps1, got this error for install.ps1 not digitally signed:
Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.
PS C:> cd .\local\cntk\Scripts\install\windows\
PS C:\local\cntk\Scripts\install\windows> .\install.ps1
.\install.ps1 : File C:\local\cntk\Scripts\install\windows\install.ps1 cannot be loaded. The file
C:\local\cntk\Scripts\install\windows\install.ps1 is not digitally signed. You cannot run this script on the current
system. For more information about running scripts and setting execution policy, see about_Execution_Policies at
http://go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ .\install.ps1
+ ~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
and if I start powershell -executionpolicy unrestricted
install.ps1 is able to run but nothing got installed, here is the output:
This script will setup the CNTK prequisites and the CNTK Python environment onto the machine.
More help is given by calling 'get-help .\install.ps1' in your powershell environment.
The script will analyse your machine and will determine which components are required.
The required components will be downloaded in [C:\local\cntk\Scripts\install\windows\InstallCache]
Repeated operation of this script will reuse already downloaded components.
- If required VS2012 Runtime and VS2013 Runtime will be installed
- If required MSMPI will be installed
- Anaconda3 will be installed into [C:\local\Anaconda3-4.1.1-Windows-x86_64]
- A CNTK-PY34 environment will be created or updated in [C:\local\Anaconda3-4.1.1-Windows-x86_64\envs]
- CNTK will be installed or updated in the CNTK-PY34 environment
The parameter '-Execute' hasn't be supplied to the script.
The script will execute withouth making any actual changes to the machine.
1 - I agree and want to continue
Q - Quit the installation process
1
Determining Operations to perform. This will take a moment...
The following operations will be performed:
* Install Anaconda3-4.1.10
* Setup CNTK PythonEnvironment 3.4
* Setup/Update CNTK Wheel
* Create CNTKPY34 batch file
Do you want to continue? (y/n)
y
Performing download operations
Downloading [https://repo.continuum.io/archive/Anaconda3-4.1.1-Windows-x86_64.exe], please be patient....
** Running in DEMOMODE - no download performed
Download operations finished
Performing install operations
Installing Anaconda3-4.1.1. This will take several minutes. Please be patient ....
** Running in DEMOMODE - setting Exit Code **: 0
** Running in DEMOMODE - setting Exit Code **: 0
Setup/Update of CNTK Wheel environment. Please be patient....
** Running in DEMOMODE - setting Exit Code **: 0
Create-Batch [C:\local\cntk\scripts\cntkpy34.bat]:No-Execute flag. No file created
Install operations finished
Please read the output or the documentation on the wiki!
"The parameter '-Execute' hasn't be supplied to the script. The script will execute withouth making any actual changes to the machine"
Run the script as .\install.ps1 -Execute
I had the same error and used the sign-tool from Microsoft to digitally sign the files. After signing, this error vanished.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa387764(v=vs.85).aspx
"SignTool is available as part of the Windows SDK ..."
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
Just run this command
Try this easy fix!

Derby classpath can't connect to database

I just installed derby and I followed the instructions from here the exact same way it told me to but replacing the paths with my paths. But for some reason why i try to create a connection to connect to create a Database and run my sql scripts to create the tables and populate them it gives me a few errors firstly is this one
ERROR 08001: No suitable driver found for jdbc:derby:SuperMarket;create=true
Then when my sql scripts run I get this error
IJ ERROR: Unable to establish connection
I dont see what I did wrong this is the line i used to set the class path
C:\> set CLASSPATH=%DERBY_INSTALL%\lib\derby.jar;%DERBY_INSTALL%\lib\derbytools.jar;.
I included the derby.jar file that was needed so I can't see the problem does anyone know what I did wrong? Also when I run
connect 'jdbc:derby://localhost:1527/MyDB';
The server starts fine
C:\Derbs\db-derby-10.10.2.0-bin\bin>startNetworkServer
Thu Jun 26 11:56:38 PDT 2014 : Security manager installed using the Basic server
security policy.
Thu Jun 26 11:56:39 PDT 2014 : Apache Derby Network Server - 10.10.2.0 - (158244
6) started and ready to accept connections on port 1527
There are many troubles when I start using DerbyDB. It is really painful to practice.
1. For example, I download Derby from http://db.apache.org/derby/derby_downloads.html#Latest+Official+Releases
2. Unzip to C:\tools\db-derby-10.11.1.1-bin.
3. Press Windows key + R, type: SystemPropertiesAdvanced, set up environment variables.
Reference: https://db.apache.org/derby/docs/10.0/manuals/getstart/gspr16.html
4. Run cmd,
We should run additional command:
C:\tools\db-derby-10.11.1.1-bin\bin\NetworkServerControl.bat
and type:
C:\tools\db-derby-10.11.1.1-bin\bin\ij.bat
then press Enter, and result:
5. We will put in-memory Derby database to D:\ directory. Folder vy1 must doesn't exit. We type command for creating new database named vy1:
connect 'jdbc:derby:D:\vy1;create=true';
Use Windows Explorer, go to directory D:\vy1, you will see new folder named vy1 just created.
then type command:
connect 'D:\vy1'
6. See SQL command to create database, table, insert, then read database like this:
(Open images in new web page is better for view. Note: This is my old screenshot when I use older version few months ago).
Come back to your question, focus at section 3, and commnand call NetworkServerControl.bat at section 4.
Good luck! :)

Cannot get rid of following error "pg_dump: aborting because of server version mismatch" on Lion OSX

I am trying to download the dump of a database on Heroku in the following way:
pg_dump dc6psqngs8h580 -h url_address -U user_name> db.sql
but I am getting this error all the time:
pg_dump: server version: 9.2.4; pg_dump version: 9.1.5
pg_dump: aborting because of server version mismatch
I found topics with this error here on SO, but none of them helped me out with this issue.
I added:
PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH"
into ~/.profile, also I added
export PATH=/Applications/Postgres.app/Contents/MacOS/bin:$PATH
into ~/.bash_profile, but none of these helped me to successfully download the dump.
Where can be yet the problem and how to fix it?
Thank you very much
Install PostgreSQL 9.2.x whether by homebrew, from source, or some other means.
Basically you can dump an older server with a newer version of the dump file, but not the other way around. This exists to ensure that newer features of the db are not ignored in the dump and there are no command line switches to get around the error.

SVN checkout fails with “chunk delimiter was invalid”

ERRORS:
When checking out a large project we receive error on a random file in the project:
Could not read response body: SSL error: decryption failed or bad record mac
Response was to disable SSL and restarted SVNServer.
Retested and got this error:
chunk delimiter was invalid
So examined the SVNserver log:
Error writing base64 data: APR does not understand this error code [500, #620018]
Provider encountered an error while streaming a REPORT response. [500, #0]
A failure occurred while driving the update report editor [500, #620018]
We can recreate the above 100% of the time.
TRIED:
From here we tried:
Upgraded OpenSSL to latest version. Resulted in same errors above.
Copied the REPO to a new REPO to ensure no file corruption. Resulted in same errors above.
Installed SVNserver locally and tested taking network our of the equation. Resulted in same error above.
We think this may be isolated to the version of OpenSSL we are using with some other component installed with VisualSVN.
Anyone aware of this issue and how to resolve it ?
COMPONENTS/SETTING:
Windows 2008 Server R2
Apache Subversion 1.7.6
Apache HTTP Server 2.2.22
OpenSSL 0.9.8x
Neon 0.29.6
Serf 1.0.0
SQLite 3070603
ZLib 1.2.3
VisualSVN 2.5.6
SSL enabled
Windows 7 x64 pro client nodes
Do you have Nod32 installed? If yes then disabling protocol filtering can help. Best solution is to add exception for SVN.
Nod32 -> Advanced setup -> Web and email -> Protocol filtering -> Excluded applications -> check you client, mine is TortoiseProc.exe
The real error is Too many open files [500, #24]. I assume you're using *nix based Subversion server. In this case increase number of open file descriptor with the ulimit command:
ulimit -n 99999
See also: https://serverfault.com/questions/48717/practical-maximum-open-file-descriptors-ulimit-n-for-a-high-volume-system