I am using the quickstart network provided by Hyperledger besu, and I want to test and see how permissioning works with the permissioning management dapp. I use this repo: https://github.com/bretthenderson/besu-quickstart
So when I run the run-permissioning.sh script to build the dapp and run the test network everything works fine and the network starts succesfully then when I run the run-permissioning-dapp.sh script it works fine and it compiles and deploys the permissioning smart contracts then restarts the network with permissioning enabled but after that the bootnode container crashes with these logs :
2021-04-02 10:25:11.294+00:00 | main | INFO | KeyPairUtil | Loaded public key 0xc1979a8a48693db804316b5acebe35e11731e1fb1c9c21ff7268ab25db6f6e03390a429b83cf0ec0865a7205f2669ec1ace652a3def11e2e01571c74939cbe22 from /opt/besu/keys/key
Setting logging level to INFO
2021-04-02 10:25:42.930+00:00 | main | INFO | AbstractAltBnPrecompiledContract | Using LibEthPairings native alt bn128
2021-04-02 10:25:55.841+00:00 | main | INFO | SECP256K1 | Using native secp256k1
2021-04-02 10:25:55.933+00:00 | main | INFO | Besu | Starting Besu version: besu/v21.1.3/linux-x86_64/oracle_openjdk-java-11
2021-04-02 10:25:59.261+00:00 | main | WARN | Besu | --min-gas-price has been ignored because --miner-enabled was not defined on the command line.
2021-04-02 10:26:00.299+00:00 | main | INFO | Besu | Static Nodes file = /opt/besu/data/static-nodes.json
2021-04-02 10:26:00.322+00:00 | main | INFO | StaticNodesParser | StaticNodes file /opt/besu/data/static-nodes.json does not exist, no static connections will be created.
2021-04-02 10:26:00.351+00:00 | main | INFO | Besu | Connecting to 0 static nodes.
2021-04-02 10:26:00.368+00:00 | main | INFO | Besu | Security Module: localfile
2021-04-02 10:26:00.661+00:00 | main | INFO | DatabaseMetadata | Lookup database metadata file in data directory: /opt/besu/data
2021-04-02 10:26:01.646+00:00 | main | INFO | RocksDBKeyValueStorageFactory | Existing database detected at /opt/besu/data. Version 1
2021-04-02 10:26:03.790+00:00 | main | INFO | KeyPairUtil | Loaded public key 0xc1979a8a48693db804316b5acebe35e11731e1fb1c9c21ff7268ab25db6f6e03390a429b83cf0ec0865a7205f2669ec1ace652a3def11e2e01571c74939cbe22 from /opt/besu/keys/key
2021-04-02 10:26:04.310+00:00 | main | INFO | ProtocolScheduleBuilder | Protocol schedule created with milestones: [Petersburg: 0]
ANTLR Tool version 4.7.1 used for code generation does not match the current runtime version 4.8ANTLR Runtime version 4.7.1 used for parser compilation does not match the current runtime version 4.8ANTLR Tool version 4.7.1 used for code generation does not match the current runtime version 4.8ANTLR Runtime version 4.7.1 used for parser compilation does not match the current runtime version 4.8ANTLR Tool version 4.7.1 used for code generation does not match the current runtime version 4.8ANTLR Runtime version 4.7.1 used for parser compilation does not match the current runtime version 4.8ANTLR Tool version 4.7.1 used for code generation does not match the current runtime version 4.8ANTLR Runtime version 4.7.1 used for parser compilation does not match the current runtime version 4.8
Error: node permissioning contract at address 0x0000000000000000000000000000000000009999 does not match the expected interface version 1
I can't find anything about this error anywhere as hyperledger besu have a very small community...
The fix is to the issue is to add --permissions-nodes-contract-version=2 to your besu command line.
This is because in v 2.0.0 of permissioning smart contracts repo we changed the interface as per the changelog https://github.com/ConsenSys/permissioning-smart-contracts/releases/tag/v2.0.0
It is in the besu docs here https://besu.hyperledger.org/en/stable/HowTo/Limit-Access/Specify-Perm-Version/ but I have already reported this issue and it has been fixed on the documentation of on-chain permissioning tutorial.
you can find more details here
Github issue
Besu Docs
i'm facing the same issue even with --permissions-nodes-contract-version=2 is added, check my post here : https://ethereum.stackexchange.com/questions/132573/hyperledger-besu-onchain-permissioning-error
Related
I have seen the following issue repeatedly while building multiple Kotlin projects using IntelliJ IDEA Ultimate Build #IU-222.3739.54 (August 2022) and Kotlin plugin 222-1.7.10-release-334-IJ3739.54:
After making a change to existing sources and attempting to run a functional test I get an error such as:
Kotlin: Cannot find a parameter with this name: plan_type
The change I just made was adding the said enumeration to an existing enum class. Checking the logs I see mention of the alleged compilation error that gets displayed in the IDE:
2022-09-06 18:03:51,521 [1573161] INFO - #c.i.c.ComponentStoreImpl - Saving appEditorSettings took 15 ms, FileTypeManager took 14 ms
2022-09-06 18:04:14,831 [1596471] INFO - #c.i.c.i.CompileDriver - COMPILATION STARTED (BUILD PROCESS)
2022-09-06 18:04:15,975 [1597615] INFO - #c.i.c.s.BuildManager - Using preloaded build process to compile /Users/lexluthor/Workspaces/billing-service
2022-09-06 18:04:15,994 [1597634] INFO - #o.j.k.i.s.r.KotlinCompilerReferenceIndexStorage - KCRI storage is closed
2022-09-06 18:04:16,013 [1597653] INFO - #c.i.c.b.CompilerReferenceServiceBase - backward reference index reader is closed
2022-09-06 18:05:33,532 [1675172] INFO - #o.j.k.i.s.r.KotlinCompilerReferenceIndexStorage - KCRI storage is opened: took 50 ms for 1 storages (filling map: 47 ms, flush to storage: 3 ms)
2022-09-06 18:05:33,551 [1675191] INFO - #c.i.c.b.CompilerReferenceServiceBase - backward reference index reader is opened
2022-09-06 18:05:33,886 [1675526] INFO - #c.i.c.i.CompilerUtil - COMPILATION FINISHED (BUILD PROCESS); Errors: 1; warnings: 0 took 79046 ms: 1 min 19sec
2022-09-06 18:05:34,264 [1675904] INFO - #c.i.c.s.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: /Users/lexluthor/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/222.3739.54/IntelliJ IDEA.app/Contents/plugins/java/lib/jps-launcher.jar
2022-09-06 18:05:46,991 [1688631] INFO - #c.i.c.ComponentStoreImpl - Saving Project(name=billing-service, containerState=COMPONENT_CREATED, componentStore=/Users/lexluthor/Workspaces/billing-service)RunManager took 18 ms
COMPILATION FINISHED (BUILD PROCESS); Errors: 1
There doesn't appear to be any mention of the said error anywhere else in the log output. Here's some additional observations I have made:
The issue only occurs when building a Kotlin project using Gradle and the language version is 1.7.0 or 1.7.10. The issue does not occur if I set the language version to either 1.6.21 or 1.7.20-Beta.
The issue only occurs when using the IntelliJ IDEA builder under Gradle Settings: Preferences | Build, Execution, Deployment | Build Tools | Gradle | Gradle Projects | Build and run | Build and run using. Switching to the Gradle builder in the aforementioned settings allows me to build the project without any errors. Subsequently switching back to the IntelliJ IDEA builder after a successful Gradle build appears to fix the issue in the IDE.
The issue cannot be easily reproduced on a trivial project. I have not been able to reproduce the issue using a demo project generated using Spring Initilzr but I experience this issue frequently while making trivial changes to existing, medium-size, Kotlin projects and the previous two conditions are met.
I have searched the issue in JetBrains YouTrack without success..
I received an answer to this question from JetBrains technical support that I thought of sharing here for the benefit of anyone else who has come across this issue:
From my checking, your issue looks the same as the https://youtrack.jetbrains.com/issue/KT-53168/
There is a bug in the incremental compilation which is fixed in the 1.7.20-Beta.
You could use the 1.7.20-Beta for it currently or use other workarounds (like Gradle builder)
I am having some trouble with my USRP x310. This question might seem duplicate but I have already tried all the possible solution that I was able to find but I am still not able to resolve it.
Here are some of the posts that I followed and were similar to the problem I am facing.
1. http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/2015-January/040356.html
2. https://www.ruby-forum.com/t/a-strange-problem-with-no-uhd-devices-found-when-ping-192-168-10-2-is-ok/217561
I even posted a question at the NI discussion forum here is the URL, But I haven't received any response. I also tried to make a post at discuss-gnuradio#gnu.org and usrp-users#lists.ettus.com but for some reason the question is not yet posted so now I turnig to the good old trusted stackoverflow in search of some help.
Here is problem I am facing.
I was able to run my USRP x310 without any problem till last week but when I turned it on this week to run some experiments using srsLTE, when I ran srsenb it started gaving error "no compatible rf-frontend found". So to test the connectivity of x310 with the host computer, I ran 'uhd_find_devices' and 'uhd_usrp_probe'
Here is the output of the commands.
raghav#raghav-XPS:~$ uhd_find_devices
[INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501; UHD_3.15.0.0-release
No UHD Devices Found
raghav#raghav-XPS:~$ uhd_usrp_probe
[INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501; UHD_3.15.0.0-release
Error: LookupError: KeyError: No devices found for ----->
Empty Device Address
Then I checked the hardware and I was able to see the sfp+ light at port 0 which is correct, so I tried to ping the x310 'ping 192.168.10.2' and the device responded to ping without any loss in packets. So I tried to run 'uhd_find_devices' and 'uhd_usrp_probe' by providing the address of the device as the argument and then I was able to see the correct output.
Here is the outputs:
raghav#raghav-XPS:~$ uhd_find_devices --args addr=192.168.10.2
[INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501; UHD_3.15.0.0-release
--------------------------------------------------
-- UHD Device 0
--------------------------------------------------
Device Address:
serial: 31EC216
addr: 192.168.10.2
fpga: HG
name:
product: X310
type: x300
raghav#raghav-XPS:~$ uhd_usrp_probe --args addr=192.168.10.2
[INFO] [UHD] linux; GNU C++ version 7.5.0; Boost_106501; UHD_3.15.0.0-release
[INFO] [X300] X300 initialization sequence...
[INFO] [X300] Maximum frame size: 1472 bytes.
[INFO] [X300] Radio 1x clock: 200 MHz
[INFO] [GPS] No GPSDO found
[INFO] [0/DmaFIFO_0] Initializing block control (NOC ID: 0xF1F0D00000000000)
[INFO] [0/DmaFIFO_0] BIST passed (Throughput: 1319 MB/s)
[INFO] [0/DmaFIFO_0] BIST passed (Throughput: 1314 MB/s)
[INFO] [0/Radio_0] Initializing block control (NOC ID: 0x12AD100000000001)
[INFO] [0/Radio_1] Initializing block control (NOC ID: 0x12AD100000000001)
[INFO] [0/DDC_0] Initializing block control (NOC ID: 0xDDC0000000000000)
[INFO] [0/DDC_1] Initializing block control (NOC ID: 0xDDC0000000000000)
[INFO] [0/DUC_0] Initializing block control (NOC ID: 0xD0C0000000000000)
[INFO] [0/DUC_1] Initializing block control (NOC ID: 0xD0C0000000000000)
_____________________________________________________
/
| Device: X-Series Device
| _____________________________________________________
| /
| | Mboard: X310
| | revision: 11
| | revision_compat: 7
| | product: 30818
| | mac-addr0: 00:80:2f:31:49:67
| | mac-addr1: 00:80:2f:31:49:68
| | gateway: 192.168.10.1
| | ip-addr0: 192.168.10.2
| | subnet0: 255.255.255.0
| | ip-addr1: 192.168.20.2
| | subnet1: 255.255.255.0
| | ip-addr2: 192.168.30.2
| | subnet2: 255.255.255.0
| | ip-addr3: 192.168.40.2
| | subnet3: 255.255.255.0
| | serial: 31EC216
| | FW Version: 6.0
| | FPGA Version: 36.0
| | FPGA git hash: fde2a94
| | RFNoC capable: Yes
.
.
.
.
I have already tried to update the fpga of the x310, redid the network connection setup and even reinstalled uhd drivers but nothing helped so far.
I would really appreciate if someone can help me with this issue.
This is a classical case of "computer does not let through traffic from broadcast addresses" as used for device discovery.
Hence, When trying to use my USRP in GNU Radio, I get a " No devices found for ----->" error partially applies. Make sure your PC's firewall is configured to let through packets from and for broadcast addresses.
I have created a bnd-workspace with amdatu-bootstrap jar file. Then created a testing rest project and a bnd run descriptor file to test it. When I run the the run descriptor file and navigated to http://localhost:8080/test, I faced 404 page :(.
HTTP ERROR: 404
Problem accessing /test. Reason:
Not Found
Here are the in-detail steps I took to do so:
Downloaded and used bootstrap-bin-r9.zip
In Amdatu Bootstrap UI, to initialize the workspace I issued "workspace-init" with "amdatu" template
Then I created a project "osgi.test" with "project-create" command
Then I created a test component "tmp.Test" with "/test" as url using "rest-createcomponent" command
Then I added rest required dependencies using "rest-install" command
Then I created launcher.bndrun with org.apache.felix.framework;version='[5.2.0,5.2.0]' and Java-1.8 as OSGI framework.
Then I added rest required libraries to launcher.bndrun with "rest-run" command
Then I added gogo and dm shell with "shell-run" command
Test component:
package tmp;
import java.util.List;
import javax.ws.rs.Path;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.GET;
import javax.ws.rs.Produces;
import java.util.Arrays;
import org.apache.felix.dm.annotation.api.Component;
#Component(provides = Object.class)
#Path("/test")
public class Test {
#GET
#Produces(MediaType.APPLICATION_JSON)
public List<String> list() {
return Arrays.asList("test");
}
}
Here is list of bundles:
lb
START LEVEL 1
ID|State |Level|Name
0|Active | 0|System Bundle (5.2.0)
1|Active | 1|Apache Felix Http Jetty (3.2.0)
2|Active | 1|Apache Felix Http API (3.0.0)
3|Active | 1|Apache Felix Servlet API (1.1.2)
4|Active | 1|Apache Felix Http Whiteboard (3.0.0)
5|Active | 1|org.amdatu.web.rest.jaxrs (1.1.1)
6|Active | 1|org.amdatu.web.rest.wink (3.0.1)
7|Active | 1|org.amdatu.web.rest.doc (1.2.3)
8|Active | 1|Jackson-annotations (2.6.3)
9|Active | 1|Jackson-core (2.6.3)
10|Active | 1|jackson-databind (2.6.3)
11|Active | 1|Jackson-JAXRS-base (2.6.3)
12|Active | 1|Jackson-JAXRS-JSON (2.6.3)
13|Active | 1|Apache Felix Dependency Manager (4.3.0)
14|Active | 1|Apache Felix Dependency Manager Runtime (4.0.3)
15|Active | 1|Apache Felix Metatype Service (1.0.12)
16|Active | 1|Apache Felix EventAdmin (1.3.2)
17|Active | 1|Apache Felix Configuration Admin Service (1.8.6)
18|Active | 1|OPS4J Pax Logging - API (1.7.0)
19|Active | 1|OPS4J Pax Logging - Service (1.7.0)
20|Active | 1|osgi.test (0.0.0)
21|Active | 1|Apache Felix Gogo Command (0.12.0)
22|Active | 1|Apache Felix Gogo Runtime (0.10.0)
23|Active | 1|Apache Felix Gogo Shell (0.10.0)
24|Active | 1|Apache Felix Dependency Manager Shell (4.0.4)
And here is the result of "dm" command
dm
[6] org.amdatu.web.rest.wink
[0] org.amdatu.web.rest.jaxrs.JaxRsSpi registered
[1] org.slf4j.impl.StaticLoggerBinder(OSGi) registered
org.osgi.service.log.LogService service optional available
[2] org.amdatu.web.rest.whiteboard.JaxRsWhiteboard registered
active{bundle.id=6} bundle required available
org.osgi.service.log.LogService service optional available
javax.ws.rs.core.Application (osgi.jaxrs.application.base=*) service optional unavailable
java.lang.Object (osgi.jaxrs.resource.base=*) service optional unavailable
[3] Adapter for interface org.amdatu.web.rest.jaxrs.ApplicationService registered
org.amdatu.web.rest.jaxrs.ApplicationService service optional unavailable
[14] org.apache.felix.dependencymanager.runtime
[4] org.apache.felix.dm.runtime.DependencyManagerRuntime registered
active (DependencyManager-Component=*) bundle optional unavailable
org.osgi.service.packageadmin.PackageAdmin service required available
org.osgi.service.log.LogService service optional available
When I navigate to http://localhost:8080/test following errors is shown
HTTP ERROR: 404
Problem accessing /test. Reason:
Not Found
Any helps appreciated.
changing the version of org.amdatu.web.rest.wink to 2.0.3 will solve the problem.
I don't know what is wrong with version 3+ and why it only works with 2.0.3 ?!!!
I'm trying to deploy the Java backend of a web application on GlassFish 4.1.1. I use OSGi with declarative services. Declarative services seem to work when the bundle in question is published as a JAR but I'm having some trouble with WARs: Felix doesn't seem to find the the component descriptors (OSGI-INF/SomeComponent.xml).
I put together a very simple example to illustrate this.
The bundle is called com.ex.client.
Here's the MANIFEST.MF:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Client
Bundle-SymbolicName: com.ex.client
Bundle-Version: 1.0.0.qualifier
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: com.ex.auth,
javax.servlet;version="3.1.0",
javax.servlet.http;version="3.1.0",
org.osgi.framework
Service-Component: OSGI-INF/ClientServlet.xml
Web-ContextPath: /hi
Bundle-ClassPath: WEB-INF/classes
Here's the structure of the resulting WAR file:
com.ex.client.war
|
+-- META-INF
| |
| +-- MANIFEST.MF (as shown above)
|
+-- OSGI-INF
| |
| +-- ClientServlet.xml
|
+-- WEB-INF
|
+-- classes
| |
| +-- binaries
|
+-- web.xml
And here's Felix complaining that it cannot find OSGI-INF/ClientServlet.xml:
Info: Installed C:\glassfish-4.1.1\glassfish\domains\domain1\autodeploy\bundles\com.ex.client.war
Severe: ERROR: com.ex.client (333): Component descriptor entry 'OSGI-INF/ClientServlet.xml' not found
Info: Started bundle: file:/C:/glassfish-4.1.1/glassfish/domains/domain1/autodeploy/bundles/com.ex.client.war
Info: Started bundle: file:/C:/glassfish-4.1.1/glassfish/domains/domain1/autodeploy/bundles/com.ex.client.war
Info: Expanded at file:/C:/glassfish-4.1.1/glassfish/domains/domain1/osgi-cache/felix/bundle309/data/applications/bundle333-1456241385614/
Info: visiting unvisited references
Info: uris = [file:/C:/glassfish-4.1.1/glassfish/domains/domain1/osgi-cache/felix/bundle309/data/applications/bundle333-1456241385614/WEB-INF/classes/]
Info: visiting unvisited references
Info: visiting unvisited references
Info: total number of classes with faces annotation = 0
Info: Loading application [com.ex.client_1.0.0.qualifier] at [/hi]
Info: Registered ServletContext as a service with properties: {osgi.web.symbolicname=com.ex.client, osgi.web.version=1.0.0.qualifier, osgi.web.contextpath=/hi}
Info: deployed bundle com.ex.client [333] at file:/C:/glassfish-4.1.1/glassfish/domains/domain1/osgi-cache/felix/bundle309/data/applications/bundle333-1456241385614/
When I go to the location
C:/glassfish-4.1.1/glassfish/domains/domain1/osgi-cache/felix/bundle309/data/applications/bundle333-1456241385614/
mentioned above I see the exact same structure as within the WAR file. OSGI-INF/ClientServlet.xml is there.
I googled "Component descriptor entry * not found" and found the code that logs the message (note: I'm not sure if this is the correct version): http://grepcode.com/file/repo1.maven.org/maven2/org.apache.felix/org.apache.felix.scr/1.8.2/org/apache/felix/scr/impl/BundleComponentActivator.java#150
URL[] descriptorURLs = findDescriptors( m_bundle, descriptorLocation );
if ( descriptorURLs.length == 0 )
{
// 112.4.1 If an XML document specified by the header cannot be located in the bundle and its attached
// fragments, SCR must log an error message with the Log Service, if present, and continue.
log( LogService.LOG_ERROR, "Component descriptor entry ''{0}'' not found", new Object[]
{ descriptorLocation }, null, null, null );
continue;
}
Where as far as I can tell descriptorLocation should be OSGI-INF/ClientServlet.xml (what I wrote in the Service-Component in the manifest). Somehow findDescriptors( m_bundle, descriptorLocation ), doesn't find the XML file.
I copied the findDescriptors method into a class in my bundle and I'm printing the results:
Info: bundle://333.0:0/OSGI-INF/ClientServlet.xml
So /OSGI-INF/ClientServlet.xml is indeed there and can be found using the same code that is failing for BundleComponentActivator (again, if this is really the same version of the code; I'm struggling to find out which version GlassFish 4.1.1 uses). So I think the problem is that when BundleComponentActivator first tries to find this XML, it isn't there yet. It works later for me because at that point it has been unpacked and made available.
So... what to do? Am I wrong to think that this should work? Am I packing things incorrectly?
I'm using SONAR for my project.
While using "StartSonar.bat" for launch of Sonar, it is throwing the following exception.
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Error occurred during initialization of VM
jvm 1 | java/lang/NoClassDefFoundError: java/lang/Object
wrapper | JVM exited while loading the application.
wrapper | Launching a JVM...
jvm 2 | Error occurred during initialization of VM
jvm 2 | java/lang/NoClassDefFoundError: java/lang/Object
wrapper | JVM exited while loading the application.
wrapper | Launching a JVM...
jvm 3 | Error occurred during initialization of VM
jvm 3 | java/lang/NoClassDefFoundError: java/lang/Object
wrapper | JVM exited while loading the application.
wrapper | Launching a JVM...
jvm 4 | Error occurred during initialization of VM
jvm 4 | java/lang/NoClassDefFoundError: java/lang/Object
wrapper | JVM exited while loading the application.
wrapper | Launching a JVM...
jvm 5 | Error occurred during initialization of VM
jvm 5 | java/lang/NoClassDefFoundError: java/lang/Object
wrapper | JVM exited while loading the application.
wrapper | There were 5 failed launches in a row, each lasting less than 300 seconds.
Giving up.
wrapper | There may be a configuration problem: please check the logs.
wrapper | <-- Wrapper Stopped
Press any key to continue . . .
Using Java 1.7.0._09. Please help me in getting out of this.
Also, I tried configuring Sonar in IntelliJ IDEA 11 Community Edition. It fails in the startup of IDE. Are any plugins available for Community Edition to run Sonar.
what value do you have for the 'wrapper.java.command' in the wrapper.conf file? Seems like the is no JVM available
Are you sure you have installed a JDK, and not just the JRE?
Also Check JAVA_HOME is configured correctly. Make sure to set the JAVA_HOME environment variable to point to the JDK root folder.
Do one thing, go to <sonarDirectory>\conf and edit the wrapper.conf file and set these 2 lines:
wrapper.java.command=C:\Program Files\Java\jdk1.8.0_20\bin\java
#wrapper.java.command=java