Getting null properties when launching JBoss EAP 6.4 Management Console - jboss6.x

Am getting an weird JSON message when I try to access (for the first time) my local JBoss EAP 6.4's management console.
Steps taken:
Unzipped jboss-eap-6.4.zip
cd jboss-eap-6.4/bin
sh add-user.sh
Created a Management User with a specific password and also an Application User with a specific password.
Started by local instance:
sh standalone.sh
Everything went perfectly well on server startup...
When I tried to access the management console and entered in the Managed User Name and Password pair, by going to this URL:
http://127.0.0.1:9990/management
This is the JSON I received:
{"management-major-version" : 1, "management-micro-version" : 0,
"management-minor-version" : 7, "name" : "mycomputer", "namespaces" : [],
"product-name" : "EAP", "product-version" : "6.4.0.GA", "profile-name" : null,
"release-codename" : "Janus", "release-version" : "7.5.0.Final-redhat-21",
"schema-locations" : [], "core-service" : {"platform-mbean" : null,
"management" : null, "service-container" : null,
"server-environment" : null, "patching" : null, "module-loading" : null},
"deployment" : null, "deployment-overlay" : null, "extension" :
{"org.jboss.as.clustering.infinispan" : null, "org.jboss.as.connector" : null,
"org.jboss.as.deployment-scanner" : null, "org.jboss.as.ee" : null,
"org.jboss.as.ejb3" : null, "org.jboss.as.jaxrs" : null, "org.jboss.as.jdr" : null,
"org.jboss.as.jmx" : null, "org.jboss.as.jpa" : null,
"org.jboss.as.jsf" : null, "org.jboss.as.logging" : null,
"org.jboss.as.mail" : null, "org.jboss.as.naming" : null,
"org.jboss.as.pojo" : null, "org.jboss.as.remoting" : null,
"org.jboss.as.sar" : null, "org.jboss.as.security" : null,
"org.jboss.as.threads" : null, "org.jboss.as.transactions" : null,
"org.jboss.as.web" : null, "org.jboss.as.webservices" : null,
"org.jboss.as.weld" : null}, "interface" : {"management" : null,
"public" : null, "unsecure" : null}, "path" :
{"jboss.server.log.dir" : null, "jboss.server.data.dir" : null,
"jboss.server.base.dir" : null, "jboss.server.config.dir" : null,
"user.dir" : null, "user.home" : null, "jboss.server.temp.dir"
null, "jboss.controller.temp.dir" : null, "jboss.home.dir" : null,
"java.home" : null}, "socket-binding-group" : {"standard-sockets" :
null}, "subsystem" : {"jaxrs" : null, "jpa" : null, "ee" : null,
"transactions" : null, "remoting" : null, "web" : null, "jmx" :
null, "security" : null, "weld" : null, "pojo" : null, "infinispan" : null,
"jca" : null, "datasources" : null, "logging" : null, "naming" : null,
"webservices" : null, "jsf" : null, "jdr" : null, "deployment-scanner" : null,
"ejb3" : null, "mail" : null, "threads" : null, "sar" : null,
"resource-adapters" : null}, "system-property" : null}
Is this supposed to be correct response?
Is the management console supposed to be accessed by going to:
http://127.0.0.1:9990/
Would really appreciate if someone could clarify on this?
Thanks for taking the time to read this.

Yes, this looks to be expected behavior as you are hitting the REST API management endpoint. You want to hit the JBoss Management Console. Try:
http://localhost:9990/console/App.html

Related

Arango DB Replication applier not working

I am trying to setup a master-slave model of Arango. Able to do a first batch update but applier for live sync is not working. It keeps failing on indexing constraint which works perfectly fine in master and does not have a duplicate key issue.
require("#arangodb/replication").setupReplication({
...> endpoint: "tcp://master:8529",
...> username: “name”,
...> password: “pass”,
...> autoStart: true,
...> incremental:true,
...> verbose:true,
...> });
applier state.
{
"state" : {
"started" : "2020-12-08T07:21:50Z",
"running" : false,
"phase" : "inactive",
"lastAppliedContinuousTick" : null,
"lastProcessedContinuousTick" : null,
"lastAvailableContinuousTick" : null,
"safeResumeTick" : null,
"progress" : {
"time" : "2020-12-09T07:07:44Z",
"message" : "applier shut down",
"failedConnects" : 0
},
"totalRequests" : 4,
"totalFailedConnects" : 0,
"totalEvents" : 0,
"totalDocuments" : 0,
"totalRemovals" : 0,
"totalResyncs" : 3,
"totalOperationsExcluded" : 0,
"totalApplyTime" : 0,
"averageApplyTime" : 0,
"totalFetchTime" : 0,
"averageFetchTime" : 0,
"lastError" : {
"errorNum" : 0
},
"time" : "2020-12-09T07:13:02Z"
},
"server" : {
"version" : "3.6.4",
"serverId" : "237391144398597"
},
"endpoint" :
I tried (sync, async) everything. It is just doing the first batch update and live updates are not happening. Somehow applier is just shutting down. Please help
Can you try either
require("#arangodb/replication").setupReplication({
endpoint: "tcp://master:8529",
username: “name”,
password: “pass”,
autoStart: true,
incremental:true,
verbose:true,
includeSystem: true
});
for starting the applier on the current database, or, the following for starting the applier for all databases/the entire server
require("#arangodb/replication").setupReplicationGlobal({
endpoint: "tcp://master:8529",
username: “name”,
password: “pass”,
autoStart: true,
incremental:true,
verbose:true
});
In the latter case (setupReplicationGlobal) you can later check the state of the applier via
require("#arangodb/replication").globalApplier.state();
(mind the globalApplier here vs. just applier)

mongodb taking too much time for old entries

i am new in mongodb and i am facing an issue, i have around millions of documents in my collectionand i am trying to find single entry using findOne({}) command and when i am trying to find recent entries then response comes in miliseconds but when i am trying to fetch older entries around 600 millionth document then it takes around 2 minutes on mongo shell and my node server gives
{ MongoErro : connection 1 to 127.0.0.1:27017 timed out }
and my nodejs server sends an empty response. can any one tell me what should i do to resolve this issueThanks in advance
explain gives me
db.contacts.find({"phoneNumber":"9165900137"}).explain("executionStats")
{
"queryPlanner" : {
"plannerVersion" : 1,
"namespace" : "meanApp.contacts",
"indexFilterSet" : false,
"parsedQuery" : {
"phoneNumber" : {
"$eq" : "9165900137"
}
},
"winningPlan" : {
"stage" : "COLLSCAN",
"filter" : {
"phoneNumber" : {
"$eq" : "9165900137"
}
},
"direction" : "forward"
},
"rejectedPlans" : [ ]
},
"executionStats" : {
"executionSuccess" : true,
"nReturned" : 1,
"executionTimeMillis" : 321188,
"totalKeysExamined" : 0,
"totalDocsExamined" : 495587806,
"executionStages" : {
"stage" : "COLLSCAN",
"filter" : {
"phoneNumber" : {
"$eq" : "9165900137"
}
},
"nReturned" : 1,
"executionTimeMillisEstimate" : 295230,
"works" : 495587808,
"advanced" : 1,
"needTime" : 495587806,
"needYield" : 0,
"saveState" : 3871779,
"restoreState" : 3871779,
"isEOF" : 1,
"invalidates" : 0,
"direction" : "forward",
"docsExamined" : 495587806
}
},
"serverInfo" : {
"host" : "li1025-15.members.linode.com",
"port" : 27017,
"version" : "3.2.16",
"gitVersion" : "056bf45128114e44c5358c7a8776fb582363e094"
},
"ok" : 1
}
As indicated in the explain plan results, the current query is doing Collection Scan. This means it has to scan every document in collection to produce the match and you have got about half a billion documents.
Try adding this index and it might take a bit to create it.
db.contacts.createIndex( { phoneNumber: 1 }, { background: true } )
Run the query once the index creation is successful, you must see a dramatic improvement in performance. To be certain whether index got picked up, try explain again and it should no longer say COLLSCAN.

get count of multiple values of an array in mongodb

I want to perform a search in mongodb and nodejs which will return the count of ids that I will provide.
my collection is a log table
{
"_id" : ObjectId("5836d0f7f8462cbc6d0caffc"),
"DeviceId" : "abcd1234",
"AppType" : "web",
"UserId" : "5836cb01f8462cbc6d0caff8",
"ArticleId" : "5836cb01f8462cbc6d0caff8",
"Timestamp" : ISODate("2016-11-24T11:37:27.851Z")
},
{
"_id" : ObjectId("5836dba8a2943528448a3050"),
"DeviceId" : null,
"AppType" : null,
"UserId" : null,
"ArticleId" : 5836e493f2acbd1d34648e78,
"Timestamp" : ISODate("2016-11-24T12:23:04.484Z")
},
{
"_id" : ObjectId("5836e445c3b43429b4810ad4"),
"DeviceId" : null,
"AppType" : null,
"UserId" : null,
"ArticleId" : 5836d0f7f8462cbc6d0caffc,
"Timestamp" : ISODate("2016-11-24T12:59:49.820Z")
},
{
"_id" : ObjectId("5836e493f2acbd1d34648e78"),
"DeviceId" : null,
"AppType" : null,
"UserId" : null,
"ArticleId" : 5836d0f7f8462cbc6d0caffc,
"Timestamp" : ISODate("2016-11-24T13:01:07.030Z")
}
and so on...
my search string will be, search need to be performed on ArticleId
{"5836d0f7f8462cbc6d0caffc",
"5836e493f2acbd1d34648e78",
"5836dba8a2943528448a3050"}
and I want a result set like below
{
"1":{ArticleId:"5836d0f7f8462cbc6d0caffc", count:2},
"2":[ArticleId:"5836e493f2acbd1d34648e78", count:9},
"3":[ArticleId:"5836dba8a2943528448a3050", count:35}
}
Can any one please provide me the query, thanks in advance
I don't know if you realize, but all of your counts will be 1.
That's because every _id in Mongo is unique so if it's there then it's there only once.
Also, the output that you want is invalid:
{ 1:{_id:ObjectId("5836d0f7f8462cbc6d0caffc"), count:2},
2:{ObjectId("5836e493f2acbd1d34648e78"), count:9},
3:{ObjectId("5836dba8a2943528448a3050"), count:35}}
It's not valid JSON, not valid JavaScript, not valid Hjson, not valid JSON5, not valid anything - so you will never be able to get that result no matter what you do. (And also, if you change the expected output, every count will still be 1 so fixing the format is pointless anyway.)

arangodb replication applier stopped with error 1413: no start tick

4:32 AM (2 minutes ago)
i followed the replication (master-slave) setup guide, and got data replicated fine, but the applier is stopped with the following error. i searched manual and googled without finding much other than the error message itself. really appreciate if you could provide some clues as how to troubleshoot this. thanks!
arangosh [_system]> require("org/arangodb/replication").applier.state();
{
"state" : {
"running" : false,
"lastAppliedContinuousTick" : null,
"lastProcessedContinuousTick" : null,
"lastAvailableContinuousTick" : null,
"progress" : {
"time" : "2014-04-15T20:20:13Z",
"message" : "applier stopped",
"failedConnects" : 0
},
"totalRequests" : 5,
"totalFailedConnects" : 0,
"totalEvents" : 0,
"lastError" : {
"time" : "2014-04-15T20:20:13Z",
"errorMessage" : "no start tick",
"errorNum" : 1413
},
"time" : "2014-04-15T20:37:50Z"
},
"server" : {
"version" : "2.0.4",
"serverId" : "83323931320193"
},
"endpoint" : "tcp://master:8529",
"database" : "_system"
}
This might happen if you start the applier for the very first time without specifying a tick. Use
require("org/arangodb/replication").applier.start(1)
instead.

Querying MongoDB with keyword

I have big collection of tweets stored in MongoDB. Tweets look like this one:
"_id" : ObjectId("4c02c58de500fe1be1000005"),
"contributors" : null,
"text" : "Hello world",
"user" : {
"following" : null,
"followers_count" : 5,
"utc_offset" : null,
"location" : "",
"profile_text_color" : "000000",
"friends_count" : 11,
"profile_link_color" : "0000ff",
"verified" : false,
"protected" : false,
"url" : null,
"contributors_enabled" : false,
"created_at" : "Sun May 30 18:47:06 +0000 2010",
"geo_enabled" : false,
"profile_sidebar_border_color" : "87bc44",
"statuses_count" : 13,
"favourites_count" : 0,
"description" : "",
"notifications" : null,
"profile_background_tile" : false,
"lang" : "en",
"id" : 149978111,
"time_zone" : null,
"profile_sidebar_fill_color" : "e0ff92"
},
"geo" : null,
"coordinates" : null,
"in_reply_to_user_id" : 149183152,
"place" : null,
"created_at" : "Sun May 30 20:07:35 +0000 2010",
"source" : "web",
"in_reply_to_status_id" : {
"floatApprox" : 15061797850
},
"truncated" : false,
"favorited" : false,
"id" : {
"floatApprox" : 15061838001
For example, If I want to find tweets about some topic for example, canon, then How should I write a query which checks the "text" and finds all tweets about "canon"?
MongoDB does not have directly native query support to search within text. There is official documentation showing you how you can achieve a simple approach to full text search:
http://www.mongodb.org/display/DOCS/Full+Text+Search+in+Mongo
It involves splitting the text into words, and storing them in an array, which you index. This lets you match against the contents of an array. How you split them up is your choice. Maybe you just do words, lowercase, and match against a lower case keyword. Or maybe you need autocompletion so you do variations of each word, or phonetics, etc. Thats all stemming.
Its not as robust as a full text search engine, designed to do this, but it works. Depending on the language you are using, some frameworks have search packages. For instance, I use mongodb with django's nonrel project, and there is a search app for that which provides stemming and different tool for searching.

Resources