Set username/password in mosquitto - mosquitto

I have configured the mosquitto configuration file
as shown in image
But still when i run broker , I am still able to connect client without any usename and passwd. What am i doing wrong ?

# is used to comment out things in the config file. Remove the # before the configs you have done and retry.

Related

When connecting to owncloud i get 'You are accessing the server from an untrusted domain'

Just installed owncloud using the instructions in https://doc.owncloud.com/server/next/admin_manual/installation/docker/ and when I try to connect to the server from my machine I get the following error message...
You are accessing the server from an untrusted domain.
Please contact your administrator. If you are an administrator of this instance, configure the "trusted_domains" setting in config/config.php. An example configuration is provided in config/config.sample.php or at the documentation.
IK what the error message means and how I would normally fix it in a standard apache setup, but how do I change these in the docker images?
I tried changing the line OWNCLOUD_TRUSTED_DOMAINS in the .env file to a wildcard (originally it said localhost) and that did not help.

Error code 80c6 occurs when tia portal connects to mosquitto broker [duplicate]

I have a virtual machine that is supposed to be the host, which can receive and send data. The first picture is the error that I'm getting on my main machine (from which I'm trying to send data from). The second picture is the mosquitto log on my virtual machine. Also I'm using the default config, which as far as I know can't cause these problems, at least from what I have seen from other examples. I have very little understanding on how all of this works, so any help is appreciated.
What I have tried on the host machine:
Disabling Windows defender
Adding firewall rules for "mosquitto.exe"
Installing mosquitto on a linux machine
Starting with the release of Mosquitto version 2.0.0 (you are running v2.0.2) the default config will only bind to localhost as a move to a more secure default posture.
If you want to be able to access the broker from other machines you will need to explicitly edit the config files to either add a new listener that binds to the external IP address (or 0.0.0.0) or add a bind entry for the default listener.
By default it will also only allow anonymous connections (without username/password) from localhost, to allow anonymous from remote add:
allow_anonymous true
More details can be found in the 2.0 release notes here
You have to run with
mosquitto -c mosquitto.conf
mosquitto.conf, which exists in the folder same with execution file exists (C:\Program Files\mosquitto etc.), have to include following line.
listener 1883 ip_address_of_the_machine(192.168.1.1 etc.)
By default, the Mosquitto broker will only accept connections from clients on the local machine (the server hosting the broker).
Therefore, a custom configuration needs to be used with your instance of Mosquitto in order to accept connections from remote clients.
On your Windows machine, run a text editor as administrator and paste the following text:
listener 1883
allow_anonymous true
This creates a listener on port 1883 and allows anonymous connections. By default the number of connections is infinite. Save the file to "C:\Program Files\Mosquitto" using a file name with the ".conf" extension such as "your_conf_file.conf".
Open a terminal window and navigate to the mosquitto directory. Run the following command:
mosquitto -v -c your_conf_file.conf
where
-c : specify the broker config file.
-v : verbose mode - enable all logging types. This overrides
any logging options given in the config file.
I found I had to add, not only bind_address ip_address but also had to set allow_anonymous true before devices could connect successfully to MQTT. Of course I understand that a better option would be to set user and password on each device. But that's a next step after everything actually works in the minimum configuration.
For those who use mosquitto with homebrew on Mac.
Adding these two lines to /opt/homebrew/Cellar/mosquitto/2.0.15/etc/mosquitto/mosquitto.conf fixed my issue.
allow_anonymous true
listener 1883
you can run it with the included 'no-auth' config file like so:
mosquitto -c /mosquitto-no-auth.conf
I had the same problem while running it inside docker container (generated with docker-compose).
In docker-compose.yml file this is done with:
command: mosquitto -c /mosquitto-no-auth.conf

AppDynamics monitoring with AMQ 7.0.1

I am using the ActiveMQ extension of AppDynamics. It is good to start. With JMXRemote(enabled in artemis.profile) it is OK. But, I want it from localhost. JMX is enabled by default for localhost for AMQ. AMQ management console use jmx internally and it works without JMXRemote enabled. What service URL jolokia use internally to connect using JMX from localhost? I have tryed with following URL:
serviceUrl: "service:jmx:rmi:///jndi/rmi://:1099/jmxrmi"
The first step is to add a username and password in the etc/users.properties file. For most purposes, it is ok to just
use the default settings provided out of the box. For this, just uncomment the following line:
admin=admin,admin,manager,viewer,Operator, Maintainer, Deployer, Auditor, Administrator, SuperUser
Then, you must bypass credential checks on BrokeViewMBean by adding it to the whitelist ACL configuration. You can do so by replacing this line:
org.apache.activemq.Broker;getBrokerVersion=bypass
with this:
org.apache.activemq.Broker=bypass
In addition to being the correct way, it also enables several different configuration options (eg: port, listen address, etc) by just changing the file org.apache.karaf.management.cfg on broker's etc directory.
Please keep in mind that JMX access is made through a different JMX connector root in this case: it uses karaf-root instead of jmxrmi, which was previously used in the older method. It also uses port 1099 by default, instead of 1616.
Therefore, the uri should be
service:jmx:rmi:///jndi/rmi://<host>:<port>/karaf-root

Why does Jenkins keep telling me it is offline?

I am not getting option to install plugins in Jenkins. Instead getting two options Configure Proxy and Skip Plugin Installations.
Might be worth checking - I did a mistake myself and spent a day checking.
Just mention the IP, and not the complete address in Server field in jenkins while configuring proxy.
So, let us suppose your proxy is http://x.x.x.x:8080 - so just put x.x.x.x in server field.
Navigate to C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins.jenkins,
Modify "hudson.model.UpdateCenter.xml" file by changing the URL property to "http"
Finally Open CMD with Admin privilege and run.
net stop jenkins
net start jenkins

Forgot Neo4j Server Password

Because this question was never answered, I was hoping someone could help me reset the password to connect to my neo4j password (at localhost:7474). Zachary wrote a post on solving this by someone restarting the service using:
sudo service neo4j-service restart
but I did not find this helpful. In the terminal, I ran bin/neo4j restart (which I think is the equivalent command), and was not able to reset my password.
Depending on environment and installation type you need to look for a file named auth under directory dbms and remove it.
In MacOs, for dmg installations (adjust for custom locations):
/Users/xyz/Documents/Neo4j/default.graphdb/dbms/auth
or (homebrew install)
/usr/local/Cellar/neo4j/x.x.x/libexec/data/dbms/auth
Windows users should look for same file in the default.graphdb/dbms directory.
In Ubuntu
/var/lib/neo4j/data/dbms/auth
In docker containers
/var/lib/neo4j/data/dbms/auth
Alternatively, you might choose to disable auth in the configuration file, usually found in
MacOs:
/Users/xyz/Documents/Neo4j/.neo4j.conf
or
/usr/local/Cellar/neo4j/x.x.x/libexec/conf
and set this property to false
dbms.security.auth_enabled=false
After doing this, you need to restart the server for changes to make effect, you will be asked for a new password.
In window machine, I deleted the auth file at following path :
Users\systemUser\Documents\Neo4j\default.graphdb\data\dbms and then I restarted the neo4j server.
Navigate to http://localhost:7474. It will ask you to enter the password for user neo4j. Enter default password (neo4j)
After this you will be navigated to change password screen. Change your password.
Note : for other operating systems auth file path may be different
I am running version 4.0.7. Many answers I found on the internet state "Delete /data/dbms/auth". That does not work for 4.0.7, that file does not exist.
I followed these instructions, and they worked.
https://neo4j.com/docs/operations-manual/current/configuration/password-and-user-recovery/
Mainly do this:
Stop neo4j if its running
edit /etc/neo4j/neo4j.conf, and uncomment dbms.security.auth_enabled=false
connect to the database and run
ALTER USER neo4j SET PASSWORD 'mynewpass';
:exit
Stop neo4j
comment out the dbms.security.auth_enabled=false
start neo4j
For the Mac, I had to remove ~/Documents/Neo4j/default.graphdb/data/dbms/auth
Then restart the server, and reset the password.
In addition to deleting the auth file, sudo rm /data/dbms/auth, I also had to set up local port forwarding for the browser port 7474 and the bolt connector port 7687. This is due to the outbound firewall for browsers of the network I am using.
On a DB and on a Windows installation of Neo4j Desktop (others can chime in if it works on Mac and Lnx), you can simply:
stop the DB,
click anywhere along the ribbon with the DB name and the "Open" button (this is hidden until you do a mousehover on this area) - I just click the name as there's no event on that label control and
you'll see along the RHS, the "Details", "Pluggins" and "Upgrade" options - select the "Details".
at the bottom, open the "Reset DBMS password" and you're good to go.
It's a bit scary as you don't need to know the original pwd...but since this should be used only for dev tasks and/or by the dba, that seems good for my lazy needs :)
HTH.

Resources