I am building an operating system in Rust, and so far I have used a configuration where the kernel is mapped in the lower part of the address space. Now I have reached a point where I am loading userspace executables, and it is very counterintuitive to have all executables linked to map themselves to higher addresses. I haven't set it myself, but it seems that Rust maps my kernel's executable sections to address 0x200000 by default (checked using objdump -h).
I am using the following target json:
{
"llvm-target": "x86_64-unknown-none",
"data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128",
"arch": "x86_64",
"target-endian": "little",
"target-pointer-width": "64",
"target-c-int-width": "32",
"os": "none",
"executables": true,
"linker-flavor": "ld.lld",
"linker": "rust-lld",
"panic-strategy": "abort",
"disable-redzone": true,
"features": "-mmx,-sse,+soft-float"
}
I have tried to use rustc parameter -Clink-arg=-Tlink.ld. link.ld is a script which has the following:
MEMORY {
KERNEL(rx): ORIGIN = 0xc0000000, LENGTH = 1024M
}
However, this does not seem to do anything. It doesn't even give a linker error when I introduce a syntax error into this linker script. How can I make my kernel map itself to 0xc0000000? The bootloader I'm using supports this, and automatically maps ELF sections where they belong.
I am trying to use hyperledger composer alongside hyperledger explorer. I've deployed a simple business network on fabric-dev-servers. On the composer side it is working fine and I am able to interact with the network perfectly but when I am trying to integrate it with hyperledger explorer I am getting the following error while starting it.
console log
postgres://hppoc:password#127.0.0.1:5432/fabricexplorer
<<<<<<<<<<<<<<<<<<<<<<<<<< Explorer Error >>>>>>>>>>>>>>>>>>>>>
TypeError: Cannot read property 'size' of undefined
at Platform.initialize (/home/paradox/hyperledger/fabric/blockchain-explorer/app/platform/fabric/Platform.js:54:48)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)
(node:23248) DeprecationWarning: grpc.load: Use the #grpc/proto-loader module with grpc.loadPackageDefinition instead
Received kill signal, shutting down gracefully
Closed out connections
App log:
[2018-10-29 22:14:30.719] [DEBUG] Platform - ******* Initialization started for hyperledger fabric platform ******
[2018-10-29 22:14:30.719] [DEBUG] Platform - Setting admin organization enrolment files
db log:
[2018-10-29 22:14:22.055] [INFO] pgservice - Please set logger.setLevel to DEBUG in ./app/helper.js to log the debugging.
Following is my config.json
config:
{
"network-config": {
"org1": {
"name": "Org1",
"mspid": "Org1MSP",
"peer1": {
"requests": "grpcs://127.0.0.1:7051",
"events": "grpcs://127.0.0.1:7053",
"server-hostname": "peer0.org1.example.com",
"tls_cacerts": "/home/paradox/hyperledger/fabric/fabric-dev-servers/fabric-scripts/hlfv12/composer/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt"
},
"admin": {
"key": "/home/paradox/hyperledger/fabric/fabric-dev-servers/fabric-scripts/hlfv12/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/keystore",
"cert": "/home/paradox/hyperledger/fabric/fabric-dev-servers/fabric-scripts/hlfv12/composer/crypto-config/peerOrganizations/org1.example.com/users/Admin#org1.example.com/msp/signcerts"
}
}
},
"channel": "composerchannel",
"orderers": [
{
"mspid": "OrdererMSP",
"server-hostname": "orderer.example.com",
"requests": "grpcs://127.0.0.1:7050",
"tls_cacerts": "/home/paradox/hyperledger/fabric/fabric-dev-servers/fabric-scripts/hlfv12/composer/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt"
}
],
"keyValueStore": "/tmp/fabric-client-kvs",
"configtxgenToolPath": "/home/playground/fabric-samples/bin",
"SYNC_START_DATE_FORMAT": "YYYY/MM/DD",
"syncStartDate": "2018/9/01",
"eventWaitTime": "30000",
"license": "Apache-2.0",
"version": 1.0
}
I have faced similar kind of issue and solved it using following steps.
Download Explorer 3.5 from given url.
https://github.com/hyperledger/blockchain-explorer/tree/v0.3.5.1
Hyperledger Composer Setup(Update config.json)
Build Hyperledger Explorer
Run Hyperledger Explorer
Finally it work for Fabric 1.2 and Composer#0.20.
I hope it will help you !
Looking at the format of your config.json file, it looks like you might be either using an old version of Explorer, or an old config.json. Support for Fabric 1.2 (which it looks like you are using) was only added in Explorer 3.7, along with changes to the structure of config.json.
So, I would recommend the following:
Update to Explorer 3.7 (branch release-3.7).
Follow the instructions here.
I generated a vanilla JHipster microservice gateway. With JHipster registry running I am able to start it using ./mvnw and it works. I can package it using ./mvnw -Pdev package and that works. However, if I try to package it using ./mvnw -Pprod package it fails apparently during the webpack build prod step.
JHipster version 4.14.0
Yarn version 1.3.2
Node version v6.11.5
yo-rc.json
{
"generator-jhipster": {
"promptValues": {
"packageName": "org.jhipster.blog",
"nativeLanguage": "en"
},
"jhipsterVersion": "4.14.0",
"baseName": "blog",
"packageName": "org.jhipster.blog",
"packageFolder": "org/jhipster/blog",
"serverPort": "8080",
"authenticationType": "jwt",
"cacheProvider": "hazelcast",
"enableHibernateCache": true,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"prodDatabaseType": "postgresql",
"searchEngine": "elasticsearch",
"messageBroker": false,
"serviceDiscoveryType": "eureka",
"buildTool": "maven",
"enableSocialSignIn": false,
"enableSwaggerCodegen": false,
"jwtSecretKey": "0b9d434149a3efef6af7362acaf33585d5eaa492",
"clientFramework": "angularX",
"useSass": false,
"clientPackageManager": "yarn",
"applicationType": "gateway",
"testFrameworks": [
"gatling",
"protractor"
],
"jhiPrefix": "jhi",
"enableTranslation": true,
"nativeLanguage": "en",
"languages": [
"en",
"es"
]
}
}
Maven Output
[INFO] --- frontend-maven-plugin:1.6:yarn (webpack build prod) # blog ---
[INFO] yarn not inheriting proxy config from Maven
[INFO] Running 'yarn run webpack:prod' in /Users/mschreiber/temp/microservice-demo/blog
[INFO] yarn run v1.3.2
[INFO] $ yarn run cleanup && yarn run webpack:prod:main && yarn run clean-www
[INFO] $ rimraf target/{aot,www}
[INFO] $ yarn run webpack -- --config webpack/webpack.prod.js --profile
[ERROR] warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
[INFO] $ node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js --config webpack/webpack.prod.js --profile
[INFO] MergetJsonsWebpackPlugin compilation started...
[INFO] MergetJsonsWebpackPlugin compilation completed...
[ERROR] buffer.js:202
[ERROR] throw new TypeError(kFromErrorMsg);
[ERROR] ^
[ERROR]
[ERROR] TypeError: First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.
[ERROR] at Function.Buffer.from (buffer.js:202:9)
[ERROR] at new Buffer (buffer.js:158:17)
[ERROR] at writeOut (/Users/mschreiber/temp/microservice-demo/blog/node_modules/webpack/lib/Compiler.js:334:17)
[ERROR] at require.forEach (/Users/mschreiber/temp/microservice-demo/blog/node_modules/webpack/lib/Compiler.js:345:12)
[ERROR] at /Users/mschreiber/temp/microservice-demo/blog/node_modules/webpack/node_modules/async/dist/async.js:3096:16
[ERROR] at eachOfArrayLike (/Users/mschreiber/temp/microservice-demo/blog/node_modules/webpack/node_modules/async/dist/async.js:1055:9)
[ERROR] at eachOf (/Users/mschreiber/temp/microservice-demo/blog/node_modules/webpack/node_modules/async/dist/async.js:1103:5)
[ERROR] at Object.eachLimit (/Users/mschreiber/temp/microservice-demo/blog/node_modules/webpack/node_modules/async/dist/async.js:3158:5)
[ERROR] at emitFiles (/Users/mschreiber/temp/microservice-demo/blog/node_modules/webpack/lib/Compiler.js:315:21)
[ERROR] at /Users/mschreiber/temp/microservice-demo/blog/node_modules/mkdirp/index.js:30:20
[ERROR] at FSReqWrap.oncomplete (fs.js:135:15)
[ERROR] error Command failed with exit code 1.
[INFO] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[ERROR] error Command failed with exit code 1.
[INFO] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[ERROR] error Command failed with exit code 1.
[INFO] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:05 min
[INFO] Finished at: 2018-03-06T08:32:03-05:00
[INFO] Final Memory: 44M/372M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.eirslett:frontend-maven-plugin:1.6:yarn (webpack build prod) on project blog: Failed to run task: 'yarn run webpack:prod' failed. org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
This issue is related to the workbox-webpack-plugin dependency of JHipster and is fixed in the v4.14.1 release (related commit). To fix it in your generated project, make the following changes:
package.json:
- "workbox-webpack-plugin": "3.0.0-alpha.3",
+ "workbox-webpack-plugin": "3.0.0-beta.1",
webpack/webpack.prod.js
- new WorkboxPlugin({
+ new WorkboxPlugin.GenerateSW({
You can also upgrade to the latest generator-jhipster release with yarn global upgrade generator-jhipster, then upgrade your project with jhipster upgrade. For more info on the upgrade command, see the relevant documentation.
I have generated a microservice configured for consul with jhipster 4.6.2.
I'm running Consul with Docker (with Virtualbox).
As a result, it is not running on localhost (but e.g. with 192.168.99.100).
Hence I modified application-dev.yml of my microservice to set the host like this :
cloud:
consul:
discovery:
prefer-ip-address: true
host: 192.168.99.100
port: 8500
... but when I start the micro-service, it is still trying to connect to localhost (i.e. the property below is not taken into account).
Then I got this exception :
com.ecwid.consul.transport.TransportException:
org.apache.http.conn.HttpHostConnectException:
Connect to localhost:8500 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1, localhost/fe80:0:0:0:0:0:0:1%1] failed:
Connection refused
Any idea ?
thanks !
My config jhipster:
{
"generator-jhipster": {
"promptValues": {
"packageName": "org.fge.msconsul"
},
"jhipsterVersion": "4.6.2",
"baseName": "msconsul",
"packageName": "org.fge.msconsul",
"packageFolder": "org/fge/msconsul",
"serverPort": "8082",
"authenticationType": "jwt",
"hibernateCache": "hazelcast",
"clusteredHttpSession": false,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"prodDatabaseType": "postgresql",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": "consul",
"buildTool": "maven",
"enableSocialSignIn": false,
"jwtSecretKey": "replaced-by-jhipster-info",
"enableTranslation": false,
"applicationType": "microservice",
"testFrameworks": [],
"jhiPrefix": "jhi",
"skipClient": true,
"skipUserManagement": true,
"clientPackageManager": "yarn"
}
}
</details>
##### **JDL for the Entity configuration(s) `entityName.json` files generated in the `.jhipster` directory**
##### **Environment and Tools**
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
git version 2.11.0 (Apple Git-81)
node: v7.4.0
npm: 5.0.3
bower: 1.8.0
gulp:
[22:45:50] CLI version 3.9.1
yeoman: 2.0.0
yarn: 0.27.5
Docker version 17.05.0-ce, build 89658be
docker-compose version 1.13.0, build 1719ceb
Execution complete
Spring Cloud has a bootstrap phase from which it can load configuration properties from the external sources.
src/main/resources/bootstrap*.yml is the file where you must configure how to connect to Consul.
You can also mention in application.properties the consul host like below, i have confirmed that this works
spring.cloud.consul.host=http://hostname
spring.cloud.consul.port=8500
the best way to mention this is bootstrap.yml which is loaded first before any .properties are loaded
I have forked Jhipster 2.27 and tried to add an entity with
yo jhipster:entity car
I got this error :
events.js:154
throw er; // Unhandled 'error' event
^
TypeError: Cannot read property 'endsWith' of undefined
at Generator.getAngularAppName (/home/myUbuntu/dev/workspace/generator-jhipster-master/generators/generator-base.js:1223:67)
at module.exports.EntityGenerator.extend.initializing.getConfig (/home/myUbuntu/dev/workspace/generator-jhipster-master/generators/entity/index.js:116:40)
at Object.<anonymous> (/home/myUbuntu/dev/workspace/generator-jhipster-master/node_modules/yeoman-generator/lib/base.js:436:25)
at /home/myUbuntu/dev/workspace/generator-jhipster-master/node_modules/yeoman-generator/node_modules/run-async/index.js:24:25
at /home/myUbuntu/dev/workspace/generator-jhipster-master/node_modules/yeoman-generator/lib/base.js:448:8
at processImmediate [as _immediateCallback] (timers.js:383:17)
.yo-rc.json file :
GNU nano 2.4.2 FichierĀ : .yo-rc.json
{
"generator-jhipster": {
"jhipsterVersion": "2.27.0",
"baseName": "jhipster",
"packageName": "com.myApp.testapp",
"packageFolder": "com/myApp/testapp",
"authenticationType": "session",
"hibernateCache": "ehcache",
"clusteredHttpSession": "no",
"websocket": "no",
"databaseType": "sql",
"devDatabaseType": "mysql",
"prodDatabaseType": "mysql",
"searchEngine": "no",
"buildTool": "maven",
"enableSocialSignIn": false,
"rememberMeKey": "c959bf1efd5c74e68c9700e2ad012ff595ed52ec",
"useSass": false,
"languages": [
"fr",
"ca"
]
},
"testapp": {
"jhipsterVersion": "2.27.0",
"applicationType": "monolith",
"baseName": "jhipster",
"testFrameworks": [
"gatling"
],
"enableTranslation": true,
"nativeLanguage": "fr",
"languages": [
"fr",
"ca"
]
}
}
Any idea of what's going wrong here?
Thank you.
[UPDATE]
This is what I did :
Welcome to the JHipster Generator v2.27.0
Application files will be generated in folder: /home/myUbuntu/dev/workspace/generator-jhipster-master
? (1/15) Which *type* of application would you like to create? Monolithic application (recommended for simple projects)
? (2/15) What is the base name of your application? jhipster
? (3/15) What is your default Java package name? com.myapp.testapp
? (4/15) Which *type* of authentication would you like to use? HTTP Session Authentication (stateful, default Spring Security mechanism)
? (5/15) Which *type* of database would you like to use? SQL (H2, MySQL, PostgreSQL, Oracle)
? (6/15) Which *production* database would you like to use? MySQL
? (7/15) Which *development* database would you like to use? MySQL
? (8/15) Do you want to use Hibernate 2nd level cache? Yes, with ehcache (local cache, for a single node)
? (9/15) Do you want to use a search engine in your application? No
? (10/15) Do you want to use clustered HTTP sessions? No
? (11/15) Do you want to use WebSockets? No
? (12/15) Would you like to use Maven or Gradle for building the backend? Maven
? (13/15) Would you like to use the LibSass stylesheet preprocessor for your CSS? No
? (14/15) Would you like to enable internationalization support? Yes
? Please choose the native language of the application? French
? Please choose additional languages to install Catalan
? (15/15) Which testing frameworks would you like to use? Gatling
Installing languages: fr, ca
create bower.json
conflict package.json
? Overwrite package.json? overwrite
force package.json
conflict README.md
? Overwrite README.md? overwrite
force README.md
conflict .gitignore
? Overwrite .gitignore? overwrite
force .gitignore
conflict .gitattributes
? Overwrite .gitattributes? overwrite
force .gitattributes
conflict .editorconfig
? Overwrite .editorconfig? overwrite
force .editorconfig
conflict .travis.yml
? Overwrite .travis.yml? overwrite
then :
yo jhipster:entity car
.yo-rc.json file :
GNU nano 2.4.2 FichierĀ : .yo-rc.json
{
"generator-jhipster": {
"jhipsterVersion": "2.27.0",
"baseName": "jhipster",
"packageName": "com.myapp.testapp",
"packageFolder": "com/myapp/testapp",
"authenticationType": "session",
"hibernateCache": "ehcache",
"clusteredHttpSession": "no",
"websocket": "no",
"databaseType": "sql",
"devDatabaseType": "mysql",
"prodDatabaseType": "mysql",
"searchEngine": "no",
"buildTool": "maven",
"enableSocialSignIn": false,
"rememberMeKey": "6b7f2e0be835e1ec6541cf6607c28d97edca19cc",
"useSass": false,
"applicationType": "monolith",
"testFrameworks": [
"gatling"
],
"enableTranslation": true,
"nativeLanguage": "fr",
"languages": [
"fr",
"ca"
]
}
}
Update2
npm ERR! Linux 4.2.0-16-generic npm ERR! argv "/usr/local/bin/node"
"/usr/local/bin/npm" "install" npm ERR! node v5.6.0 npm ERR! npm
v3.6.0
npm ERR! No compatible version found: generator-jhipster#0.0.0 npm
ERR! Valid install targets: npm ERR! 2.27.2, 2.27.1, 2.27.0, 2.26.2,
2.26.1, 2.26.0, 2.25.0, 2.24.0, 2.23.1, 2.23.0, 2.22.0, 2.21.1, 2.21.0, 2.20.0, 2.19.0, 2.18.0, 2.17.0, 2.16.1, 2.16.0, 2.15.2, 2.15.1, 2.15.0, 2.14.2, 2.14.1, 2.14.0, 2.13.1, 2.13.0, 2.12.0, 2.11.1, 2.11.0, 2.10.1, 2.10.0, 2.9.2, 2.9.1, 2.9.0, 2.8.0, 2.7.0, 2.6.0, 2.5.2, 2.5.1, 2.5.0, 2.4.0, 2.3.0, 2.2.0, 2.1.1, 2.1.0, 2.0.0, 1.10.2, 1.10.1, 1.10.0, 1.9.0, 1.8.1, 1.8.0, 1.7.1, 1.7.0, 1.6.0, 1.5.0, 1.4.0, 1.3.0, 1.2.2, 1.2.1, 1.2.0, 1.1.1, 1.1.0, 1.0.0, 0.18.1, 0.18.0, 0.17.2, 0.17.1, 0.17.0, 0.16.0, 0.15.0, 0.14.0, 0.13.0, 0.12.0, 0.11.0, 0.10.1, 0.10.0, 0.9.3, 0.9.2, 0.9.1, 0.9.0, 0.8.4, 0.8.3, 0.8.2, 0.8.1, 0.8.0, 0.7.1, 0.7.0, 0.6.2, 0.6.1, 0.6.0, 0.5.2, 0.5.1, 0.5.0, 0.4.0, 0.3.1, 0.3.0, 0.2.1, 0.2.0, 0.1.0, 0.0.29, 0.0.28, 0.0.27, 0.0.26, 0.0.23, 0.0.22, 0.0.21, 0.0.20, 0.0.19, 0.0.18, 0.0.17, 0.0.16, 0.0.15, 0.0.14, 0.0.13, 0.0.12, 0.0.11, 0.0.10, 0.0.9, 0.0.8, 0.0.7, 0.0.6, 0.0.5, 0.0.4, 0.0.3, 0.0.2, 0.0.1 npm ERR! npm ERR! npm ERR! If you need help, you may report this
error at: npm ERR! https://github.com/npm/npm/issues
npm ERR! Please include the following file with any support request:
npm ERR! /home/myUbuntu/dev/workspace/rhapp/npm-debug.log
module.js:341
throw err;
^
Error: Cannot find module 'gulp-autoprefixer'
You haven't forked JHipster 2.27, you have forked JHipster 3.0
from master (2.27 is on v2.x_maintenance branch) otherwise you would have
not been proposed to generate a monolith app.
It seems you have modified manually your .yo-rc.json file as JHipster would have rejected com.myApp.testapp with this error: "The package name you have provided is not a valid Java package name."
Your .yo-rc.json file is not valid, there should not be this "testapp" section, this is why it fails.
Here is what your .yo-rc.json file should be:
{
"generator-jhipster": {
"jhipsterVersion": "2.27.0",
"baseName": "jhipster",
"packageName": "com.myapp.testapp",
"packageFolder": "com/myapp/testapp",
"authenticationType": "session",
"hibernateCache": "ehcache",
"clusteredHttpSession": "no",
"websocket": "no",
"databaseType": "sql",
"devDatabaseType": "mysql",
"prodDatabaseType": "mysql",
"searchEngine": "no",
"buildTool": "maven",
"enableSocialSignIn": false,
"rememberMeKey": "33cd878a5fc34f050fec62a1c0c3f4dafb64458e",
"useSass": false,
"applicationType": "monolith",
"testFrameworks": [
"gatling"
],
"enableTranslation": true,
"nativeLanguage": "fr",
"languages": [
"fr",
"ca"
]
}
}
Update 1
From your trace it seems that you tried to generate an app in the generator's folder, this cannot work.
Application files will be generated in folder:
/home/myUbuntu/dev/workspace/generator-jhipster-master
You got to run yo jhipster in a new empty folder.
Update 2
Your last error looks like you have changed the version of the generator in its package.json. Npm then looks up this version on nmpjs.org and cannot find it.
Update 3
Read our docs about how to use your forked generator: https://github.com/jhipster/generator-jhipster/blob/master/CONTRIBUTING.md#setup