How to ignore specific messages or users in errbot? - errbot

I use current config with IRC freenode server:
BOT_PREFIX = '#'
BOT_PREFIX_OPTIONAL_ON_CHAT = True
BOT_ALT_PREFIXES = ('Err', "bot", "mybot", "botka", "errbot")
BOT_ALT_PREFIX_SEPARATORS = (':', ',', ';')
BOT_ALT_PREFIX_CASEINSENSITIVE = True
and I use authentication for IRC services.
But when bot logs in it has a problem: when it identifies itself with NickServ the bot gets messages from NickServ which includes its nick and treats them as a command (because of BOT_PREFIX_OPTIONAL_ON_CHAT and BOT_ALT_PREFIXES). Then the errbot sends error message to NickServ about "wrong command" and NickServ replies that it does't understand "wrong command" to private of bot and it starts again...
So before these bots eats all internet traffic with this conversation, how can I exclude NickServ from this conversation or cause errbot not to reply with "wrong command" or any other solution?
Currently I use dirty hack in my plugin to cover "Invalid command" coming from NickServ:
#botcmd()
def Invalid(self, msg, args):
if args.startswith("Invalid command."):
return
and this prevents from errbot to reply to NickServ. Also need to use
HIDE_RESTRICTED_COMMANDS = True
HIDE_RESTRICTED_ACCESS = True
But I'm looking for better solution. Thanks in advance!
Logs from bots conversation:
22:40:06 DEBUG irc.client FROM SERVER: :NickServ!NickServ#services. NOTICE botka :This nickname is registered. Please choose a different nickname, or identify via /msg NickServ identify <passw
ord>.
22:40:06 DEBUG irc.client _dispatcher: all_raw_messages
22:40:06 DEBUG irc.client command: privnotice, source: NickServ!NickServ#services., target: botka, arguments: ['This nickname is registered. Please choose a different nickname, or identify via
\x02/msg NickServ identify <password>\x02.'], tags: None
22:40:06 DEBUG irc.client _dispatcher: privnotice
22:40:06 DEBUG errbot.core *** frm = NickServ!NickServ#services.
22:40:06 DEBUG errbot.core *** username = NickServ
22:40:06 DEBUG errbot.core *** text = This nickname is registered. Please choose a different nickname, or identify via /msg NickServ identify <password>.
22:40:06 DEBUG errbot.core Assuming 'This nickname is registered. Please choose a different nickname, or identify via /msg NickServ identify <password>.' to be a command because BOT_PREFIX_OPTIO
NAL_ON_CHAT is True
22:40:06 DEBUG errbot.core Command not found
22:40:06 DEBUG errbot.utils Elapsed 0.005545 since last call
22:40:06 DEBUG errbot.utils Wait 0.994455 due to rate limiting...
22:40:07 DEBUG irc.client TO SERVER: PRIVMSG NickServ :Command "This" / "This nickname" not found.
22:40:07 DEBUG errbot.core Triggering callback_message on Flows
............................skipped
22:40:07 DEBUG irc.client FROM SERVER: :NickServ!NickServ#services. NOTICE botka :You are now identified for botka.
22:40:07 DEBUG irc.client _dispatcher: all_raw_messages
22:40:07 DEBUG irc.client command: privnotice, source: NickServ!NickServ#services., target: botka, arguments: ['You are now identified for \x02botka\x02.'], tags: None
22:40:07 DEBUG irc.client _dispatcher: privnotice
22:40:07 DEBUG errbot.core *** frm = NickServ!NickServ#services.
22:40:07 DEBUG errbot.core *** username = NickServ
22:40:07 DEBUG errbot.core *** text = You are now identified for botka.
22:40:07 DEBUG errbot.core Assuming 'You are now identified for botka.' to be a command because BOT_PREFIX_OPTIONAL_ON_CHAT is True
22:40:07 DEBUG errbot.core Command not found
22:40:07 DEBUG errbot.utils Elapsed 0.014732 since last call
22:40:07 DEBUG errbot.utils Wait 0.985268 due to rate limiting...
22:40:08 DEBUG irc.client TO SERVER: PRIVMSG NickServ :Command "You" / "You are" not found.
............afterwards
22:40:20 DEBUG irc.client FROM SERVER: :NickServ!NickServ#services. NOTICE botka :Invalid command. Use /msg NickServ help for a command listing.
22:40:20 DEBUG irc.client _dispatcher: all_raw_messages
22:40:20 DEBUG irc.client command: privnotice, source: NickServ!NickServ#services., target: botka, arguments: ['Invalid command. Use \x02/msg NickServ help\x02 for a command listing.'], tags: None
22:40:20 DEBUG irc.client _dispatcher: privnotice
22:40:20 DEBUG errbot.core *** frm = NickServ!NickServ#services.
22:40:20 DEBUG errbot.core *** username = NickServ
22:40:20 DEBUG errbot.core *** text = Invalid command. Use /msg NickServ help for a command listing.
22:40:20 DEBUG errbot.core Assuming 'Invalid command. Use /msg NickServ help for a command listing.' to be a command because BOT_PREFIX_OPTIONAL_ON_CHAT is True
22:40:20 DEBUG errbot.core Command not found
22:40:20 DEBUG errbot.utils Elapsed 0.015257 since last call
22:40:20 DEBUG errbot.utils Wait 0.984743 due to rate limiting...
22:40:21 DEBUG irc.client TO SERVER: PRIVMSG NickServ :Command "Invalid" / "Invalid command." not found.
22:40:21 DEBUG errbot.core Triggering callback_message on Flows
.............skpped
22:40:21 DEBUG irc.client FROM SERVER: :NickServ!NickServ#services. NOTICE botka :Invalid command. Use /msg NickServ help for a command listing.

I did this with a filter plugin; in the configuration I have a list of users to ignore:
from errbot import BotPlugin, cmdfilter
IGNORE_COMMAND = (None, None, None)
class IgnoreUsers(BotPlugin):
"""Command filter that causes blocks any response to zombot."""
#cmdfilter
def ignore_users(self, msg, cmd, args, dry_run):
"""
Check command to see if it came from zombot, and if so block it
:param msg: The original chat message.
:param cmd: The command name itself.
:param args: Arguments passed to the command.
:param dry_run: True when this is a dry-run.
"""
for user in self.bot_config.IGNORE_USERS:
if msg.frm.person == user:
self.log.info("Ignored %s from %s." % (cmd, user))
return IGNORE_COMMAND # didn't hear a thing
return msg, cmd, args # ok, don't ignore it

I need to read documentation more carefully:
SUPPRESS_CMD_NOT_FOUND = True will do the trick, although the question about ignoring specific users/messages still remains.

Related

Instapy crashes instantly after login without performing any action

Instapy was running perfectly fine and suddenly I started to get warning Login test detected. And since then I'm unable to run it.
Here is error log-
InstaPy Version: 0.6.13
._. ._. ._. ._. ._. ._. ._. ._.
Workspace in use: "/home/ubuntu/InstaPy"
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2021-05-09 18:10:38] [username] Session started!
oooooooooooooooooooooooooooooooooooooooooooooooooooooo
INFO [2021-05-09 18:10:38] [username] -- Connection Checklist [1/2] (Internet Connection Status)
INFO [2021-05-09 18:10:39] [username] - Internet Connection Status: ok
INFO [2021-05-09 18:10:39] [username] - Current IP is "152.64.1.152" and it's from "India/IN"
INFO [2021-05-09 18:10:39] [username] -- Connection Checklist [2/2] (Hide Selenium Extension)
INFO [2021-05-09 18:10:39] [username] - window.navigator.webdriver response: True
WARNING [2021-05-09 18:10:39] [username] - Hide Selenium Extension: error
INFO [2021-05-09 18:10:45] [username] - Cookie file not found, creating cookie...
WARNING [2021-05-09 18:10:50] [username] Login A/B test detected! Trying another string...
WARNING [2021-05-09 18:10:55] [username] Could not pass the login A/B test. Trying last string...
INFO [2021-05-09 18:11:13] [username] - Do not save Login Info by now...
.......................................................................................................................
CRITICAL [2021-05-09 18:11:27] [username] Unable to login to Instagram! You will find more information in the logs above.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
INFO [2021-05-09 18:11:29] [username] Sessional Live Report:
|> No any statistics to show
[Session lasted 1.01 minutes]
OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
INFO [2021-05-09 18:11:29] [username] Session ended!
oooooooooooooooooooooooooooooooooooooooooooooooooooooo
You can see it's is able to login but instantly kills the session, people suggest it's due to some sort of loop.
I checked login_util.py but can't find something useful. I think it's probably due to some changes in Instagram's homepage after login to tackle suspicious accounts. Any help is appreciated, Thanks!
Make sure that there are no errors in the code after you start the session.
If an exception occurs and the program exits, you will also see No any statistics to show.
The easiest way to test this is to run quickstart.py.
https://github.com/InstaPy/InstaPy/blob/master/quickstart.py

Database Killed error while try to start new graph instance on neo4j Desktop

Issue:
Database failed to start, exited with status 'KILLED", Logs end with: Caused by: ... bind(..) failed: Address already in use
Very similar to these:
Neo4j Desktop DB failed to start with with status 'KILLED'
https://community.neo4j.com/t/database-failed-to-start/5612
https://community.neo4j.com/t/database-failed-to-start-db-database-ee8e1c21-23d9-40fd-8a4e-02fd55a0d324-v4-1-0-exited-with-status-killed-check-the-logs/21045
Logs end at:
Caused by: io.netty.channel.unix.Errors$NativeIoException: bind(..) failed: Address already in use
Things I've tried:
Killing all processes associated with neo4j
searching for default port lsof :11002/3
reinstalling
some config files you don't seem to be able to delete in .config
Os and Version Data
OS: Linux pop-os 5.4.0-7634-generic #38~1596560323~20.04~7719dbd-Ubuntu SMP Tue Aug 4 19:12:34 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
neo4j version: 4.1.0
desktop version: 1.3.4
neo4j.log
Directories in use:
home: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0
config: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/conf
logs: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/logs
plugins: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/plugins
import: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/import
data: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/data
certificates: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/certificates
run: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/run
Starting Neo4j.
WARNING: Max 8192 open files allowed, minimum of 40000 recommended. See the Neo4j manual.
Directories in use:
home: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0
config: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/conf
logs: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/logs
plugins: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/plugins
import: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/import
data: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/data
certificates: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/certificates
run: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/run
Starting Neo4j.
WARNING: Max 8192 open files allowed, minimum of 40000 recommended. See the Neo4j manual.
2020-08-21 19:04:24.399+0000 INFO Note that since you did not explicitly set the port in dbms.connector.bolt.advertised_address Neo4j automatically set it to 11002 to match dbms.connector.bolt.listen_address. This behavior may change in the future and we recommend you to explicitly set it.
2020-08-21 19:04:24.402+0000 INFO Note that since you did not explicitly set the port in dbms.connector.http.advertised_address Neo4j automatically set it to 11003 to match dbms.connector.http.listen_address. This behavior may change in the future and we recommend you to explicitly set it.
2020-08-21 19:04:24.402+0000 INFO Starting...
Directories in use:
home: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0
config: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/conf
logs: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/logs
plugins: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/plugins
import: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/import
data: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/data
certificates: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/certificates
run: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/run
Starting Neo4j.
WARNING: Max 8192 open files allowed, minimum of 40000 recommended. See the Neo4j manual.
2020-08-21 19:04:24.399+0000 INFO Note that since you did not explicitly set the port in dbms.connector.bolt.advertised_address Neo4j automatically set it to 11002 to match dbms.connector.bolt.listen_address. This behavior may change in the future and we recommend you to explicitly set it.
2020-08-21 19:04:24.402+0000 INFO Note that since you did not explicitly set the port in dbms.connector.http.advertised_address Neo4j automatically set it to 11003 to match dbms.connector.http.listen_address. This behavior may change in the future and we recommend you to explicitly set it.
2020-08-21 19:04:24.402+0000 INFO Starting...
2020-08-21 19:04:26.747+0000 INFO ======== Neo4j 4.1.0 ========
Directories in use:
home: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0
config: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/conf
logs: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/logs
plugins: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/plugins
import: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/import
data: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/data
certificates: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/certificates
run: /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/run
Starting Neo4j.
WARNING: Max 8192 open files allowed, minimum of 40000 recommended. See the Neo4j manual.
2020-08-21 19:04:24.399+0000 INFO Note that since you did not explicitly set the port in dbms.connector.bolt.advertised_address Neo4j automatically set it to 11002 to match dbms.connector.bolt.listen_address. This behavior may change in the future and we recommend you to explicitly set it.
2020-08-21 19:04:24.402+0000 INFO Note that since you did not explicitly set the port in dbms.connector.http.advertised_address Neo4j automatically set it to 11003 to match dbms.connector.http.listen_address. This behavior may change in the future and we recommend you to explicitly set it.
2020-08-21 19:04:24.402+0000 INFO Starting...
2020-08-21 19:04:26.747+0000 INFO ======== Neo4j 4.1.0 ========
2020-08-21 19:04:32.005+0000 ERROR Failed to start Neo4j on dbms.connector.http.listen_address, a socket address. If missing port or hostname it is acquired from dbms.default_listen_address. Error starting Neo4j database server at /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/data/databases
java.lang.RuntimeException: Error starting Neo4j database server at /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/data/databases
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:198)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:158)
at com.neo4j.server.enterprise.EnterpriseManagementServiceFactory.createManagementService(EnterpriseManagementServiceFactory.java:38)
at com.neo4j.server.enterprise.EnterpriseBootstrapper.createNeo(EnterpriseBootstrapper.java:20)
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:117)
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:87)
at com.neo4j.server.enterprise.EnterpriseEntryPoint.main(EnterpriseEntryPoint.java:25)
Caused by: org.neo4j.kernel.lifecycle.LifecycleException: Component 'Server[backup-server]' was successfully initialized, but failed to start. Please see the attached cause exception "bind(..) failed: Address already in use".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:463)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:189)
... 6 more
Caused by: io.netty.channel.unix.Errors$NativeIoException: bind(..) failed: Address already in use
2020-08-21 19:04:32.006+0000 INFO Neo4j Server shutdown initiated by request
debug.log
2020-08-21 19:04:24.897+0000 INFO [o.n.i.d.DiagnosticsManager] ********************************************************************************
2020-08-21 19:04:24.898+0000 INFO [o.n.i.d.DiagnosticsManager] [ System diagnostics ]
2020-08-21 19:04:24.899+0000 INFO [o.n.i.d.DiagnosticsManager] ********************************************************************************
2020-08-21 19:04:24.902+0000 INFO [o.n.i.d.DiagnosticsManager] --------------------------------------------------------------------------------
2020-08-21 19:04:24.902+0000 INFO [o.n.i.d.DiagnosticsManager] [ System memory information ]
2020-08-21 19:04:24.902+0000 INFO [o.n.i.d.DiagnosticsManager] --------------------------------------------------------------------------------
...
2020-08-21 19:04:25.482+0000 INFO [c.n.c.c.TransactionBackupServiceProvider] Binding backup service on address 127.0.0.1:6362
2020-08-21 19:04:26.747+0000 INFO [c.n.s.e.EnterpriseNeoWebServer] ======== Neo4j 4.1.0 ========
2020-08-21 19:04:26.824+0000 INFO [o.n.b.BoltServer] Bolt server loaded
2020-08-21 19:04:26.930+0000 ERROR [c.n.c.n.Server] backup-server: cannot bind to '127.0.0.1:6362' with transport 'EpollServerSocketChannel'. bind(..) failed: Address already in use
io.netty.channel.unix.Errors$NativeIoException: bind(..) failed: Address already in use
2020-08-21 19:04:26.943+0000 ERROR [o.n.g.f.DatabaseManagementServiceFactory] Error starting Neo4j database server at /home/edwardweymouth/.config/Neo4j Desktop/Application/neo4jDatabases/database-8c955e24-f305-4cd8-9342-490ffd3dc0ab/installation-4.1.0/data/databases Component 'Server[backup-server]' was successfully initialized, but failed to start. Please see the attached cause exception "bind(..) failed: Address already in use".
org.neo4j.kernel.lifecycle.LifecycleException: Component 'Server[backup-server]' was successfully initialized, but failed to start. Please see the attached cause exception "bind(..) failed: Address already in use".
at org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:463)
at org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:110)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.startDatabaseServer(DatabaseManagementServiceFactory.java:189)
at org.neo4j.graphdb.facade.DatabaseManagementServiceFactory.build(DatabaseManagementServiceFactory.java:158)
at com.neo4j.server.enterprise.EnterpriseManagementServiceFactory.createManagementService(EnterpriseManagementServiceFactory.java:38)
at com.neo4j.server.enterprise.EnterpriseBootstrapper.createNeo(EnterpriseBootstrapper.java:20)
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:117)
at org.neo4j.server.NeoBootstrapper.start(NeoBootstrapper.java:87)
at com.neo4j.server.enterprise.EnterpriseEntryPoint.main(EnterpriseEntryPoint.java:25)
Caused by: io.netty.channel.unix.Errors$NativeIoException: bind(..) failed: Address already in use
2020-08-21 19:04:26.944+0000 INFO [o.n.g.f.DatabaseManagementServiceFactory] Shutdown started
There was a lot of address already in use going on here, so it was kind of hard to parse, but this bit in the debug log turned out to be the important part:
2020-08-21 19:04:25.482+0000 INFO [c.n.c.c.TransactionBackupServiceProvider] Binding backup service on address 127.0.0.1:6362
2020-08-21 19:04:26.747+0000 INFO [c.n.s.e.EnterpriseNeoWebServer] ======== Neo4j 4.1.0 ========
2020-08-21 19:04:26.824+0000 INFO [o.n.b.BoltServer] Bolt server loaded
2020-08-21 19:04:26.930+0000 ERROR [c.n.c.n.Server] backup-server: cannot bind to '127.0.0.1:6362' with transport 'EpollServerSocketChannel'. bind(..) failed: Address already in use
searched for the port:
$ lsof -i :6362
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 530156 user 427u IPv6 3670839 0t0 TCP localhost:6362 (LISTEN)
$ kill 530156
Looks like desktop leaves some java runnin' out in the fields there...
After that DB startup was all good.

Integration of pubsubeat with elasticsearch

I am learning how to integrate pubsub with elasticsearch. There are various options like pubsubbeat, Google_pubsub input plugin, Google Cloud Pub/Sub Output Plugin.
I am currently trying to use pubsubbeat and stucked after running the command " ./pubsubbeat -c pubsubbeat.yml -e -d "*" " as suggested. Log of console is as follows
2019-05-23T14:42:19.949+0100 INFO instance/beat.go:468 Home path: [/home/amishra/pubsubbeat-linux-amd64] Config path: [/home/amishra/pubsubbeat-linux-amd64] Data path: [/home/amishra/pubsubbeat-linux-amd64/data] Logs path: [/home/amishra/pubsubbeat-linux-amd64/logs]
2019-05-23T14:42:19.949+0100 DEBUG [beat] instance/beat.go:495 Beat metadata path: /home/amishra/pubsubbeat-linux-amd64/data/meta.json
2019-05-23T14:42:19.949+0100 INFO instance/beat.go:475 Beat UUID: 4bd6119e-603a-426c-9d5b-6ac588bb000e
2019-05-23T14:42:19.949+0100 INFO instance/beat.go:213 Setup Beat: pubsubbeat; Version: 6.2.2
2019-05-23T14:42:19.949+0100 DEBUG [beat] instance/beat.go:230 Initializing output plugins
2019-05-23T14:42:19.949+0100 DEBUG [processors] processors/processor.go:49 Processors:
2019-05-23T14:42:19.952+0100 INFO pipeline/module.go:76 Beat name: allspark
2019-05-23T14:42:19.952+0100 INFO [PubSub: dev/elk-logstash-poc/logstash-poc] beater/pubsubbeat.go:54 config retrieved: &{Project:dev Topic:elk-logstash-poc CredentialsFile:/home/amishra/key/key.json Subscription:{Name:logstash-poc RetainAckedMessages:false RetentionDuration:5h0m0s} Json:{Enabled:false AddErrorKey:false}}
On second thought, I tried solution 2 but was getting below error and haven't able to resolve yet
io.grpc.internal.ManagedChannelImpl$NameResolverListenerImpl onError
WARNING: [io.grpc.internal.ManagedChannelImpl-1] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host pubsub.googleapis.com, cause=java.net.UnknownHostException: pubsub.googleapis.com
Any lead on how to make thing working will be great help
The issue got resolved in unexpected way i.e. installing and deploying on fresh machine. Root cause is still unknown.

Logging in gunicorn log file is not detailed

I'm setting log level to 'debug' which I recall is the most verbose, however I'm only getting lines like this, even when an exception is thrown:
[2018-04-18 22:08:21 +0000] [23394] [DEBUG] POST /json
My startup command is this:
gunicorn --log-level debug --error-logfile gunicorn_error.log -D -b 0.0.0.0:5000 forward_to_es:app
Thanks for any suggestions.
I recommend that you create a gunicorn config file. for example:
# /path-to-your-project/gunicorn_conf.py
bind = '0.0.0.0:8811'
worker_class = 'sync'
loglevel = 'debug'
accesslog = '/var/log/gunicorn/access_log_yourapp'
acceslogformat ="%(h)s %(l)s %(u)s %(t)s %(r)s %(s)s %(b)s %(f)s %(a)s"
errorlog = '/var/log/gunicorn/error_log_yourapp'
In the documentation you may find all possible identifiers for your access log.
Then just do
/path-to-your-project/gunicorn -c gunicorn_conf.py forward_to_es:app
This way you may have one or more configurations or even create various logs depending on the configuration you are trying.

Not able to connect to Hipchat with errbot ? getting permission denied for socket .

While connect error bot with self hosted . Getting this error while doing it -
10:40:34 DEBUG sleekxmpp.xmlstream.xmlst RECV: <proceed xmlns="urn:ietf:params:xml:ns:xmpp-tls" />
10:40:34 DEBUG sleekxmpp.features.featur Starting TLS
10:40:34 INFO sleekxmpp.xmlstream.xmlst Negotiating TLS
10:40:34 INFO sleekxmpp.xmlstream.xmlst Using SSL version: TLSv1
10:40:34 DEBUG sleekxmpp.xmlstream.xmlst Event triggered: socket_error
10:40:34 ERROR sleekxmpp.xmlstream.xmlst **Socket Error #13: Permission denied**
10:40:34 DEBUG sleekxmpp.xmlstream.xmlst reconnecting...
This is config which i am using for same .
BACKEND = 'Hipchat' # Errbot will start in text mode (console only mode) and will answer commands from there.
BOT_DATA_DIR = r'/Users/XXX/errbot/errbot/data'
BOT_EXTRA_PLUGIN_DIR = '/Users/XXXX/errbot/errbot/plugins'
BOT_LOG_FILE = r'/Users/XXXX/errbot/errbot/errbot.log'
BOT_LOG_LEVEL = logging.DEBUG
BOT_ADMINS = ('#XXXXX', ) # !! Don't leave that to "CHANGE ME" if you connect your errbot to a chat system !!
# The identity, or credentials, used to connect to a server
BOT_IDENTITY = {
'username': 'XXXX', # The JID of the user you have created for the bot
'password': 'XXXXX', # The corresponding password for this user
'token': 'XXXXXX',
'endpoint' : 'https://xxxx.xxxx.com',
}
Can someone please let me know what i am doing wrong in above config ?
Or please also suggest any other bot (in python) that works with self hosted Hipchat .
Hipchat Server removed external access to the XMPP ports on the 2.0.7 release, in favor of supporting only communication over port 443 (using XMPP's BOSH protocol).
Depending on your server version, you might be able to enable them back by running hipchat network --enable-xmpp-ports.
https://confluence.atlassian.com/hipchatkb/external-xmpp-ports-5222-5223-disabled-by-default-in-hipchat-server-2-0-7-859442760.html has more information on this topic.

Resources