Bo's blog

Friday, July 20, 2018

spring boot ribbon with eureka got "No instances available for xxx"


I created a wiki page for this issue "No instances available for xxx"

and the test project pushed to github: https://github.com/bgao-ca/spring-cloud-test


Labels: , ,

Friday, August 14, 2015

JBWEB002004: More than the maximum number of request parameters (GET plus POST) for a single request (512) were detected. Any parameters beyond this limit have been ignored. To change this limit, set the maxParameterCount attribute on the Connector.


Issue:

(Thread-1295 (HornetQ-client-global-threads-844348376)) 09:09:31,348 INFO  [...] message: java.lang.IllegalStateException: JBWEB002004: More than the maximum number of request parameters (GET plus POST) for a single request (512) were detected. Any parameters beyond this limit have been ignored. To change this limit, set the maxParameterCount attribute on the Connector.
        at org.apache.tomcat.util.http.Parameters.addParameter(Parameters.java:184)
        at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:360)
        at org.apache.tomcat.util.http.Parameters.processParameters(Parameters.java:213)
        at org.apache.catalina.connector.Request.parseParameters(Request.java:2880)
        at org.apache.catalina.connector.Request.getParameter(Request.java:1298)
        at org.apache.catalina.connector.RequestFacade.getParameter(RequestFacade.java:350)
...
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)


Solution: 

/system-property=org.apache.tomcat.util.http.Parameters.MAX_COUNT:add(value=-1)

Labels: , ,

Tuesday, March 11, 2014

JMeter:http request with while and csv config

User Defined Variables
add vailables
host localhost
newUserName 111

HTTP Request Defaults
Server name or IP : ${host}                 Port Number: 80
Path: /

    Thread Group
    Number of Threads = 10  
    Loop Count = 1
        . . .
        While Controller
        Condition = ${__javaScript("${newUserName}"!="",)}  // this will repeat until EOF

            CSV Data Set Config
            Filename = ${__property(user.dir)}${__BeanShell(File.separator,)}${__P(users-list,)}    // path to generated users-list
            Variable Names = newUserName,newUserPwd    // these are test-users details read from file into pointed variables
            Delimiter =,
            Recycle on EOF? = False
            Stop thread on EOF? = True
            Sharing Mode = Current thread

            HTTP Request
HTTP Request Method: POST
Body Data:

${newUserName}
${newUserPwd}


Aggregate Graph

View Results in Table
Filename = C:\work\tools\apache-jmeter-2.11\GICTest\Test Result

View Results Tree (will have request and result in the result list)


userlist.csv
========================
username1,password1
username2,password2

Labels:

Monday, March 03, 2014

find what process is using a TCP port in Windows


The following command will show what network traffic is in use at the port level:
> netstat -a -n -o
The -o parameter will display the associated process identifier (PID) using the port. if the PID for the listening port is 525, then use the following command to find the program

tasklist /svc /FI "PID eq 525"

Thursday, February 14, 2013

MS Access Update with join



                    UPDATE my_brand AS m INNER JOIN brand AS m1 ON m.parent_id = m1.brand_id
                    SET
                      m.description = m1.description,
                      m.[image] = m1.[image];


                    INSERT INTO Customers SELECT * FROM [New Customers];

Labels: ,

Tuesday, October 30, 2012

[Symfony2] Extract the current namespace, bundle, controller and action name


$matches    = array();
$controller = $this->getRequest()->attributes->get('_controller');
preg_match('/(.*)\\\Bundle\\\(.*)\\\Controller\\\(.*)Controller::(.*)Action/', $controller, $matches);
 
$request = $this->getRequest();
$request->attributes->set('namespace',  $matches[1]);
$request->attributes->set('bundle',     $matches[2]);
$request->attributes->set('controller', $matches[3]);
$request->attributes->set('action',     $matches[4]);

Labels:

Thursday, April 26, 2012

sed command


sed 's/\([^<]*\)/\1_TRN01/' test_file


CATA_PRD ==> CATA_PRD_TRN01