How to use sysbench with ssl? - ssl

i'm trying sysbench --tables=100 --table-size=1000 --threads=8 --mysql-db=sbtest --mysql-user=sbtest_user --time=300 --mysql-password=Admin#123 --mysql-host=127.0.0.1 --mysql-port=3306 --mysql-ssl-ca=/etc/mysql/ca-cert.pem --mysql-ssl=on /usr/share/sysbench/oltp_read_write.lua run

Related

How to solve the error "No Protocol specified" for ClusterSSH

I'm trying to setup ClusterSSH on my OpenSuse 15.1 - yet I'm getting an error and I've looked around and cannot find a solution.
mschumacher#Desktop:~/.clusterssh> cssh -l mschumacher 10.0.96.26
Connection to server failed -- (version 11.0)
No protocol specified
at /usr/lib/perl5/vendor_perl/5.26.1/App/ClusterSSH.pm line 1983.
In the file /home/mschumacher/.clusterssh/config I have..
#auto_close=5
#auto_quit=yes
#command=
#comms=ssh
#console=console
#console_args=
#console_position=
#debug=0
#external_cluster_command=
#extra_cluster_file=
#extra_tag_file=
#history_height=10
#history_width=40
#key_addhost=Control-Shift-plus
#key_clientname=Alt-n
#key_history=Alt-h
#key_localname=Alt-l
#key_macros_enable=Alt-p
#key_paste=Control-v
#key_quit=Alt-q
#key_retilehosts=Alt-r
#key_username=Alt-u
#lang=en
#macro_hostname=%h
#macro_newline=%n
#macro_servername=%s
#macro_username=%u
#macro_version=%v
#macros_enabled=yes
#max_addhost_menu_cluster_items=6
#max_host_menu_items=30
#menu_host_autotearoff=0
#menu_send_autotearoff=0
#mouse_paste=Button-2
#rsh=rsh
#rsh_args=
#screen_reserve_bottom=60
#screen_reserve_left=0
#screen_reserve_right=0
#screen_reserve_top=0
#send_menu_xml_file=/home/mschumacher/.clusterssh/send_menu
#sftp=sftp
#sftp_args=
#show_history=0
ssh=/usr/bin/ssh
#ssh_args=
#telnet=telnet
#telnet_args=
#terminal=xterm
#terminal_allow_send_events=-xrm '*.VT100.allowSendEvents:true'
#terminal_args=
#terminal_bg_style=dark
#terminal_colorize=1
#terminal_decoration_height=10
#terminal_decoration_width=8
#terminal_font=6x13
#terminal_reserve_bottom=0
#terminal_reserve_left=5
#terminal_reserve_right=0
#terminal_reserve_top=5
#terminal_size=80x24
#terminal_title_opt=-T
#title=CSSH
#unmap_on_redraw=no
#use_all_a_records=0
#use_hotkeys=yes
#use_natural_sort=0
#window_tiling=yes
#window_tiling_direction=right
user=mschumacher
I'll keep digging around to see if I can figure out what the issue(s) are, but hopefully, it will be something simple to do.
My solution:
Log in as root. Type in the command "xhost +", which should come back with "access control disabled, clients can connect from any host". Exit out of root and able to use cssh.

While Download Works But Post Request Not (Chilkat)

I am facing a very wired issue, and passed so many hours to find the issue but without any luck :(
i have setup a web server on my mobile (android)..
and trying to use that using my vb application
where i simple call Download method on the very sample url (same ip/port), it works and save the response body as downloaded file.
but when i try to send post command it is not working, it gives error "Connection rejected"
here is the code to download:
objDHTTP.Download("http://192.168.1.101:8000/fileAdmin.php", strAppDir & "\wtf-response.txt")
here is the code when i tried to use same url and port for post request:
objDRequest.Path = "/fileAdmin.php"
objDRequest.AddParam("fileAction", "Upload")
objDRequest.AddParam("fileName", "DB.sql")
objDRequest.AddFileForUpload("adminFile", strAppDir & "\c.dll")
objDResponse = objDHTTP.SynchronousRequest(strServerIP, 8000, False, objDRequest)
but it does not works and throws above error
here is the success response (for download method):
<ChilkatLog>
<Download>
<DllDate>Dec 21 2018</DllDate>
<ChilkatVersion>9.5.0.76</ChilkatVersion>
<Architecture>Little Endian; 32-bit</Architecture>
<Language>.NET 4.0</Language>
<VerboseLogging>0</VerboseLogging>
<url>http://192.168.1.101:8000/fileAdmin.php</url>
<toLocalPath>G:\wtf-sucess.txt</toLocalPath>
<currentWorkingDir>G:\</currentWorkingDir>
<a_httpDownload>
<httpDownloadFile>
<localFilePath>G:\wtf-sucess.txt</localFilePath>
<localFileAlreadyExists>1</localFileAlreadyExists>
<quickHttpRequest>
<httpVerb>GET</httpVerb>
<url>http://192.168.1.101:8000/fileAdmin.php</url>
<openHttpConnection>
<info>Opening connection directly to HTTP server.</info>
<httpHostname>192.168.1.101</httpHostname>
<httpPort>8000</httpPort>
<tls>False</tls>
<info>HTTP connection succeeded.</info>
</openHttpConnection>
<buildQuickRequest>
<genStartLine>
<startLine>GET /fileAdmin.php HTTP/1.1</startLine>
</genStartLine>
<addCookies>
<info>Not auto-adding cookies.</info>
<sendCookies>1</sendCookies>
<cookieDir></cookieDir>
</addCookies>
</buildQuickRequest>
<sendRequestHeader>
<sendHeaderElapsedMs>0</sendHeaderElapsedMs>
</sendRequestHeader>
<statusCode>200</statusCode>
<statusText>OK</statusText>
<checkCloseConnection>
<info>Response includes connection:close header (or proxy-connection:close header)</info>
</checkCloseConnection>
</quickHttpRequest>
<outputLocalFileSize>26</outputLocalFileSize>
<numOutputBytesWritten>26</numOutputBytesWritten>
</httpDownloadFile>
</a_httpDownload>
<totalElapsedMs>47</totalElapsedMs>
<ContentLength>0</ContentLength>
<info>Success.</info>
</Download>
</ChilkatLog>
And here is the error/fail response (for post request):
<ChilkatLog>
<SynchronousRequest>
<DllDate>Dec 21 2018</DllDate>
<ChilkatVersion>9.5.0.76</ChilkatVersion>
<Architecture>Little Endian; 32-bit</Architecture>
<Language>.NET 4.0</Language>
<VerboseLogging>0</VerboseLogging>
<domain>191.168.1.101</domain>
<port>8000</port>
<ssl>0</ssl>
<httpRequest>
<httpVersion>1.1</httpVersion>
<verb>POST</verb>
<path>/fileAdmin.php</path>
<contentType>multipart/form-data</contentType>
<charset>windows-1252</charset>
<sendCharset>0</sendCharset>
<mimeHeader></mimeHeader>
<requestParams>
<requestItem>
<name>fileAction</name>
<value>Upload</value>
</requestItem>
<requestItem>
<name>fileName</name>
<value>DB.sql</value>
</requestItem>
<requestItem>
<name>adminFile</name>
<fileOnDisk>G:\c.dll</fileOnDisk>
<numValueBytes>8697</numValueBytes>
</requestItem>
</requestParams>
</httpRequest>
<fullRequest>
<a_synchronousRequest>
<generateRequestHeader>
<httpRequestGenStartLine>
<genStartLine>
<startLine>POST /fileAdmin.php HTTP/1.1</startLine>
</genStartLine>
</httpRequestGenStartLine>
<addCookies>
<info>Not auto-adding cookies.</info>
<sendCookies>1</sendCookies>
<cookieDir></cookieDir>
</addCookies>
<genMultipartFormData>
<requestParam>
<name>fileAction</name>
</requestParam>
<requestParam>
<name>fileName</name>
</requestParam>
<requestParam>
<name>adminFile</name>
<filename>G:\c.dll</filename>
</requestParam>
</genMultipartFormData>
</generateRequestHeader>
<fullHttpRequest>
<domain>191.168.1.101</domain>
<port>8000</port>
<ssl>0</ssl>
<openHttpConnection>
<info>Opening connection directly to HTTP server.</info>
<httpHostname>191.168.1.101</httpHostname>
<httpPort>8000</httpPort>
<tls>False</tls>
<socket2Connect>
<connect2>
<connectSocket>
<connect_ipv6_or_ipv4>
<info>Connection attempt failed.</info>
<maxWaitTimeMs>10000</maxWaitTimeMs>
<totalMsWaitedSoFar>2100</totalMsWaitedSoFar>
</connect_ipv6_or_ipv4>
<connect_ipv6_or_ipv4>
<info>Connection attempt failed.</info>
<maxWaitTimeMs>10000</maxWaitTimeMs>
<totalMsWaitedSoFar>2150</totalMsWaitedSoFar>
</connect_ipv6_or_ipv4>
</connectSocket>
<ConnectFailReason>Connection rejected</ConnectFailReason>
<error>A few possible causes for a connection being rejected are:</error>
<error>- A firewall (software or hardware), such as Windows Firewall, is blocking the connection .</error>
<error>- Nothing is listening at the remote host:port</error>
</connect2>
</socket2Connect>
</openHttpConnection>
</fullHttpRequest>
<success>0</success>
</a_synchronousRequest>
<success>0</success>
</fullRequest>
<totalTime>Elapsed time: 4390 millisec</totalTime>
<error>Failed.</error>
</SynchronousRequest>
</ChilkatLog>
can any one tell me what could be the reason for this?
thanks in advance
best regards
The likely reasons are present in the LastErrorText:
<ConnectFailReason>Connection rejected</ConnectFailReason>
<error>A few possible causes for a connection being rejected are:</error>
<error>- A firewall (software or hardware), such as Windows Firewall, is blocking the connection .</error>
<error>- Nothing is listening at the remote host:port</error>
My guess is that the Windows Firewall is blocking the outbound POST.
This example shows the errors one would get for various TCP socket connection problems: https://www.example-code.com/vbnet/socket_connect_fail.asp

Getting 'ERR EXEC without MULTI' when using RedisIO from Apache Beam API.

I'm reading data from BigQuery and writing to Redis using RedisIO from Apache Beam API. Below is the code snippet.
pipeline.apply("Read Data From BigQuery",
BigQueryIO.readTableRows().withoutValidation()
.fromQuery(""))
.apply("Convert Table rows into Redis Entity",
ParDo.of(new RedisEntity()))
.apply("Write to Redis",
RedisIO.write().withEndpoint("localhost", 6379));
When trying to execute the code, I get 2,000 records written in redis and after that getting the below error.
redis.clients.jedis.exceptions.JedisDataException: EXEC without MULTI
at redis.clients.jedis.Pipeline.exec(Pipeline.java:139)
at org.apache.beam.sdk.io.redis.RedisIO$Write$WriteFn.processElement(RedisIO.java:419)
Kindly advice if I'm missing something or if there is a better way to do it.
Seem like a bug in RedisIO, I have submitted an issue to Beam, and have done a pull request to fix it. See if I guess it correctly. issues.apache.org/jira/browse/BEAM-5714

Fetch more than 1000 records from dynamic AX

I am trying to fetch more than 1000 records from dynamic Ax using document service.But i am unable to fetch more than 1000 records.
We are using Mule esb to fetch the records from dynamic Ax using dynamic Ax connector.We have also tried by using static Query but we are getting following error :
Connection Reset(java.net.SocketException) invoking
https://10.10.1.23:9333/router :connection reset
When we test the connection in mule it gives test connection successful.
Is there any possible way to fetch thousands of record from dynamic Ax?
Thanks in advance
You might need to tweak the settings on the Windows Gateway Services instance running on https://10.10.1.23:9333/router.
Specifically the AX connector related settings such as max buffer size and max received message size. The settings are tweaked in the config file of the service called Mule.SelfHost.exe.config, which should reside in the installation directory. After tweaking remember to restart the service!
See this guide for more details:
https://docs.mulesoft.com/mule-user-guide/v/3.8/windows-gateway-services-guide#configuring-dynamics-crm-and-ax-connector-settings

julia on PBS cluster: what to give to addprocs()?

I'm trying to setup a cluster across machines on a PBS managed cluster. I'm perfectly able to compute within one node by saying julia -p 12 (after having reserved one node with 12 CPUs).
I understand that to use several machines, I have to add them to the master process with addprocs. I was able to do that on a different cluster (SGE). on this one here something is going wrong.
You can see everything I'm doing, including submit scripts etc, on this branch of a github repo.
to get a list of machines, I parse the PBS_NODEFILE, which for the case of a submit script with option
#PBS -l nodes=2:ppn=12 # give me 2 nodes with 12 processors each
looks like something like this:
red0004
red0004
...
red0004
red0347
...
red0347
I parse this file with bind_pe_procs() in sge.jl in the repo and give a vector of machine names to addprocs. When I submit this I get this error which I put up a gist with the resulting SSH error. I don't know what it means.
has this to do with a system setting, ie do i have to talk to the sys admin about SSH between machines? What are the right questions to ask?
I am unsure about what exactly I have to give to addprocs(). I don't want to add the master process (I don't want worker 1 SSHing into itself?), so I exclude ENV["HOST"] = node001 from my list. but what about all processors with the same name node002? do i list all of those
machines = [ "red0347" for i=1:12]
or just once
machines = ["red0347"]
in addprocs(machines)
thanks!