What are ~/.m2 and ~/.p2 folders and can I delete them? - eclipse

I know they are somehow linked to Eclipse and .m2 is related to maven.
However, I never really used maven and I don't use it anymore, though I still use Eclipse, and these two folders ~/.p2 and ~./m2 are about 4Gb each and I'm wondering if I can simply delete them.
To clarify, my ~/.p2 folder looks like that:
cd ~/.p2
du -sh */
3.2M org.eclipse.equinox.p2.core/
48M org.eclipse.equinox.p2.engine/
45M org.eclipse.equinox.p2.repository/
3.6G pool/
I'm wondering if pool/ folder needs to be that big or do I have relic/zoombie files there and how to find out about it?
For example, why do I have so many versions of PyDev?
drwxr-xr-x 6 alan staff 192 Apr 4 2016 /Users/alan/.p2/pool/plugins/org.python.pydev.core_4.5.5.201603221110
drwxr-xr-x 6 alan staff 192 May 11 2016 /Users/alan/.p2/pool/plugins/org.python.pydev.core_5.0.0.201605051159
drwxr-xr-x 6 alan staff 192 Jun 22 2016 /Users/alan/.p2/pool/plugins/org.python.pydev.core_5.1.1.201606162013
drwxr-xr-x 6 alan staff 192 Jun 28 2016 /Users/alan/.p2/pool/plugins/org.python.pydev.core_5.1.2.201606231256
drwxr-xr-x 6 alan staff 192 Sep 16 2016 /Users/alan/.p2/pool/plugins/org.python.pydev.core_5.2.0.201608171824
drwxr-xr-x 6 alan staff 192 Oct 26 2016 /Users/alan/.p2/pool/plugins/org.python.pydev.core_5.3.0.201610121612
drwxr-xr-x 6 alan staff 192 Nov 1 2016 /Users/alan/.p2/pool/plugins/org.python.pydev.core_5.3.1.201610311318
drwxr-xr-x 6 alan staff 192 Dec 8 2016 /Users/alan/.p2/pool/plugins/org.python.pydev.core_5.4.0.201611281236
drwxr-xr-x 6 alan staff 192 Jan 25 2017 /Users/alan/.p2/pool/plugins/org.python.pydev.core_5.5.0.201701191708
drwxr-xr-x 6 alan staff 192 Mar 22 2017 /Users/alan/.p2/pool/plugins/org.python.pydev.core_5.6.0.201703221358
drwxr-xr-x 6 alan staff 192 Apr 12 2017 /Users/alan/.p2/pool/plugins/org.python.pydev.core_5.7.0.201704111357
drwxr-xr-x 6 alan staff 192 Jun 16 2017 /Users/alan/.p2/pool/plugins/org.python.pydev.core_5.8.0.201706061859
drwxr-xr-x 6 alan staff 192 Aug 28 2017 /Users/alan/.p2/pool/plugins/org.python.pydev.core_5.9.2.201708151115
drwxr-xr-x 6 alan staff 192 Sep 22 2017 /Users/alan/.p2/pool/plugins/org.python.pydev.core_6.0.0.201709191431
drwxr-xr-x 6 alan staff 192 Nov 9 2017 /Users/alan/.p2/pool/plugins/org.python.pydev.core_6.1.0.201711051306
drwxr-xr-x 6 alan staff 192 Nov 29 2017 /Users/alan/.p2/pool/plugins/org.python.pydev.core_6.2.0.201711281614
drwxr-xr-x 7 alan staff 224 Mar 1 2018 /Users/alan/.p2/pool/plugins/org.python.pydev.core_6.3.1.201802272029
drwxr-xr-x 7 alan staff 224 Mar 23 2018 /Users/alan/.p2/pool/plugins/org.python.pydev.core_6.3.2.201803171248
drwxr-xr-x 7 alan staff 224 May 15 2018 /Users/alan/.p2/pool/plugins/org.python.pydev.core_6.3.3.201805051638
drwxr-xr-x 7 alan staff 224 Jul 12 2018 /Users/alan/.p2/pool/plugins/org.python.pydev.core_6.4.3.201807050139
drwxr-xr-x 7 alan staff 224 Aug 9 2018 /Users/alan/.p2/pool/plugins/org.python.pydev.core_6.4.4.201807281807
drwxr-xr-x 7 alan staff 224 Oct 2 2018 /Users/alan/.p2/pool/plugins/org.python.pydev.core_6.5.0.201809011628
drwxr-xr-x 7 alan staff 224 Nov 9 2018 /Users/alan/.p2/pool/plugins/org.python.pydev.core_7.0.3.201811082356
drwxr-xr-x 7 alan staff 224 Feb 12 2019 /Users/alan/.p2/pool/plugins/org.python.pydev.core_7.1.0.201902031515
drwxr-xr-x 7 alan staff 224 Jul 1 2019 /Users/alan/.p2/pool/plugins/org.python.pydev.core_7.2.1.201904261721
drwxr-xr-x 7 alan staff 224 Aug 31 2019 /Users/alan/.p2/pool/plugins/org.python.pydev.core_7.3.0.201908161924
drwxr-xr-x 7 alan staff 224 Nov 7 2019 /Users/alan/.p2/pool/plugins/org.python.pydev.core_7.4.0.201910251334
drwxr-xr-x 8 alan staff 256 Mar 9 10:20 /Users/alan/.p2/pool/plugins/org.python.pydev.core_7.5.0.202001101138
drwxr-xr-x 8 alan staff 256 Jun 6 13:49 /Users/alan/.p2/pool/plugins/org.python.pydev.core_7.6.0.202006041357
I also have files as old as 2012, which I'm quite sure I'm not using them.

.m2 is your local Maven repository. It contains all ever downloaded Maven dependencies and Maven plugins. You can delete this folder (except maybe existing configuration/settings files, outside of the repository subfolder). If required Maven will recreate this folder and download everything: in Eclipse right-click a project and choose Maven > Update Project..., click Select All and hit OK
.p2 of this size contains most of your Eclipse installation (all plugins Eclipse is made up of) that you installed via the Eclipse Installer (in contrast to installing Eclipse via unpacking a ZIP or using a DMG file on macOS where the plugins are contained in the plugins subfolder). Do not delete this folder, otherwise you will not be able to start Eclipse anymore. To clean up this folder, run the Eclipse Installer, in the top right menu select Bundles Pools... (in Eclipse, the term bundle is a synonym for plugin) and in the Bundles Pool Management dialog run Clear Cache... and Cleanup Agent...

The .m2 folder holds Maven configuration files and a copy of every artifact you ever downloaded. You can typically delete the .m2/repository folder if you need the disk space.
The .p2 folder is apparently for the Eclipse installer. I usually use a ZIP distribution which does not fill up this.

Related

VS code setup for Java remote development

few weeks back vscode made JDK-11 mandatory for java development in VS-code
The Eclipse Platform has decided to require Java 11 as the minimum requirement for its September 2020 release. See https://www.eclipse.org/lists/eclipse-pmc/msg03821.html.
Because vscode-java depends on the Eclipse JDT.LS, the same requirement applies to vscode-java but on a more agressive timeline: vscode-java usually consumes JDT.LS builds that depend on bleeding edge JDT features, effectively shipping pre-release versions of Eclipse Platform/JDT. As of July 22nd, 2020, Java 11 is now required for running vscode-java.
source: vscode
i am using remote ssh extension to connect to my remote VM (ubuntu on vagrant).
when i open Java file in remote-ssh ,i am getting error saying install Java 11.
i have the java 11 already in my vagrant.
i can see the following in my VM
$ update-java-alternatives -l
java-1.11.0-openjdk-amd64 1111 /usr/lib/jvm/java-1.11.0-openjdk-amd64
java-1.8.0-openjdk-amd64 1081 /usr/lib/jvm/java-1.8.0-openjdk-amd64
vagrant#vagrant:/usr/lib/jvm
$ ls
total 24K
drwxr-xr-x 4 root root 4.0K Feb 21 2020 .
drwxr-xr-x 138 root root 4.0K Aug 13 17:57 ..
lrwxrwxrwx 1 root root 25 Feb 20 2019 default-java -> java-1.11.0-openjdk-amd64
lrwxrwxrwx 1 root root 21 Jan 15 2020 java-1.11.0-openjdk-amd64 -> java-11-openjdk-amd64
-rw-r--r-- 1 root root 2.0K Jan 15 2020 .java-1.11.0-openjdk-amd64.jinfo
drwxr-xr-x 7 root root 4.0K Feb 21 2020 java-11-openjdk-amd64
lrwxrwxrwx 1 root root 20 Jan 17 2020 java-1.8.0-openjdk-amd64 -> java-8-openjdk-amd64
-rw-r--r-- 1 root root 2.7K Jan 17 2020 .java-1.8.0-openjdk-amd64.jinfo
drwxr-xr-x 7 root root 4.0K Feb 21 2020 java-8-openjdk-amd64
all my java projects depends on java-8 so just to work with in vscode , i need Java-11.
please help me to setup this Env.
The easiest is to change your java config with the following command:
sudo alternatives --config java
and choose the Java version you want active.

Chromedriver has stopped working and says Driver info: chromedriver=81.0.4044.69 even though I have 81.0.4044.138 installed

Ignoring uncaught error SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 81
(Driver info: chromedriver=81.0.4044.69 (6813546031a4bc83f717a2ef7cd4ac6ec1199132-refs/branch-heads/4044#{#776}),platform=Mac OS X 10.15.4 x86_64)
Inside node_modules/protractor/node_modules/webdriver-manager/selenium/ I have:
-rw-r--r-- 1 account1 staff 94690 5 May 23:12 chrome-response.xml
-rwxr-xr-x 1 account1 staff 14786468 15 Mar 05:40 chromedriver_81.0.4044.138
-rw-r--r-- 1 account1 staff 7019279 5 May 23:12 chromedriver_81.0.4044.138.zip
-rw-r--r-- 1 account1 staff 397989 5 May 23:12 gecko-response.json
-rwxr-xr-x 1 account1 staff 5259056 10 Oct 2019 geckodriver-v0.26.0
-rw-r--r-- 1 account1 staff 2006880 5 May 23:12 geckodriver-v0.26.0.tar.gz
-rw-r--r-- 1 account1 staff 566 5 May 23:12 update-config.json
I have Version 81.0.4044.138 installed as I can see in chrome://settings/help
I've no idea where it's getting 81.0.4044.69 from...

Permission to access open document's enclosing folder in macOS

I am trying to make a Mac app where the user can open a document file and use keys or menus to scroll through the next/previous files in the directory (as some image viewer apps do with images).
I was trying to do this by getting the folder URL for the current main document window, and getting the list of files in the folder in order. But it seems I can't get permission to do this. I run
fullPaths = try fileManager.contentsOfDirectory(at: folderURL, includingPropertiesForKeys: nil)
and I get the error:
The file “Journal DF” couldn’t be opened because you don’t have permission to view it.
"Journal DF" is a folder. I have read/write permissions on it.
I found an Apple developer thread that suggests this might have to do with sandboxing: although I'm getting the open document itself from an NSOpenPanel, I'm not getting the folder contents from that panel, so it doesn't want to give me permission. It looks like I could change a setting to turn off this sandboxing, which would mean the file couldn't go in the Mac App Store. This is an app mainly intended for my personal use, so I'll do that if I have to, but is there any more elegant way to access the contents of the open document's folder?
Here is the result of ls -lea#hO on a folder that gives the error:
total 8480
drwxr-xr-x# 26 Main staff - 832B Jul 3 11:28 .
com.dropbox.attributes 83B
drwxrwxrwx# 267 Main staff - 8.3K Aug 7 08:30 ..
com.apple.FinderInfo 32B
-rw-r--r--# 1 Main staff - 10K Jul 3 11:28 .DS_Store
com.apple.FinderInfo 32B
drwxr-xr-x 11 Main staff - 352B Jul 29 18:19 Current Skeletons
-rw-r--r--# 1 Main staff - 30K May 24 16:14 Foundation sources and opposition.xlsx
com.apple.FinderInfo 32B
com.apple.quarantine 30B
-rw-r--r--# 1 Main staff - 34K Apr 8 2018 Foundations Lucidchart 8-Apr-2018.pdf
com.apple.metadata:_kMDItemUserTags 42B
com.apple.metadata:kMDItemWhereFroms 1.2K
com.apple.quarantine 68B
-rw-------# 1 Main staff - 22K Feb 19 2018 Foundations Lucidchart.pdf
com.apple.metadata:_kMDItemUserTags 42B
com.apple.quarantine 32B
-rw-r--r--# 1 Main staff - 261K Feb 19 2018 Foundations Lucidchart.vdx
com.apple.metadata:_kMDItemUserTags 42B
com.apple.metadata:kMDItemWhereFroms 1.2K
com.apple.quarantine 68B
-rw-r--r--# 1 Main staff - 61K Feb 6 2016 Foundations Skeleton 5.tbx
com.dropbox.attributes 83B
-rw-r--r--# 1 Main staff - 151K Apr 28 2015 Journal Foundations A.md
com.apple.lastuseddate#PS 16B
com.apple.quarantine 21B
com.dropbox.attributes 83B
com.metaclassy.byword.selectedRange 10B
-rw-r--r--# 1 Main staff - 500K Apr 15 2016 Journal Foundations C (Dakini's conflicted copy 2016-04-15).md
com.dropbox.attributes 83B
-rw-r--r--# 1 Main staff - 528K Jun 5 2017 Journal Foundations C.md
com.apple.TextEncoding 15B
com.apple.lastuseddate#PS 16B
com.apple.quarantine 21B
com.dropbox.attributes 83B
com.metaclassy.byword.selectedRange 11B
-rw-r--r--# 1 Main staff - 736K Sep 25 2017 Journal Foundations D.md
com.apple.TextEncoding 15B
com.apple.lastuseddate#PS 16B
com.apple.quarantine 21B
com.dropbox.attributes 83B
com.metaclassy.byword.selectedRange 11B
drwxr-xr-x# 524 Main staff - 16K Nov 25 2017 Journal Foundations E
com.dropbox.attributes 83B
drwxr-xr-x# 765 Main staff - 24K Dec 10 2017 Journal Foundations F
com.dropbox.attributes 83B
drwxr-xr-x# 885 Main staff - 28K May 25 2018 Journal Foundations G
com.dropbox.attributes 83B
drwxr-xr-x# 682 Main staff - 21K Sep 8 2018 Journal Foundations H
com.dropbox.attributes 83B
drwxr-xr-x# 641 Main staff - 20K Jun 26 14:41 Journal Foundations I
com.dropbox.attributes 83B
-rw-r--r--# 1 Main staff - 528K May 28 2017 Journal Synthesis A.md
com.apple.TextEncoding 15B
com.apple.lastuseddate#PS 16B
com.apple.quarantine 21B
com.dropbox.attributes 83B
com.metaclassy.byword.selectedRange 10B
drwxr-xr-x 213 Main staff - 6.7K Apr 17 21:40 Old Skeletons
-rw-r--r--# 1 Main staff - 1.2M May 17 2017 Reflect alias
com.apple.FinderInfo 32B
com.dropbox.attributes 83B
-rw-r--r-- 1 Main staff - 16K Jun 24 2017 True Foundations 1Sk.mellel
-rw-r--r--# 1 Main staff - 19K Feb 6 2018 True Foundations 2Sk.mellel
com.apple.metadata:kMDLabel_od4iyi2dtvvg7c4mdb6hnpcupi 105B
-rw-r--r--# 1 Main staff - 13K Aug 27 2014 foundations.mellel
com.apple.lastuseddate#PS 16B
com.dropbox.attributes 83B
-rw-r--r--# 1 Main staff - 13K May 10 2017 old discussion from pipeline.mellel
com.dropbox.attributes 83B
-rw-r--r--# 1 Main staff - 46K May 14 2017 parameter zero.mellel
com.dropbox.attributes 83B
Vadian's comment was correct: it is indeed about sandboxing. I looked up the process for security-scoped bookmarks and it seems way more complicated than I want to deal with, given that this app is primarily for my personal use. So I went into the .entitlements file and changed App Sandbox from YES to NO, and now it works as it was supposed to. That's good enough for me. If other people are having this problem and need to use the App Store, well, here's the info on security-scoped bookmarks and I hope it works for you.
Fist, let's check if that Apple thread fits your situation or not.
Compile your app, once compiled, give it full disk access via:
System Preferences -> Security & Privacy,
by adding it to the Full Disk Access applications list. (You are eliminating the first layer of security and allowing your app to access your Documents folder, pictures folder, desktop folder, music folder, contact folder and another 3 or 4 protected folders.
Attempt 1) Run it and try to browser files with it on any folder inside your home dir. See if it works or not.
Attempt 2) Also is valid to test it to browse files on any usb stick (because they don't have permissions flags). See if it works on USB Sticks
If it still says you don't have permissions, post your results and more details about your system version, and if possible, a result from terminal of the command ls -lea#hO /path/to/folder of the folder where it is giving error, so we can check the Unix/ACL and sandbox permissions of that folder.

bluemix-appid No such module"BluemixAppID'

I am setting up APP ID on IOS Swift Project.
Set up the Pods, and seeing BluemixAppID in the Pods.
Set up the URLS etc
Added the error and the framework search path below
POD File
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'
target 'PS_1' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
pod 'BluemixAppID'
target 'PS_1Tests' do
inherit! :search_paths
# Pods for testing
end
target 'PS_1UITests' do
inherit! :search_paths
# Pods for testing
end
end
Project Dir
drwxr-xr-x 4 kosalan staff 136 22 Jul 23:54 DerivedData
drwxr-xr-x 11 kosalan staff 374 23 Jul 00:08 PS_1
drwxr-xr-x 5 kosalan staff 170 23 Jul 00:03 PS_1.xcodeproj
drwxr-xr-x 3 kosalan staff 102 22 Jul 22:39 PS_1.xcworkspace
drwxr-xr-x 4 kosalan staff 136 28 May 13:13 PS_1Tests
drwxr-xr-x 4 kosalan staff 136 28 May 13:13 PS_1UITests
-rw-r--r--# 1 kosalan staff 415 22 Jul 23:32 Podfile
-rw-r--r-- 1 kosalan staff 422 22 Jul 23:33 Podfile.lock
drwxr-xr-x 11 kosalan staff 374 22 Jul 23:32 Pods
-rw-r--r-- 1 kosalan staff 7 28 May 13:19 README.md
Kosalans-MBP:PS_1 kosalan$ pwd
/Users/kosalan/Documents/Projects/PS_1/PS_1
Kosalans-MBP:PS_1 kosalan$
Kosalans-MBP:Pods kosalan$ ls -l
total 8
drwxr-xr-x 5 kosalan staff 170 22 Jul 22:43 BMSAnalyticsAPI
drwxr-xr-x 5 kosalan staff 170 22 Jul 22:43 BMSCore
drwxr-xr-x 5 kosalan staff 170 22 Jul 23:30 BluemixAppID
drwxr-xr-x 2 kosalan staff 68 22 Jul 23:32 Headers
drwxr-xr-x 2 kosalan staff 68 22 Jul 22:38 Local Podspecs
-rw-r--r-- 1 kosalan staff 422 22 Jul 23:33 Manifest.lock
drwxr-xr-x 4 kosalan staff 136 22 Jul 22:38 Pods.xcodeproj
drwxr-xr-x 8 kosalan staff 272 22 Jul 23:33 Target Support Files
Kosalans-MBP:Pods kosalan$
xcode screenshot - framework search paths
xcode screenshot - error along with full build settings
This is fixed by opening .xcworkspace in the proj dir vs the .xcodeproj.

WAL-E: Cannot restart postgresql after backup-fetch

This is on Ubuntu 14.04 LTS
EDIT:
WAL-E installed using pip, with secret keys managed by envdir, according to the instructions https://gist.github.com/elithrar/8682235 and https://github.com/wal-e/wal-e#dependencies.
I am trying to restore a database using WAL-E, and everything appears to go well initially, as I have Postgres installed and running, and can easily create or restore a database and access it locally and remotely via pgadmin. Where it goes bad is when I try to perform a restore from an S3 backup using wal-e fetch-backup. It appears to go well up until the point of starting the postgres.
There are a number of errors that come up, appearing to be either missing packages or permissions issues, like the following:
* Starting PostgreSQL 9.3 database server
* The PostgreSQL server failed to start. Please check the log output:
2015-07-11 00:41:11 EDT LOG: database system was interrupted; last known up at 2015-06-30 05:00:02 EDT
2015-07-11 00:41:11 EDT LOG: starting archive recovery
Traceback (most recent call last):
File "/usr/local/bin/wal-e", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3084, in <module>
#_call_aside
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3070, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3097, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 651, in _build_master
ws.require(__requires__)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 952, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 847, in resolve
new_requirements = dist.requires(req.extras)[::-1]
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2602, in requires
dm = self._dep_map
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2803, in _dep_map
self.__dep_map = self._compute_dependencies()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2825, in _compute_dependencies
for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2794, in _parsed_pkg_info
metadata = self.get_metadata(self.PKG_INFO)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1617, in get_metadata
return self._get(self._fn(self.egg_info, name))
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1728, in _get
with open(path, 'rb') as stream:
IOError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/six-1.9.0.dist-info/METADATA'
2015-07-11 00:41:11 EDT LOG: invalid checkpoint record
2015-07-11 00:41:11 EDT FATAL: could not locate required checkpoint record
2015-07-11 00:41:11 EDT HINT: If you are not restoring from a backup, try removing the file "/var/lib/postgresql/9.3/main/backup_label".
2015-07-11 00:41:11 EDT LOG: startup process (PID 1693) exited with exit code 1
2015-07-11 00:41:11 EDT LOG: aborting startup due to startup process failure
I had several of these and was able to resolve them by changing the group and modifying the permissions on the noted files to match others in the directory, but I suspect the problem has more to do with how and/or where these packages were installed. After resolving the above issue, postgres still fails to start up, returning the following:
* Starting PostgreSQL 9.3 database server
* The PostgreSQL server failed to start. Please check the log output:
2015-07-11 00:30:04 EDT LOG: database system was interrupted; last known up at 2015-06-30 05:00:02 EDT
2015-07-11 00:30:04 EDT LOG: starting archive recovery
Traceback (most recent call last):
File "/usr/local/bin/wal-e", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3084, in <module>
#_call_aside
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3070, in _call_aside
f(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 3097, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 651, in _build_master
ws.require(__requires__)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 952, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 839, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'wal-e==0.8.1' distribution was not found and is required by the application
2015-07-11 00:30:04 EDT LOG: invalid checkpoint record
2015-07-11 00:30:04 EDT FATAL: could not locate required checkpoint record
2015-07-11 00:30:04 EDT HINT: If you are not restoring from a backup, try removing the file "/var/lib/postgresql/9.3/main/backup_label".
2015-07-11 00:30:04 EDT LOG: startup process (PID 1495) exited with exit code 1
2015-07-11 00:30:04 EDT LOG: aborting startup due to startup process failure
It is complaining about the 'wal-e==0.8.1' distribution was not found..., but it is clearly installed and executable:
ls -l /usr/local/lib/python2.7/dist-packages
total 608
drwxr-sr-x 2 root staff 4096 Jul 10 20:14 argparse-1.3.0.dist-info
-rw-r--r-- 1 root staff 88400 Jul 10 20:14 argparse.py
-rw-r--r-- 1 root staff 65659 Jul 10 20:14 argparse.pyc
drwxr-sr-x 6 root staff 4096 Jul 9 22:36 azure
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 azure-0.11.1.egg-info
drwxr-sr-x 5 root staff 4096 Jul 9 22:36 babel
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 Babel-1.3.egg-info
drwxr-sr-x 57 root staff 4096 Jul 9 22:36 boto
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 boto-2.38.0.dist-info
drwxr-sr-x 3 root staff 4096 Jul 9 22:36 concurrent
drwxr-sr-x 3 root staff 4096 Jul 9 22:36 dateutil
drwxr-sr-x 3 root staff 4096 Jul 9 22:36 debtcollector
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 debtcollector-0.5.0.dist-info
-rw-r--r-- 1 root staff 207 Jul 10 20:10 easy-install.pth
-rw-r--r-- 1 root staff 126 Jul 10 20:33 easy_install.py
-rw-r--r-- 1 root staff 315 Jul 10 20:33 easy_install.pyc
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 futures-3.0.3.dist-info
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 gevent
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 gevent-1.0.2.egg-info
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 greenlet-0.4.7.egg-info
-rwxr-xr-x 1 root staff 82869 Jul 9 22:36 greenlet.so
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 iso8601
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 iso8601-0.1.10.egg-info
drwxr-sr-x 15 root staff 4096 Jul 9 22:36 keystoneclient
drwxr-sr-x 2 root staff 4096 Jul 10 20:33 _markerlib
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 msgpack
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 msgpack_python-0.4.6.egg-info
drwxr-sr-x 5 root staff 4096 Jul 9 22:36 netaddr
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 netaddr-0.7.15.dist-info
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 netifaces-0.10.4.egg-info
-rwxr-xr-x 1 root staff 58386 Jul 9 22:36 netifaces.so
drwxr-sr-x 4 root staff 4096 Jul 9 22:36 oslo
drwxr-sr-x 3 root staff 4096 Jul 9 22:36 oslo_config
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 oslo.config-1.14.0.dist-info
-rw-r--r-- 1 root root 299 Jul 9 22:35 oslo.config-1.14.0-py2.7-nspkg.pth
drwxr-sr-x 3 root staff 4096 Jul 9 22:36 oslo_i18n
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 oslo.i18n-2.1.0.dist-info
drwxr-sr-x 3 root staff 4096 Jul 9 22:36 oslo_serialization
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 oslo.serialization-1.7.0.dist-info
drwxr-sr-x 3 root staff 4096 Jul 9 22:36 oslo_utils
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 oslo.utils-1.8.0.dist-info
-rw-r--r-- 1 root root 299 Jul 9 22:35 oslo.utils-1.8.0-py2.7-nspkg.pth
drwxr-sr-x 5 root staff 4096 Jul 10 20:14 pbr
drwxr-sr-x 2 root staff 4096 Jul 10 20:14 pbr-1.3.0.dist-info
drwxr-sr-x 4 root staff 4096 Jul 10 20:10 pip-7.1.0-py2.7.egg
drwxr-sr-x 3 root staff 4096 Jul 10 20:33 pkg_resources
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 python_dateutil-2.4.2.dist-info
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 python_keystoneclient-1.6.0.dist-info
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 python_swiftclient-2.4.0.dist-info
drwxr-sr-x 3 root staff 4096 Jul 9 22:36 pytz
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 pytz-2015.4.dist-info
drwxr-sr-- 3 root staff 4096 Jul 9 23:25 requests
drwxr-sr-- 2 root staff 4096 Jul 9 23:25 requests-2.7.0.dist-info
drwxr-sr-x 3 root staff 4096 Jul 10 20:33 setuptools
drwxr-sr-x 2 root staff 4096 Jul 10 20:33 setuptools-18.0.1.dist-info
drwxr-sr-x 3 root staff 4096 Jul 9 22:36 simplejson
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 simplejson-3.7.3.egg-info
drwxr-sr-- 2 root staff 4096 Jul 9 23:26 six-1.9.0.dist-info
-rw-r--r-- 1 root root 29664 Jul 9 23:26 six.py
-rw-r--r-- 1 root root 29006 Jul 9 23:26 six.pyc
drwxr-sr-x 4 root staff 4096 Jul 9 22:36 stevedore
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 stevedore-1.6.0.dist-info
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 swiftclient
drwxr-sr-x 7 root staff 4096 Jul 9 22:35 wal_e
drwxr-sr-x 2 root staff 4096 Jul 9 22:35 wal_e-0.8.1.egg-info
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 wrapt
drwxr-sr-x 2 root staff 4096 Jul 9 22:36 wrapt-1.10.5.egg-info
I have done quite a bit of searching, but haven't found anything that helps. Any suggestions or points in the right direction are appreciated.
Additionally, it would be of great interest to solve this to ensure that my primary installation will behave in the event that a restoration is necessary. Backing up is pointless if I can't restore it.
I am not entirely sure what resolved the The 'wal-e==0.8.1' distribution was not found errro, but on rebooting I never saw that again.
Aside from that, fixing this was rather straightforward.
The executable bit on a number of python distributions was not set.
Chowning these fixed the error:
chmod o+x /usr/local/lib/python2.7/dist-packages/requests-2.7.0.dist-info/
chmod o+x /usr/local/lib/python2.7/dist-packages/requests
...
Reason backup_label is not created properly
Run the below command in your Master
su postgres
psql -c "select pg_start_backup('initial_backup');"
rsync -cva --inplace --exclude=pg_xlog
/var/lib/postgresql/9.1/main/
slave_IP_address:/var/lib/postgresql/9.1/main/
psql -c "select pg_stop_backup();"
cd /var/lib/postgresql/9.1/main
create file name recovery.conf add the below lines
standby_mode = 'on'
primary_conninfo = 'host=master_IP_address
port=5432 user=rep password=yourpassword' trigger_file =
'/tmp/postgresql.trigger.5432'
service postgresql restart