SQLServer 2008 - Configuring Service Broker between instances - sql-server

I've been using the scripts from this website to help configure Service Broker based auditing. The first stage - setting up SB between databases on the same instance works fine.
But then, when I try to apply Service Broker between instances, I'm running into grief.
I'm using the command line tool, ssbdiagnose to help me find the config errors:
ssbdiagnose -E CONFIGURATION FROM SERVICE tcp://192.168.0.220:4022/Trial/Audit/DataSender -S sqlserver1 -d Trial TO SERVICE //Audit/DataWriter -d MasterAuditDatabase -S devmachine1 ON CONTRACT //Audit/Contract ENCRYPTION OFF
which is reporting
An internal exception occurred: Input string was not in a correct format.
Now this is just checking the config, I haven't even got to the point where I'm sending a message, so the "Input String" must be part of the configuration, but the error message doesn't say where the error occurred and I can't find anything online about diagnosing ssbdiagnose errors.
Can anyone with experience of ssbdiagnose help me understand where the error is, and what I need to do to fix it?
Chris

Wrap the service names and contract names in quotes:
ssbdiagnose -E CONFIGURATION
FROM SERVICE "tcp://192.168.0.220:4022/Trial/Audit/DataSender"
-S sqlserver1 -d Trial
TO SERVICE "//Audit/DataWriter"
-d MasterAuditDatabase -S devmachine1
ON CONTRACT "//Audit/Contract" ENCRYPTION OFF

Related

SnowSQL connection test fails with "No module named 'win32timezone'"

I've just installed SnowSQL for Windows as per the instructions at https://docs.snowflake.com/en/user-guide/snowsql-install-config.html#installing-snowsql-on-microsoft-windows-using-the-installer
However, when I attempt to connect to Snowflake, it fails:
C:\>snowsql -a <account> -u <user> --authenticator externalbrowser -o log_level=DEBUG
No module named 'win32timezone'
If the error message is unclear, enable logging using -o log_level=DEBUG and see the log to find out the cause. Contact support for further help.
Goodbye!
C:\>snowsql -v
Version: 1.2.7
Any ideas appreciated
What version of windows are you using? How did you install?
No module named 'win32timezone'
Per the official documentation snowsql is a python application. The error message above is a python error indicating it cannot find the aforementioned package. However, installing that package is not likely a fix as snowsql appears to ship with a version of python. Which makes a lot of sense, dealing with python dependencies is a nightmare.
I started a Windows 2016 host in AWS and installed snowsql 1.2.7 via the MSI. I was able to get to the login screen without any problems.
I would completely remove snowsql, do a search for snowsql and delete any folders you find, then reinstall. If it's still not working I'd provide more information as requested above.
This was acknowledged as a defect by Snowflake, and they will fix it in a newer version. The workaround is to install v 1.2.5, and invoke this version from the command line
snowflake <options> -v 1.2.5

IBM Cloud Private-Community Edition - Waiting for cloudant database initialization

I tried below command
docker run --rm -t -e LICENSE=accept --net=host -v "$(pwd)":/installer/cluster ibmcom/icp-inception:2.1.0 install
the response is
Waiting for cloudant initialization
I entered the command received the logs shown in the image. No error shown. Please give a solution
From the error message, for cloudant database initialization issue, it may be caused by the cloudant docker image is pulled from dockerhub while ICP installation. The cloudant docker image is big, you can run below command to check whether the image is ready in your environment.
$ docker images | grep icp-datastore
If the cloudant docker image is ready in your environment, and the ICP installation still has cloudant database initialization issue, you can try to install the latest ICP 2.1.0.3 Community Edition. From 2.1.0.3, ICP removes the cloudant database. The ICP 2.1.0.3 installation documentation:
https://www.ibm.com/support/knowledgecenter/en/SSBS6K_2.1.0.3/installing/install_containers_CE.html
If you still want to check the cloudant database initialization issue in ICP 2.1.0.1 environment, you can:
Ensure your ICP nodes match the system and hardware requirements firstly.
https://www.ibm.com/support/knowledgecenter/en/SSBS6K_2.1.0/supported_system_config/system_reqs.html
Let us know the ICP installation configurations. You can check the contents for config.yaml and hosts files.
Check the system logs (in /var/log/messages or /var/log/syslog file) to find the relevant errors.
Run 'docker logs ' command to check the logs or errors.

Rank & Retrieve, Failed to connect to gateway.watsonplatform.net

I am trying to create a Create Solr cluster using java class as given in steps on below link as shown here
but i am getting following error, can this be firewall issue?
Using JAVA
com.ibm.watson.developer_cloud.service.WatsonService execute SEVERE: IOException java.net.ConnectException: Failed to connect to gateway.watsonplatform.net/:443 at com.squareup.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:139) at com.squareup.okhttp.internal.io.RealConnection.connect(RealConnection.java:108) at com.squareup.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:184) at com.squareup.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:126) at com.squareup.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:95) at com.squareup.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:281) at com.squareup.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:224) at com.squareup.okhttp.Call.getResponse(Call.java:286) at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:243) at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:205) at com.squareup.okhttp.Call.execute(Call.java:80) at com.ibm.watson.developer_cloud.service.WatsonService.execute(WatsonService.java:122) at com.ibm.watson.developer_cloud.service.WatsonService.executeRequest(WatsonService.java:183) at com.ibm.watson.developer_cloud.retrieve_and_rank.v1.RetrieveAndRank.createSolrCluster(RetrieveAndRank.java:168) at Test.artf.CreateASolrClusterExample.main(CreateASolrClusterExample.java:20)
Using CURL
When i try using curl command as below that also gives connection error as below.
curl -X POST -u "":"" "https://gateway.watsonplatform.net/retrieve-and-rank/api/v1/solr_clusters" -d ""
Response:
curl: (7) couldn't connect to host
when i put the link in curl command in crome, it pop up for id/password. After giving id/password returns me
{"clusters":[]}
The service is experiencing some issues currently; the team is aware and working on it. Sorry for the trouble, please try again in a little while.

Unable to connect to database: SequelizeConnectionRefusedError: connect ECONNREFUSED

Whenever i launch my app, part of my task is to first run a migration. however, I get the below error 95% of the time.
Command failed: /bin/sh -c node_modules/.bin/sequelize db:migrate
Unable to connect to database: SequelizeConnectionRefusedError: connect ECONNREFUSED
Details:
killed: false
code: 1
signal: null
cmd: /bin/sh -c node_modules/.bin/sequelize db:migrate
stdout:
Sequelize [Node: 0.12.7, CLI: 2.1.0, ORM: 3.14.0]
Note: I can still query and connect to the database after the failure, also when i check the TCP lsof -i tcp:5432 its only one instance of postgres that runs.
I would appreciate any assistance in solving this issue.
I had similar issue , but in my case it turn out I didn't start my posgres. Make sure your posgress is started and open otherwise Sequelize would fail. I just solve mine. Also mind your username and password . my connection is simple below.
var db ='postgres://user:#localhost:5432/my_db_naame'
var sequelize = new Sequelize(db);
where user is your database user . my_db_naame is your db name. See the doc here . I suggest you install posgres client terminal. Like the one here http://postgresapp.com/documentation/gui-tools.html . Make sure you open it and the elephant sign is shown on top . Or better connect , try your username and password. run some queries and then try your sequelize again.

Reverse enginerring PostgreSQL database with SSL connection in SchemaSpy

When running SchemaSpy get error:
Connection failed because of the following error: "no pg_hba.conf entry for host "xxx.xxx.xxx.xxx", user "xxxx", database "xxx", SSL off"
The error occurs because the database does require an SSL connection.
Is there a way to turn on the SSL flag for a connection in SchemaSpy, I opened up the jar file but couldn't find anything. I know the PostgreSQL JDBC Driver supports SSL so this should be theoretically possible.
Otherwise if any one knows any opensource/freeware tools for reverse engineering a postgresql database with an SSL connections, that would help a lot.
Thanks.
Do it like this:
java -jar schemaSpy_5.0.0 -t pgsql -host your-host-url -db your-database-name -s your-database-schema -u your-username -p your-password -connprops "ssl\=true;sslfactory\=org.postgresql.ssl.NonValidatingFactory" -o path-to-your-output-directory -dp path-to-your-jdbc-driver-jar-file
The trick: adding some additional parameters using the -connprops option: we are setting SSL to true (ssl parameter) and we are asking the client (i.e., the driver) to unconditionally accept the SSL connection (sslfactory parameter).
Per the PgJDBC documentation, use the ssl=true option in your URL's parameters, e.g.
jdbc:postgresql://myhost/mydb?ssl=true
If the host doesn't have a valid certificate or the cert doesn't match its hostname you can disable SSL validation too.
SchemaSpy accepts a JDBC URL for the connection, so this will work fine.

Resources