ServiceMix 5.1 example bundle fails after update - apache-karaf

Exemple examples\activemq\activemq-camel-blueprint fails after being updated. My own blueprint bundles also fails in the same conditions.
karaf#root> features:install examples-activemq-camel-blueprint
karaf#root> >>>> ActiveMQ-Blueprint-Example set body: Fri Sep 12 18:11:16 CEST 2014
>>>> ActiveMQ-Blueprint-Example set body: Fri Sep 12 18:11:18 CEST 2014
>>>> ActiveMQ-Blueprint-Example set body: Fri Sep 12 18:11:20 CEST 2014
karaf#root> stop 381
[ 381] [Resolved ] [ ] [ ] [ 80] Apache ServiceMix :: Examples :: ActiveMQ Camel Blueprint (5.1.0)
karaf#root> update 381
karaf#root> start 381
18:13:53,156 | ERROR | Thread-65 | BlueprintContainerImpl | 7 - org.apache.aries.blueprint.core - 1.4.0 | Unable to start blueprint container for bundle activemq-camel-blueprint
org.osgi.service.blueprint.container.ComponentDefinitionException: java.lang.NullPointerException
at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:122)
at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_45]
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)
at org.apache.aries.blueprint.container.BeanRecipe.setProperty(BeanRecipe.java:933)
at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:907)
at org.apache.aries.blueprint.container.BeanRecipe.setProperties(BeanRecipe.java:888)
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:820)
at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:787)
at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:79)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)[:1.7.0_45]
at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:88)
at org.apache.aries.blueprint.container.BlueprintRepository.createInstances(BlueprintRepository.java:245)
at org.apache.aries.blueprint.container.BlueprintRepository.createInstance(BlueprintRepository.java:230)
at org.apache.aries.blueprint.container.BlueprintRepository.create(BlueprintRepository.java:155)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.processProcessors(BlueprintContainerImpl.java:527)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:361)
at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:269)
at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:276)
at org.apache.aries.blueprint.container.BlueprintExtender.createContainer(BlueprintExtender.java:245)
at org.apache.aries.blueprint.container.BlueprintExtender.modifiedBundle(BlueprintExtender.java:235)
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:500)
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.customizerModified(BundleHookBundleTracker.java:433)
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$AbstractTracked.track(BundleHookBundleTracker.java:725)
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$Tracked.bundleChanged(BundleHookBundleTracker.java:463)
at org.apache.aries.util.tracker.hook.BundleHookBundleTracker$BundleEventHook.event(BundleHookBundleTracker.java:422)
at org.apache.felix.framework.util.SecureAction.invokeBundleEventHook(SecureAction.java:1103)
at org.apache.felix.framework.util.EventDispatcher.createWhitelistFromHooks(EventDispatcher.java:695)
at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:483)
at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4244)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1923)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:944)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:931)
at org.apache.karaf.shell.osgi.StartBundle.doExecute(StartBundle.java:37)
at org.apache.karaf.shell.osgi.BundlesCommand.doExecute(BundlesCommand.java:37)
at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[15:org.apache.karaf.shell.console:2.3.4]
at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[15:org.apache.karaf.shell.console:2.3.4]
at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[15:org.apache.karaf.shell.console:2.3.4]
at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[15:org.apache.karaf.shell.console:2.3.4]
at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[15:org.apache.karaf.shell.console:2.3.4]
at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[15:org.apache.karaf.shell.console:2.3.4]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[15:org.apache.karaf.shell.console:2.3.4]
at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[15:org.apache.karaf.shell.console:2.3.4]
at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)
at org.apache.karaf.shell.console.jline.Console.run(Console.java:183)
at java.lang.Thread.run(Thread.java:744)[:1.7.0_45]
at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$4.doRun(ShellFactoryImpl.java:144)[47:org.apache.karaf.shell.ssh:2.3.4]
at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$4$1.run(ShellFactoryImpl.java:135)
at java.security.AccessController.doPrivileged(Native Method)[:1.7.0_45]
at javax.security.auth.Subject.doAs(Subject.java:356)[:1.7.0_45]
at org.apache.karaf.shell.ssh.ShellFactoryImpl$ShellImpl$4.run(ShellFactoryImpl.java:133)[47:org.apache.karaf.shell.ssh:2.3.4]
Caused by: java.lang.NullPointerException
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1432)
at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
at java.lang.ClassLoader.loadClass(ClassLoader.java:412)[:1.7.0_45]
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)[:1.7.0_45]
at java.lang.Class.forName0(Native Method)[:1.7.0_45]
at java.lang.Class.forName(Class.java:270)[:1.7.0_45]
at org.apache.aries.proxy.impl.interfaces.ProxyClassLoader.isInvalid(ProxyClassLoader.java:109)
at org.apache.aries.proxy.impl.interfaces.InterfaceProxyGenerator.getProxyInstance(InterfaceProxyGenerator.java:84)
at org.apache.aries.proxy.impl.AsmProxyManager.createNewProxy(AsmProxyManager.java:72)
at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingInterceptingProxy(AbstractProxyManager.java:75)
at org.apache.aries.proxy.impl.AbstractProxyManager.createDelegatingProxy(AbstractProxyManager.java:40)
at org.apache.aries.blueprint.container.AbstractServiceReferenceRecipe.createProxy(AbstractServiceReferenceRecipe.java:338)
at org.apache.aries.blueprint.container.ReferenceRecipe.internalCreate(ReferenceRecipe.java:106)
... 50 more

Related

Weird mercurial Graph

Im trying to interpret a mercurial repository and more specific its Graph. Most of what happened is clear to me, but there are two places, where I need some help understanding what happened.
Problem A: "mq"
o changeset: 93:b0aa6f2898b6
| parent: 91:88cca7c8f32e
| user: test <test#gmail.com>
| date: Tue Feb 19 13:36:00 2019 +0100
| summary: some message
|
| o changeset: 92:0aff2e92ec57
|/ user: test <test#gmail.com>
| date: Tue Feb 12 18:10:10 2019 +0100
| summary: [mq]: 2019-02-12_18-10-04_r91+.diff
|
o changeset: 91:88cca7c8f32e
| user: test <test#gmail.com>
| date: Tue Feb 12 18:09:49002019 +0100
| summary: some message
|
Question 1: What is the meaning of changeset 92. Is this comparable to a rewinded commit in git?
Question 2: What does mq mean in this context?
Problem B: Timestamp that does not match with parent!
o changeset: 62:143401518e68
| parent: 60:327ffdb4b8c3
| user: test <test#gmail.com>
| date: Fri Nov 16 21:19:00 2018 +0100
| summary: some message
|
| o changeset: 61:b4a37ff37688
|/ user: test <test#gmail.com>
| date: Fri Nov 16 16:00:00 2018 +0100
| summary: some message
|
o changeset: 60:327ffdb4b8c3
| user: test <test#gmail.com>
| date: Fri Nov 16 18:10:00 2018 +0100
| summary: some message
|
Question 3: How do I have to interpret the timestamp of changeset 61? Should the timestamp of 61 be between the timestamps of changeset 60 and 62?
Thanks for all suggestions!
Problem A: "mq"
A1+A2: I suppose, it is commit (hg commit --mq), related to using Mercurial Queues extension, which is separate long topic of queues|patches etc. And now you try to understand repo, which used MQ, with your Mercurial without MQ extension enabled (which is tricky task)
No, mq and 0aff2e92ec57 hasn't any relation with git's rewinded commit and serve another role (I'm too lazy to repeat tutorial here)
Problem B: Timestamp that does not match with parent!
A3: As #ecm already noted, timestamps of changesets have near-zero value, because it can be changed|redefined

The ClassNotFoundException when running a jar from command line

I am not sure what is missing from this jar file but when I try to run the jar from the command line, it cannot load the main entry point:
This is the directory that contains the classes and the resources for my application.
C:\Users\hrh74\Documents\ABack up\NetBeansProjects\mavenfxedittableview\target\classes\org\openjfx\mavenfxedittableview
09/04/2020 08:48 PM <DIR> .
09/04/2020 08:48 PM <DIR> ..
09/03/2020 04:24 PM 2,502 addressBookData.xml
09/02/2020 05:52 PM 9,562 Address_Book.png
09/02/2020 05:52 PM 859 birthdaystatistic.fxml
09/02/2020 05:52 PM 3,274 BirthdaystatisticController.class
09/02/2020 05:52 PM 3,224 DarkTheme.css
09/02/2020 05:52 PM 2,072 DateUtil.class
09/02/2020 05:52 PM 1,214 LocalDateAdapter.class
09/02/2020 05:52 PM 3,523 Person.class
09/02/2020 05:52 PM 4,535 personeditdialog.fxml
09/02/2020 05:52 PM 5,128 PersoneditdialogController.class
09/02/2020 05:52 PM 1,029 PersonListWrapper.class
09/02/2020 05:52 PM 6,412 personoverview.fxml
09/02/2020 05:52 PM 1,904 rootlayout.fxml
09/02/2020 05:52 PM 4,490 RootlayoutController.class
09/02/2020 05:52 PM 9,060 TableEditApp.class
09/02/2020 05:52 PM 6,812 TableVieweditController.class
16 File(s) 65,600 bytes
2 Dir(s) 57,686,331,392 bytes free
I created an app.jar for my application and specified the application's main entry class.
C:\Users\hrh74\Documents\ABack up\NetBeansProjects\mavenfxedittableview\target
\classes\org\openjfx>jar cvfe app.jar TableEditApp.class -C mavenfxedittableview .
added manifest
adding: addressBookData.xml(in = 2502) (out= 376)(deflated 84%)
adding: Address_Book.png(in = 9562) (out= 9567)(deflated 0%)
adding: birthdaystatistic.fxml(in = 859) (out= 372)(deflated 56%)
adding: BirthdaystatisticController.class(in = 3274) (out= 1544)(deflated 52%)
adding: DarkTheme.css(in = 3224) (out= 826)(deflated 74%)
adding: DateUtil.class(in = 2072) (out= 941)(deflated 54%)
adding: LocalDateAdapter.class(in = 1214) (out= 537)(deflated 55%)
adding: Person.class(in = 3523) (out= 1277)(deflated 63%)
adding: personeditdialog.fxml(in = 4535) (out= 872)(deflated 80%)
adding: PersoneditdialogController.class(in = 5128) (out= 2418)(deflated 52%)
adding: PersonListWrapper.class(in = 1029) (out= 485)(deflated 52%)
adding: personoverview.fxml(in = 6412) (out= 1149)(deflated 82%)
adding: rootlayout.fxml(in = 1904) (out= 542)(deflated 71%)
adding: RootlayoutController.class(in = 4490) (out= 2097)(deflated 53%)
adding: TableVieweditController.class(in = 6812) (out= 2835)(deflated 58%)
The app.jar created successfully. Here is the content of META-INF/MANIFEST.MF file.
Manifest-Version: 1.0
Created-By: 14.0.2 (Oracle Corporation)
Main-Class: TableEditApp.class
Here is my classpath having the current directory '.' in the beginning.
.;C:\Users\hrh74\Documents\ABack up\NetBeansProjects\javalearning\build\classes;C:\Program Files\Java\jdk-14.0.2;C:\Program Files\Java\jdk-14.0.2\bin;C:\Program Files (x86)\Java\jre1.8.0_251\bin;C:\Program Files\Java\jdk-14.0.2\lib;
When I list the content of the jar file, all the classes are properly packaged in the jar.
C:\Users\hrh74\Documents\ABack up\NetBeansProjects\mavenfxedittableview\target\classes\org\openjfx>jar tvf app.jar
0 Fri Sep 04 23:22:18 IRDT 2020 META-INF/
98 Fri Sep 04 23:22:18 IRDT 2020 META-INF/MANIFEST.MF
2502 Thu Sep 03 16:24:22 IRDT 2020 addressBookData.xml
9562 Wed Sep 02 17:52:36 IRDT 2020 Address_Book.png
859 Wed Sep 02 17:52:36 IRDT 2020 birthdaystatistic.fxml
3274 Wed Sep 02 17:52:40 IRDT 2020 BirthdaystatisticController.class
3224 Wed Sep 02 17:52:36 IRDT 2020 DarkTheme.css
2072 Wed Sep 02 17:52:40 IRDT 2020 DateUtil.class
1214 Wed Sep 02 17:52:38 IRDT 2020 LocalDateAdapter.class
3523 Wed Sep 02 17:52:38 IRDT 2020 Person.class
4535 Wed Sep 02 17:52:36 IRDT 2020 personeditdialog.fxml
5128 Wed Sep 02 17:52:40 IRDT 2020 PersoneditdialogController.class
1029 Wed Sep 02 17:52:40 IRDT 2020 PersonListWrapper.class
6412 Wed Sep 02 17:52:36 IRDT 2020 personoverview.fxml
1904 Wed Sep 02 17:52:36 IRDT 2020 rootlayout.fxml
4490 Wed Sep 02 17:52:38 IRDT 2020 RootlayoutController.class
9060 Wed Sep 02 17:52:38 IRDT 2020 TableEditApp.class
6812 Wed Sep 02 17:52:38 IRDT 2020 TableVieweditController.class
Finally, when I run the application from the command line using java –jar app.jar, I get the ClassNotFoundException.
C:\Users\hrh74\Documents\ABack up\NetBeansProjects\mavenfxedittableview\target\classes\org\openjfx>java -jar app.jar
Error: Could not find or load main class TableEditApp.class
Caused by: java.lang.ClassNotFoundException: TableEditApp.class
I tried to adhere to the spec to the best of my knowledge, so I am not sure why this is not working. Any idea, what might be causing this exception?
Thanks in advance.
I discovered something interesting in respect to the HelloWorld.java that I mentioned in my last comment. I abandoned using the "jar cvfe" and instead created a file name mymanifest.txt and placed the name of the class with the main entry as "Main-Class: org.me.HelloWorld" followed by two blank lines (per specification). I packaged the jar using the "jar cvmf" instead of "jar cvfe" and it WORKED FINE. I then applied the same method to my application jar creation, and now I am getting a Linkage Error instead of ClassNotFoundException. Perhaps, it has something to do with the JavaFX library that I have to investigate deeper. In summary, I suspect that the "jar cvfe" switch might not be working as described in the Java tutorial. I have had found errors in the tutorial in the past and this MIGHT be another one.
Anyway, thank you all for your comments.

Snakemake: R script fails (almost) immediately

Once more I'm encountering an error in my snakemake workflow that doesn't make any sense to me.
This is the error I get:
[Thu Jan 25 10:47:00 2018] Building DAG of jobs...
[Thu Jan 25 10:47:01 2018] Provided cores: 24
[Thu Jan 25 10:47:01 2018] Rules claiming more threads will be scaled down.
[Thu Jan 25 10:47:01 2018] Job counts:
[Thu Jan 25 10:47:01 2018] count jobs
[Thu Jan 25 10:47:01 2018] 1 merging_seurat
[Thu Jan 25 10:47:01 2018] 1
[Thu Jan 25 10:47:01 2018] Job 0: --- Merging samples using seurat.
Error in setClass("Snakemake", slots = c(input = "list", output = "list", :
unused argument(s) (slots = c(input = "list", output = "list", params = "list", wildcards = "list", threads = "numeric", log = "list", resources = "list", config = "list", rule = "character"))
Execution halted
[Thu Jan 25 10:47:02 2018] Error in rule merging_seurat:
[Thu Jan 25 10:47:02 2018] jobid: 0
[Thu Jan 25 10:47:02 2018] output: merging_seurat/12_top10_heatmap_all_wilcox.pdf, merging_seurat/13_top10_heatmap_all_roc.pdf, merging_seurat/merging_seurat.RData
[Thu Jan 25 10:47:02 2018] RuleException:
[Thu Jan 25 10:47:02 2018] CalledProcessError in line 372 of .../snakemake_pipeline/Snakefile:
[Thu Jan 25 10:47:02 2018] Command ' set -euo pipefail; Rscript .../snakemake_pipeline/scripts/.snakemake.jv8ijpiw.merging_seurat.R ' returned non-zero exit status 1
[Thu Jan 25 10:47:02 2018] File ".../snakemake_pipeline/Snakefile", line 372, in __rule_merging_seurat
[Thu Jan 25 10:47:02 2018] File ".../tools/anaconda3/envs/Seurat/lib/python3.5/concurrent/futures/thread.py", line 55, in run
[Thu Jan 25 10:47:02 2018] Will exit after finishing currently running jobs.
[Thu Jan 25 10:47:02 2018] Exiting because a job execution failed. Look above for error message
[Thu Jan 25 10:47:02 2018] Complete log: .../snakemake_6/.snakemake/log/2018-01-25T104700.498155.snakemake.log
This is the rule in question:
rule merging_seurat:
input: expand("{sample}/molecule_count/counts_wide.tsv", sample=config["samples"]),
output: "merging_seurat/12_top10_heatmap_all_wilcox.pdf",
"merging_seurat/13_top10_heatmap_all_roc.pdf",
"merging_seurat/merging_seurat.RData"
message: "--- Merging samples using seurat."
script: "scripts/merging_seurat.R"
Here we have the top of the R script that is still executed:
sink('merging_seurat/output.txt')
print(installed.packages())
print(sessionInfo())
sink()
And these are the following lines in the R script that are not executed anymore:
library('Seurat')
library('dplyr')
library('org.Hs.eg.db')
Because I logged the packages that are available, I know that the three packages that should be loaded are also installed so it shouldn't fail because of that. In fact, commenting these lines out doesn't change anything, the script still breaks and the log message that should come right after loading the packages is not written to the log file.
Finally, this is the command that I use to run snakemake:
snakemake --use-conda \
--latency-wait 90 \
--rerun-incomplete \
--keep-going \
--timestamp \
--cluster-config SGE.json \
--cluster "qsub -cwd -N {cluster.name} -l h_vmem={cluster.h_vmem},h_stack=256M -o {cluster.stdout}{cluster.name}.o -e {cluster.stderr}{cluster.name}.e -m {cluster.mailtype} -M {cluster.mailuser}" \
-j 8 \
--directory .../snakemake_6
Does anybody have a clue what the error message could mean? unused argument of the snakemake R object is strange because I'm calling multiple parameters later on in the script.
What is even more strange is that I have another R script that works with different packages but has very similar first lines runs fine. I remember that in the beginning I had the same problem with that script (same error message) but don't remember how I solved it.
Any help is well appreciated.

How to inspect the explicit dependencies of a patch in darcs?

As we know, explicit patch dependencies can be recorded by darcs record --ask-deps. (A use I see for this is preventing situations where "It's easy to move a patch that uses a feature to a point before the feature is introduced.".)
So, having a repo where I should have made such deps, I want to check whether it's true. How do I inspect the recorded explicit dependencies of a selected patch?
Google could find me some code in Darcs/UI/Commands/Rebase.hs which prints a warning if a patch had such deps, but I don't know yet if there is a stand-alone command that would just give this information (not coupled to an action):
where doAdd :: (RepoPatch p, ApplyState p ~ Tree)
=> Repository (Rebasing p) wR wU wT
-> FL (WDDNamed p) wT wT2
-> HijackT IO (Repository (Rebasing p) wR wU wT2, FL (RebaseName p) wT2 wT2)
doAdd repo NilFL = return (repo, NilFL)
doAdd repo ((p :: WDDNamed p wT wU) :>:ps) = do
case wddDependedOn p of
[] -> return ()
deps -> liftIO $ do
-- It might make sense to only print out this message once, but we might find
-- that the dropped dependencies are interspersed with other output,
-- e.g. if running with --ask-deps
putStr $ "Warning: dropping the following explicit "
++ englishNum (length deps) (Noun "dependency") ":\n\n"
let printIndented n =
mapM_ (putStrLn . (replicate n ' '++)) . lines .
renderString Encode . showPatchInfo
putStrLn . renderString Encode . showPatchInfo .
patch2patchinfo $ wddPatch p
putStr " depended on:\n"
mapM_ (printIndented 2) deps
putStr "\n"
...
Perhaps, a command that outputs a .dpatch would include this information in the dpatch. I should check this now.
Neither darcs log -v (http://bugs.darcs.net/issue959) nor darcs diff outputs this information according to my experiments.
One way is to output a .dpatch with darcs send, and look into it.
It's not a very convenient way, because
darcs send needs a target repo (even with -o FILE.dpatch);
several patches get into the bundle, instead of the single one we want to inspect...
Here is an example (I've also checked that darcs log -v doesn't give the information about the explicit dependencies):
Preparation:
$ mkdir test-darcs-deps
$ cd test-darcs-deps/
$ darcs init
$ echo a > a
$ darcs add a
$ darcs rec -m A
$ echo b > b
$ darcs add b
$ darcs rec -m B
Recording the explicit dependency:
$ echo b2 > b
$ darcs rec --ask-deps
hunk ./b 1
-b
+b2
Shall I record this change? (1/1) [ynW...], or ? for more options: y
Do you want to record these changes? [Yglqk...], or ? for more options: y
patch 1f59d082f61f1fb8d57f5f5199869d1fc21b2435
Author: Ivan Zakharyaschev <imz#altlinux.org>
Date: Sat Jan 9 01:28:07 MSK 2016
* A
Shall I depend on this patch? (1/1) [ynW...], or ? for more options: y
Do you want to depend on these patches? [Yglqk...], or ? for more options: y
Finished recording patch 'B2'
Inspecting the deps (I had to refer to a non-related darcs repo in
order for darcs send to work!):
$ darcs send -o ../test-darcs-deps.dpatch
Missing argument: [REPOSITORY]
Usage: darcs send [OPTION]... [REPOSITORY]
Prepare a bundle of patches to be applied to some target repository.
See darcs help send for details.
$ darcs send -o ../test-darcs-deps.dpatch ../test-darcs
HINT: if you want to change the default remote repository to
/home/imz/tests/test-darcs,
quit now and issue the same command with the --set-default flag.
patch 1f59d082f61f1fb8d57f5f5199869d1fc21b2435
Author: Ivan Zakharyaschev <imz#altlinux.org>
Date: Sat Jan 9 01:28:07 MSK 2016
* A
A ./a
Shall I send this patch? (1/3) [ynW...], or ? for more options: w
patch 151c8321b2bc36df7ba09dcab0d17c853ed31577
Author: Ivan Zakharyaschev <imz#altlinux.org>
Date: Sat Jan 9 01:28:32 MSK 2016
* B
A ./b
Shall I send this patch? (2/3) [ynW...], or ? for more options: w
patch f697ac56e8241f5a906c010650b683638944ebf2
Author: Ivan Zakharyaschev <imz#altlinux.org>
Date: Sat Jan 9 01:28:50 MSK 2016
* B2
M ./b -1 +1
Shall I send this patch? (3/3) [ynW...], or ? for more options: y
Do you want to send these patches? [Yglqk...], or ? for more options: l
---- Already selected patches ----
patch 151c8321b2bc36df7ba09dcab0d17c853ed31577
Author: Ivan Zakharyaschev <imz#altlinux.org>
Date: Sat Jan 9 01:28:32 MSK 2016
* B
A ./b
patch 1f59d082f61f1fb8d57f5f5199869d1fc21b2435
Author: Ivan Zakharyaschev <imz#altlinux.org>
Date: Sat Jan 9 01:28:07 MSK 2016
* A
A ./a
patch f697ac56e8241f5a906c010650b683638944ebf2
Author: Ivan Zakharyaschev <imz#altlinux.org>
Date: Sat Jan 9 01:28:50 MSK 2016
* B2
M ./b -1 +1
---- end of already selected patches ----
Do you want to send these patches? [Yglqk...], or ? for more options: y
Minimizing context, to send with full context hit ctrl-C...
File content did not change. Continue anyway? [yn]y
The dependency can be seen in angle brackets in the output:
[B2
Ivan Zakharyaschev <imz#altlinux.org>**20160108222850
Ignore-this: e8693b796cd3cac50bb19f4458ddb323
]
<
[A
Ivan Zakharyaschev <imz#altlinux.org>**20160108222807
Ignore-this: 613cadd9266dac24e2bcd2dde97d969a
]
> hunk ./b 1
-b
+b2
Here is the full output:
3 patches for repository /home/imz/tests/test-darcs:
patch 151c8321b2bc36df7ba09dcab0d17c853ed31577
Author: Ivan Zakharyaschev <imz#altlinux.org>
Date: Sat Jan 9 01:28:32 MSK 2016
* B
patch 1f59d082f61f1fb8d57f5f5199869d1fc21b2435
Author: Ivan Zakharyaschev <imz#altlinux.org>
Date: Sat Jan 9 01:28:07 MSK 2016
* A
patch f697ac56e8241f5a906c010650b683638944ebf2
Author: Ivan Zakharyaschev <imz#altlinux.org>
Date: Sat Jan 9 01:28:50 MSK 2016
* B2
New patches:
[B
Ivan Zakharyaschev <imz#altlinux.org>**20160108222832
Ignore-this: 9558077a30e30ba3c99003a4418991d
] addfile ./b
hunk ./b 1
+b
[A
Ivan Zakharyaschev <imz#altlinux.org>**20160108222807
Ignore-this: 613cadd9266dac24e2bcd2dde97d969a
] addfile ./a
hunk ./a 1
+a
[B2
Ivan Zakharyaschev <imz#altlinux.org>**20160108222850
Ignore-this: e8693b796cd3cac50bb19f4458ddb323
]
<
[A
Ivan Zakharyaschev <imz#altlinux.org>**20160108222807
Ignore-this: 613cadd9266dac24e2bcd2dde97d969a
]
> hunk ./b 1
-b
+b2
Context:
Patch bundle hash:
f7ff61d69da702263b2ac613d3ca979ecab5b07b
Not quite convenient.

FreeRADIUS Google Dual Factor Authenticator, Pam

Hi I've been following this article to setup FreeRADIUS Google Dual Factor Authenticator
http://www.supertechguy.com/help/security/freeradius-google-auth
Hours of testing I still can't get it to work. If my /etc/pam.d/radiusd looks like the following it works well with
the following command
radtest test test localhost 18120 testing123
#
# /etc/pam.d/radiusd - PAM configuration for FreeRADIUS
#
# We fall back to the system default in /etc/pam.d/common-*
#
#include common-auth
#include common-account
#include common-password
#include common-session
However if it looks like the following
#
# /etc/pam.d/radiusd - PAM configuration for FreeRADIUS
#
# We fall back to the system default in /etc/pam.d/common-*
#
##include common-auth
##include common-account
##include common-password
##include common-session
auth requisite pam_google_authenticator.so forward_pass
auth required pam_unix.so use_first_pass
my log file says the following and auth fails.
rad_recv: Access-Request packet from host 127.0.0.1 port 43185, id=111, length=56
User-Name = "test"
User-Password = "test"
NAS-IP-Address = 127.0.1.1
NAS-Port = 18120
Thu Sep 26 16:38:19 2013 : Info: # Executing section authorize from file /etc/freeradius/sites-enabled/default
Thu Sep 26 16:38:19 2013 : Info: +- entering group authorize {...}
Thu Sep 26 16:38:19 2013 : Info: ++[preprocess] returns ok
Thu Sep 26 16:38:19 2013 : Info: ++[chap] returns noop
Thu Sep 26 16:38:19 2013 : Info: ++[mschap] returns noop
Thu Sep 26 16:38:19 2013 : Info: ++[digest] returns noop
Thu Sep 26 16:38:19 2013 : Info: [suffix] No '#' in User-Name = "test", looking up realm NULL
Thu Sep 26 16:38:19 2013 : Info: [suffix] No such realm "NULL"
Thu Sep 26 16:38:19 2013 : Info: ++[suffix] returns noop
Thu Sep 26 16:38:19 2013 : Info: [eap] No EAP-Message, not doing EAP
Thu Sep 26 16:38:19 2013 : Info: ++[eap] returns noop
Thu Sep 26 16:38:19 2013 : Info: [files] users: Matched entry DEFAULT at line 74
Thu Sep 26 16:38:19 2013 : Info: ++[files] returns ok
Thu Sep 26 16:38:19 2013 : Info: ++[expiration] returns noop
Thu Sep 26 16:38:19 2013 : Info: ++[logintime] returns noop
Thu Sep 26 16:38:19 2013 : Info: [pap] WARNING! No "known good" password found for the user. Authentication may fail because of this.
Thu Sep 26 16:38:19 2013 : Info: ++[pap] returns noop
Thu Sep 26 16:38:19 2013 : Info: Found Auth-Type = PAM
Thu Sep 26 16:38:19 2013 : Info: # Executing group from file /etc/freeradius/sites-enabled/default
Thu Sep 26 16:38:19 2013 : Info: +- entering group authenticate {...}
Thu Sep 26 16:38:19 2013 : Debug: pam_pass: using pamauth string <radiusd> for pam.conf lookup
Thu Sep 26 16:38:19 2013 : Debug: pam_pass: function pam_authenticate FAILED for <test>. Reason: Cannot make/remove an entry for the specified session
Thu Sep 26 16:38:19 2013 : Info: ++[pam] returns reject
Thu Sep 26 16:38:19 2013 : Info: Failed to authenticate the user.
Thu Sep 26 16:38:19 2013 : Info: Using Post-Auth-Type Reject
Thu Sep 26 16:38:19 2013 : Info: # Executing group from file /etc/freeradius/sites-enabled/default
Thu Sep 26 16:38:19 2013 : Info: +- entering group REJECT {...}
Thu Sep 26 16:38:19 2013 : Info: [attr_filter.access_reject] expand: %{User-Name} -> test
Thu Sep 26 16:38:19 2013 : Debug: attr_filter: Matched entry DEFAULT at line 11
Thu Sep 26 16:38:19 2013 : Info: ++[attr_filter.access_reject] returns updated
Thu Sep 26 16:38:19 2013 : Info: Delaying reject of request 0 for 1 seconds
Thu Sep 26 16:38:19 2013 : Debug: Going to the next request
Thu Sep 26 16:38:19 2013 : Debug: Waking up in 0.9 seconds.
Thu Sep 26 16:38:20 2013 : Info: Sending delayed reject for request 0
Sending Access-Reject of id 111 to 127.0.0.1 port 43185
Thu Sep 26 16:38:20 2013 : Debug: Waking up in 4.9 seconds.
Thu Sep 26 16:38:25 2013 : Info: Cleaning up request 0 ID 111 with timestamp +3
Thu Sep 26 16:38:25 2013 : Info: Ready to process requests.
I'm using Ubuntu latest
Does anyone know what the issue here?
Many Thanks
After so much internet surfing and forum hunting I manage to fix this problem. If anyone else having this issue this might help them :)
Thu Sep 26 16:38:19 2013 : Debug: pam_pass: using pamauth string <radiusd> for pam.conf lookup
Thu Sep 26 16:38:19 2013 : Debug: pam_pass: function pam_authenticate FAILED for <test>. Reason: Cannot make/remove an entry for the specified session
The above line actually means a auth fail, even though it doesn't sound like it, also it could mean that .google_authenticator file in the user's home directory isn't accessible.
FreeRadius log file not help you much with this issue, but have a look through /var/log/secure on CentOS and /var/log/auth.log in Ubuntu. This will explain which is the issue.
Issue with my system was my time was out and my random generated number by Google Dual Factor Authenticator application on my iPhone wasn't valid. I had to install NTP and change my servers time to the correct time which fixed the issue!!!!
hope this help someone else :)
The how-to on Super Tech Guy's page (http://www.supertechguy.com/help/security/freeradius-google-auth) has a typo.
DEFAULT Auth-Type := PAM
should be
DEFAULT Auth-Type = PAM
I don't know why he put a colon in there, but removing it fixed my issue.
This was after I made sure the server had the correct time (and timezone), which it didn't. So thanks for that suggestion too!

Resources