Controling IP addressed used to issue HTTP request

Hi,
We are looking for a way to control the IP address we use for outgoing HTTP requests so that we can choose between two IP addresses we will have on a linux server. We have a Linux server running Java/Tomcat which is making HTTP GET requests to Web servers. We want to be able to use one IP address when making requests to one Web server and use a different IP address when making requests to another server. The actual Java method we are using to get the page is connection.getInputStream(), and we get a connection with url.openConnection();
Is it possible to control which of the server's IP addresses is used for each request, and if so, how? Is there some way we can set up the Linux server or Tomcat to make it work?
BTW, I believe it is possible to have two IP addresses on a linux server, but I haven't looked into what's involved. Feel free to comment on this if relevant.
Thanks!

It is definately possible to have mutliple IP Addresses on a Linux machine.
As far as setting the local IP Address to bind to when opening a connection, you cannot do this with the Standard HttpURLConnection, HttpsURLConnection, or URLConnection. You can do it, however, using apaches HTTPClient API.

Similar Messages

  • Going through messages in PI using http requests

    Hi,
    I'm researching for an external tool that will handle PI channels.
    I'm aware of the stop, start and status actions that can be used in an http request.
    But what if I want more detailed information?
    For example, if a channel is in status error, is there an http request to get details about the error?
    What about messages? Is there a request I can use to find out what messages came through the channel?
    So what else can I get using http requests besides the basic 3 actions?
    What about RFC calls? Can they be used to get more information on channels/errors/messages?
    Someone has a guide, about the http calls/RFC that can be used.
    Thanks!

    Thing is that one of the requirements is to limit the need to go to SAP and check the errors.
    Also, there is a need to watch for certain message, not necessarily if only error occurred and trigger stuff in my application.
    The tool I'm working on is an enterprise one that also interacts with other applications in the organization, so if I want to create dependencies between different applications covered in my tool I need to get more information than just the status of the channel.
    So, I hope for some additional http calls to get more information, but if there are none, then I'll have to do with what we have

  • Problems issuing continuous requests to a server through URLConnection

    Hi ,
    I have a URLConnection object 'uc' obtained from a URL object tied to a server URL.
    i m issuing HTTP requests continously to this server by calling ' uc = u.openConnection()' everytime
    Hence this will return me a new URL Connection object everytime.
    After some 300-400 requests, the program ends abruptly , this may be due to shortage of resources to be allocated to the I/O streams of the URL connection.
    My question is -is there some way to issue multiple requests from the same URL Connection object ? or is there some other method of issuing multiple requests which does not consume a lot of resources ?
    Note: The server accepts only GET method, so i cant write the contents to the output stream of the connection to translate it to a new request every time .
    Thanx

    My question is -is there some way to issue multiple
    requests from the same URL Connection object ? or is
    there some other method of issuing multiple requests
    which does not consume a lot of resources ?
    A HttpURLConnection instance can only be used to issue one http request. What can be re-used is the underlying TCP connection, with the keep-alive header (HTTP 1.1 persistent connections). But that should be handled transparently and by default by the servlet engine.
    The later is able to manipulate the stream to increase performance, if you do not close the stream, i.e you don't call conn.disconnect() or by specify the "Connection: close" request property
    ( conn.setRequestProperty("Connection", "close") )
    So, you shouldn't actually close the steam, just flush it (if you close it, the physical socket connection will be terminated).
    All the http persistent connection/keep-alive issues were apparently fixed in J2SE 1.4.1 ....(are you using 1.4 ?)
    To optimize further, you could take a look at :
    http://jakarta.apache.org/commons/httpclient/

  • Doubts about HTTPS requests and Java proxy

    Hello,
    I need help about SSL connections and Java.
    I'm developing a HTTP/S proxy with Java. To test my proxy, I use Firefox. I configure the proxy option in the browser. The proxy works good with HTTP requests, but with HTTPS requests doesn't work and I don't know why.
    I explain the steps that I do for a HTTPS request:
    * The browser sends a CONNECT message to the proxy.
    I check that the proxy receives the CONNECT request correctly.
    * The proxy establish a secure connection with the content server.
    I use an SSLSocket to connect with my content server, and the SSL handshake is succesful.
    * The proxy sends a 200 HTTP response to the client:
    I send
    HTTP/1.0 200 Connection established[CRLF]
    [CRLF]
    to the application client (Firefox)
    * The proxy sends/receive data to/from Firefox/content server
    I have a Socket between Firefox and my proxy, and a SSLSocket between my proxy and my content server. I use two threads to communicate the client and the server.
    Java code:
    //Thead server-->proxy-->application(Firefox)
    ThreadComm tpa = new ThreadComm(bis_serverSSL, bos_app);
    //Thread application(Firefox)-->proxy-->server
    ThreadComm tap = new ThreadComm(bis_app, bos_serverSSL);
    The "tpa" thread reads from the SSLSocket between the proxy and the server and sends data to the Socket between the proxy and Firefox.
    The "tap" thread reads from the Socket between the proxy and Firefox and sends data to the SSLSocket between the proxy and the server.
    This is the class ThreadComm:
    public class ThreadComm extends Thread{
        private BufferedInputStream bis = null;
        private BufferedOutputStream bos = null;
        public ThreadComm(BufferedInputStream bis, BufferedOutputStream bos) {
            this.bis = bis;
            this.bos = bos;
        @Override
        public void run() {
            int b = -1;
            FileOutputStream fos = null;
              do {
                   try {
                        b = bis.read();
                        System.out.print((char) b);
                        fos.write(b);
                        bos.write(b);
                        bos.flush();
                   } catch (Exception ex) {
                        Logger.getLogger(ThreadAplicacionProxy.class.getName()).log(Level.SEVERE, null, ex);
                        //b=-1;
              } while (b != -1);
        }But this doesn't work and I don't know why.      
    I have an Apache server with the mod_ssl enabled as content server, I can send requests (with Firefox) to the port 80(HTTP request) and 443(HTTPS request) without use my proxy and it works. If I use my proxy, HTTP request works but with HTTPS request doesn't work, I look the log of Apache and I see:
    [Tue Apr 27 17:32:03 2010] [info] Initial (No.1) HTTPS request received for child 62 (server localhost:443)
    [Tue Apr 27 17:32:03 2010] [error] [client 127.0.0.1] Invalid method in request \x80\x7f\x01\x03\x01
    [Tue Apr 27 17:32:03 2010] [debug] ssl_engine_kernel.c(1770): OpenSSL: Write: SSL negotiation finished successfully
    [Tue Apr 27 17:32:03 2010] [info] [client 127.0.0.1] Connection closed to child 62 with standard shutdown (server localhost:443)
    Why it say? Invalid method in request \x80\x7f\x01\x03\x01 , my proxy sends the data that the Firefox sends.
    I think than I have follow the explanations of [1] but doesn't work, I have problems in implementation in Java but I don't know where.
    I appreciate any suggestions.
    Thanks for your time.
    [1] http://www.web-cache.com/Writings/Internet-Drafts/draft-luotonen-web-proxy-tunneling-01.txt

    ejp, I have checked the socket between the proxy and server and ... You are right! , I was using the port 80 instead of the 443 (incredible mistake!, I'm sorry). I was convinced that I was using the port 443... Well, is a little step, but I still have not won the war :)
    If I see the log files of Apache, We can see that something goes wrong.
    localhost-access.log
    >
    127.0.0.1 - - [04/May/2010:17:44:48 +0200] "\x 80\x 7f\x01\x03\x01" 501 219
    >
    localhost-error.log
    >
    [Tue May 04 17:44:48 2010] [info] Initial (No.1) HTTPS request received for child 63 (server localhost:443)
    [Tue May 04 17:44:48 2010] [error] [client 127.0.0.1] Invalid method in request \x80\x7f\x01\x03\x01
    [Tue May 04 17:44:48 2010] [debug] ssl_engine_kernel.c(1770): OpenSSL: Write: SSL negotiation finished successfully
    [Tue May 04 17:44:48 2010] [info] [client 127.0.0.1] Connection closed to child 63 with standard shutdown (server localhost:443)
    >
    I think that this happens because Apache receives the data without decrypt, this is the reason because in the log we can see the "Invalid method in request \x80\x7f\x01\x03\x01". This supposition is true?
    ejp, you say that the "Termination is quite tricky." I have changed my code following yours suggestions (using the join and the shutdownOutput) but the threads don't die.
    I explain you what I do:
    (in time 1)
    I launch the thread (threadFirefoxToApache) that reads data from Firefox and sends to Apache.
    I launch the thread (threadApacheToFirefox) that reads data from Apache and sends to Firefox.
    (in time 2)
    threadFirefoxToApache sends the firts data to the server.
    threadApacheToFirefox is waiting that the server says something.
    (in time 3)
    threadFirefoxToApache is waiting that Firefox says something.
    threadApacheToFirefox sends data to Firefox.
    (in time 4)
    threadFirefoxToApache is waiting that Firefox says something.
    threadApacheToFirefox is waiting that Firefox says something.
    and they are waiting... and never finish.
    In time 2, these first data are encrypted. The server receives these data and It doesn't understand. In time 3, the server sends a HTTP response "501 Method Not Implemented", here there is a problem because this data must be encrypt. According to the documentation that I read, the proxy cannot "understand" this data but I can "understand" this data. What's happen?
    Firefox encrypt the data and send to the proxy. This It's correct.
    The proxy encrypt the data another time, because I use the SSLSocket to send the data to the server. Then the server receives the data encrypted two times, when decrypt the data gets the data encrypted one time. And this is the reason why the server doesn't understand the data that sends Firefox. It's correct? May be.
    Then If I want that the server receives the data encrypted one time I need to use the socketToServer, It's correct?
    I will supposed that yes. If I use the socketToServer, the proxy doesn't understand nothing, because the data received from the socketToServer are encrypted (I only see simbols), but the Apache log says that there is a problem with the version? (If I use the socketToServer the threads die)
    >
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 read finished A
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 write change cipher spec A
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 write finished A
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1760): OpenSSL: Loop: SSLv3 flush data
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1756): OpenSSL: Handshake: done
    [Tue May 04 19:55:42 2010] [info] Connection: Client IP: 127.0.0.1, Protocol: TLSv1, Cipher: RC4-MD5 (128/128 bits)
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_io.c(1817): OpenSSL: read 5/5 bytes from BIO#29bd910 [mem: 29ea0a8] (BIO dump follows)
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_io.c(1750): -------------------------------------------------------------------------
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_io.c(1789): | 0000: 80 7f 01 03 .... |
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_io.c(1793): | 0005 - <SPACES/NULS>
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_io.c(1795): ------------------------------------------------------------------------
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1770): OpenSSL: Write: SSL negotiation finished successfully
    [Tue May 04 19:55:42 2010] [info] [client 127.0.0.1] SSL library error 1 reading data
    [Tue May 04 19:55:42 2010] [info] SSL Library Error: 336130315 error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
    [Tue May 04 19:55:42 2010] [debug] ssl_engine_kernel.c(1770): OpenSSL: Write: SSL negotiation finished successfully
    [Tue May 04 19:55:42 2010] [info] [client 127.0.0.1] Connection closed to child 63 with standard shutdown (server localhost:443)
    >
    What option is the correct? I need use the SSLSocketToServer or socketToServer to send/read the data to/from the server?. Use the SSLSocket has sense because the data travel in a secure socket, but use the Socket also has sense because the data are encrypted and they are protected by this encription. It's complicated...

  • Cache server getcert http request issue

    Hi,
    We are using third party repository for documents archiving and storage. And we have separate application for connecting third party repository to the SAP.
    We have installed content server and cache server on the system where SAP was installed.
    Now we want to run getcert HTTP request from our application so that we will get the certificate from SAP cache server. What we need to do in order to achieve the same? Or in other words how we can make the connectivity between cache server and the third party repository?
    We have verified the following URLs
    http://10.224.1.37:1090/ContentServer/ContentServer.dll?serverInfo
    http://10.224.1.37:1095/Cache/CSProxyCache.dll?serverInfo
    (Where 10.224.1.37 is the IP address of the system where SAP is installed)
    for content server and cache server respectively.
    The URL for cache server was giving the correct server information but URL for content server is not at all showing any server information even after running for long time.
    Could you please tell me step by step by procedure and configuration steps for running get cert request to cache server? We want to know how to send the getcert request to third party content management system from cache server.
    We have given the following URL in http get functional module but we are getting a 400 bad request response
    http://10.224.1.37:1095/Cache/CSProxyCache.dll?getcert&pversion=0046&conrep=RH
    Where RH is pointing to the third party content server (through transaction oac0).
    Thanks,
    Ravi

    Hi All,
    I am also facing the same problem, Please help us out to solve this issue.
    Thanks in advance
    Regards
    Harshavardhan.G

  • Dimmer control for LED lights with HTTP Requests

    Hello,
    I'm al little bit know with LabVIEW, but I have a problem that I can't get fixed.
    For a project we control the led lights in a house with http requests (we use the http get request): this exists of a http address, the number of the light, the PWM (the brightness of the led) and the current.
    Controlling the lights with the switches is easy and is working fine. Now what we want to do is create a dimmer that can be controlled with the switches in the rooms.
    The following should happen: if the users clicks one time (so lets say for less than a second) than the light should just switch on. If he/she pushes the light switch and keeps pushing it than the light should dim.
    So the value of the PWM (and this is a string value) should change from 0 to (lets say) 100 when pushing it once, and it should decrease form 100 tot 0 (step by step) when the user keeps pushing the button. The thing I'm having difficulties with is making a difference between just clicking once and keeping the button pushed for a few seconds in the labview software.
    Any tips or ideas? Any Help is Welcome!
    Thanks
    CORE CVBA

    CORECVBA wrote:
    The thing I'm having difficulties with is making a difference between just clicking once and keeping the button pushed for a few seconds in the labview software.
    It sounds like everything else is working and your problem is to detect the button action details.
    Are you talking about a real physical switch or is this a switch on the LbVIEW front panel?
    All you need to do is detect a off->on transition, When it occurs, place the current tick count into a shift register, then subtract it from the tick count in subsequent iterations (as long as the button is TRUE). Change your output as a function of the elapsed time until the button is released.
    LabVIEW Champion . Do more with less code and in less time .

  • How to use the nl2br() function - or addressing textarea formatting issues

    the textarea does not pass line breaks to mysql - the result in the html output is one long string of text. I would like the user to input into the textarea using the enter key to create new paragraphs.
    I am not a php programmer and rely on the dreamweaver data tools and developer tool kit to create my dynamic content.
    Please send sample code for a form that addresses and corrects this issue. I do not know how/where to modify the code to correct this issue.
    I have searched online but nowhere have I found an example of how to actually write the code. I can do a great deal of manual modification of php code but this one has me stumped for some reason..
    thanks in advance !!!!
    here is the index.php code which contains the form:
    PHP:
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO tw_responses (id, tweet, response, permalink) VALUES (%s, %s, %s, %s)",
                           GetSQLValueString($_POST['id'], "int"),
                           GetSQLValueString($_POST['tweet'], "text"),
                           GetSQLValueString($_POST['response'], "text"),
                           GetSQLValueString($_POST['permalink'], "text"));
      mysql_select_db($database_twitter, $twitter);
      $Result1 = mysql_query($insertSQL, $twitter) or die(mysql_error());
      $insertGoTo = "QA.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      header(sprintf("Location: %s", $insertGoTo));
    mysql_select_db($database_twitter, $twitter);
    $query_Recordset1 = "SELECT * FROM tw_responses";
    $Recordset1 = mysql_query($query_Recordset1, $twitter) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    ?>
    <?php $rs = mysql_fetch_array($resultsetquery);
    $string = nl2br($rs['response']);
    echo($string); ?>
    FORM:
    <form action="<?php echo $editFormAction; ?>" method="post" name="form1" id="form1">
                    <table width="461" align="center" cellpadding="4" cellspacing="4">
                      <tr valign="baseline">
                        <td width="71" align="right" nowrap="nowrap">Question:</td>
                        <td width="360"><input type="text" name="tweet" value="" size="50" /></td>
                      </tr>
                      <tr valign="baseline">
                        <td nowrap="nowrap" align="right" valign="top">Answer:</td>
                        <td><textarea name="response" cols="50" rows="15"></textarea></td>
                      </tr>
                      <tr valign="baseline">
                        <td nowrap="nowrap" align="right"> </td>
                        <td><input type="submit" value="Insert record" />
                        <input type="reset" name="Reset" id="button" value="Reset" /></td>
                      </tr>
                    </table>
                    <input type="hidden" name="id" value="" />
                    <input type="hidden" name="MM_insert" value="form1" />
                  </form>
    Here is QA.php code which contains the output:
    PHP
    <?php require_once('../Connections/twitter.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $maxRows_Recordset1 = 10;
    $pageNum_Recordset1 = 0;
    if (isset($_GET['pageNum_Recordset1'])) {
      $pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
    $startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
    mysql_select_db($database_twitter, $twitter);
    $query_Recordset1 = "SELECT * FROM tw_responses ORDER BY id ASC";
    $query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
    $Recordset1 = mysql_query($query_limit_Recordset1, $twitter) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    if (isset($_GET['totalRows_Recordset1'])) {
      $totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
    } else {
      $all_Recordset1 = mysql_query($query_Recordset1);
      $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
    $totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;$maxRows_Recordset1 = 10;
    $pageNum_Recordset1 = 0;
    if (isset($_GET['pageNum_Recordset1'])) {
      $pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
    $startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
    mysql_select_db($database_twitter, $twitter);
    $query_Recordset1 = "SELECT * FROM tw_responses ORDER BY id DESC";
    $query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
    $Recordset1 = mysql_query($query_limit_Recordset1, $twitter) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    if (isset($_GET['totalRows_Recordset1'])) {
      $totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
    } else {
      $all_Recordset1 = mysql_query($query_Recordset1);
      $totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
    $totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
    ?>
    OUTPUT:
    <?php do { ?>
      <table width="95%" border="0" cellpadding="4" cellspacing="2">
        <tr>
          <td><a name="<?php echo $row_Recordset1['id']; ?>"></a></td>
        </tr>
        <tr>
          <td><p><strong><em>Question: </em></strong><a href="http://www.halopets.com/test/admin/QA.php#<?php echo $row_Recordset1['id']; ?>"><?php echo $row_Recordset1['tweet']; ?></a></p></td>
        </tr>
        <tr>
          <td><p><strong><em>Answer: </em></strong><?php echo $row_Recordset1['response']; ?></p></td>
        </tr>
        <tr>
          <td><hr width="95%" size="1" noshade="noshade" /><br /></td>
        </tr>
      </table>
      <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>

    twinflame wrote:
    the textarea does not pass line breaks to mysql - the result in the html output is one long string of text. I would like the user to input into the textarea using the enter key to create new paragraphs.
    I am not a php programmer and rely on the dreamweaver data tools and developer tool kit to create my dynamic content.
    Please send sample code for a form that addresses and corrects this issue. I do not know how/where to modify the code to correct this issue.
    http://tinymce.moxiecode.com/

  • Application Web Service Control Manager detected AWEBSVC is not responding to HTTP requests

    Hi,
    We are using SCCM 2012 sp1 cu5 with one primary in the datacenter and a number of local DP's which are presently servicing 200 users, but will rise to 12,000. The Application Catalogue is installed on the primary server.
    Once a day we get the above error and the message id is 8101, and sometimes a user will have to click on install twice, with the first one failing (the ones that fail are normally with dependencies which are quite large in size around 250MB)
    I'm just wondering if this is something I should be concerned about, especially since we will be ramping up user numbers in the next few weeks, and if it could be down to volume of traffic, although the apps are downloaded to the users local DP.
    Also, does this design look suitable to service this amount of users, or should I have local application catalogues? The WAN bandwith between the datacenter and the user sites has recently been upgraded and is pretty fast.
    Thanks
    Jaz

    Hi Torsten,
    Message ID is in the SMS_AWEBSVC_CONTROL_MANAGER status log and equates to "Application Web Service Manager detected AWEBSVC is not responding to HTTP requests. The http error is 12002.
    Then, about 1 hr later in the same monitoring log I get Message ID 8102 "Application Web Service Control Manger detected AWEBSVC is responding to HTTP requests.
    At the moment it isn't doing this very often, just once a day at different times normally, but it has also logged this a couple of times as well. I guess it may correspond to multiple users accessing the web portal at multiple times, but wondered if
    anyone else has seen this behaviour and how it was fixed.
    Thanks
    Jaz

  • Application Web Service Control Manager detected AWEBSVC is not responding to HTTP requests. The http status code and text is 400, Bad Request.

    Hi All,
    I am seeing the following error for SMS_AWEBSVC_CONTROL_MANAGER component with Message ID: 8100
    Application Web Service Control Manager detected AWEBSVC is not responding to HTTP requests.  The http status code and text is 400, Bad Request.
    awebsctl.log file has below errors:
    Call to HttpSendRequestSync failed for port 80 with status code 400, text: Bad Request
    SMS_AWEBSVC_CONTROL_MANAGER 12/22/2014 3:37:55 PM
    13920 (0x3660)
    AWEBSVCs http check returned hr=0, bFailed=1
    SMS_AWEBSVC_CONTROL_MANAGER 12/22/2014 3:37:55 PM
    13920 (0x3660)
    AWEBSVC's previous status was 1 (0 = Online, 1 = Failed, 4 = Undefined)
    SMS_AWEBSVC_CONTROL_MANAGER 12/22/2014 3:37:55 PM
    13920 (0x3660)
    Health check request failed, status code is 400, 'Bad Request'.
    SMS_AWEBSVC_CONTROL_MANAGER 12/22/2014 3:37:55 PM
    13920 (0x3660)
    Management point and Application Catalog Website Point are installed on the same Server where I am seeing the error for Application Catalog Web Service Point role. Management Point and Application Catalog Website Point are functioning properly. Application
    Catalog Website is working.
    Thanks & Regards, Kedar

    Hi Jason,
    Application Catalog Web Service Point and Application Catalog Website Point; both are installed as per below configuration on same Server:
    IIS Website: Default Web Site
    Port Number: 80
    with default value for Web Application Name configured.
    For SMS_AWEBSVC_CONTROL_MANAGER component, I am getting below error in Component Status:
    Application Web Service Control Manager detected AWEBSVC is not responding to HTTP requests.  The http status code and text is 400, Bad Request.
    Possible cause: Internet Information Services (IIS) isn't configured to listen on the ports over which AWEBSVC is configured to communicate. 
    Solution: Verify that the designated Web Site is configured to use the same ports which AWEBSVC is configured to use.
    Possible cause: The designated Web Site is disabled in IIS. 
    Solution: Verify that the designated Web Site is enabled, and functioning properly.
    For more information, refer to Microsoft Knowledge Base.
    And awebsctl.log has the below error lines:
    Call to HttpSendRequestSync failed for port 80 with status code 400, text: Bad Request
    SMS_AWEBSVC_CONTROL_MANAGER
    12/23/2014 11:04:36 AM 16388 (0x4004)
    AWEBSVCs http check returned hr=0, bFailed=1
    SMS_AWEBSVC_CONTROL_MANAGER
    12/23/2014 11:04:36 AM 16388 (0x4004)
    AWEBSVC's previous status was 1 (0 = Online, 1 = Failed, 4 = Undefined)
    SMS_AWEBSVC_CONTROL_MANAGER
    12/23/2014 11:04:36 AM 16388 (0x4004)
    Health check request failed, status code is 400, 'Bad Request'.
    SMS_AWEBSVC_CONTROL_MANAGER
    12/23/2014 11:04:36 AM 16388 (0x4004)
    STATMSG: ID=8100
    What should I check from IIS side?
    Application Catalog Website is functioning properly.
    Thanks & regards,
    Kedar
    Thanks & Regards, Kedar

  • The MAC signature found in the HTTP request '***' is not the same as any computed signature. Server used following string to sign: 'POST

    Hi,
    When trying with Postman sending a REST call to Azure Storage Queues I get:
    The MAC signature found in the HTTP request '***' is not the same as any computed signature. Server used following string to sign: 'POST.
    The code I have for creating the Authorization Header:
    var accountName = "my_account";
    string key = ConfigurationManager.AppSettings["my_access_key"];
    DateTime dt = DateTime.Now;
    string formattedDate = String.Format("{0:r}", dt);
    var canonicalizedHeaders = "x-ms-date:" + formattedDate + "\n" + "x-ms-version:2009-09-19" + "\n" ;
    var canonicalizedResource = "/my_account/myqueue/messages";
    var stringToSign = String.Format("POST,\n\n\n\n\n\n\n\n\n\n\n{0}{1}", canonicalizedHeaders, canonicalizedResource);
    stringToSign = HttpUtility.UrlEncode(stringToSign);
    HMACSHA256 hmac = new HMACSHA256(Encoding.UTF8.GetBytes(key));
    var signature = Convert.ToBase64String(hmac.ComputeHash(Encoding.UTF8.GetBytes(stringToSign)));
    var authorizationHeader = String.Format(CultureInfo.InvariantCulture, "SharedKey {0}:{1}", accountName, signature);
    return authorizationHeader;
    Anyone any idea what I'm missing/doing wrong?
    Additional question: do i have to create for every message I want to send a new Authorization header? Or is there an option (as with Service Bus Topics) to create a header that can be used for a certain timeframe?
    Thanks.

    One issue is with this line of code:
    HMACSHA256 hmac = new HMACSHA256(Encoding.UTF8.GetBytes(key));
    Please use the following:
    HMACSHA256 hmac = new HMACSHA256(Convert.FromBase64String(key));
    and that should take care of the problem.
    Regarding your question, "do i have to create for every message I want to send a new Authorization header? Or is there an option (as with Service Bus Topics) to create a header that can be used for a certain timeframe?"
    With your current approach, the answer is yes. What you can do is create a Shared Access Signature on the queue which will be valid for certain duration and then use that for posting messages to a queue using simple HttpWebRequest/HttpWebResponse.
    Hope this helps.

  • Getting the Details from a HTTP Request using C#

    Hi,
    Suppose, a user submits a form with some details as Address, Phone Number etc.. to a Web Application. On the client side, I need to have a proxy to intercept this http request message being sent to the Server and get the details in it like Phone number and
    Address in this case and display them to user in a pop up box for confirming and if he clicks YES, then only I should forward the request to Web Server/Web Application. 
    If the user feels that the information shown to him is not correct he can Click NO and the request will not be sent to the Server. Anyone know how to use this in DOTNET WEB APPLICATIONS?
    I need to write code for the Proxy Part, I am not sure how to handle HTTP messages and from where to start with. Any help would be of great help.
    Thanks
    K.V.N.PAVAN

    http://forums.asp.net/
    Yu have many sections to choose from concerning Web based solutions.

  • HTTP request using PL/SQL

    I've the following header and http request.
    POST http://deab/DexNETWebServices_4_0_0_4/LoginService.svc HTTP/1.1
    MIME-Version: 1.0
    Content-Type: multipart/related; type="application/xop+xml";start="<http://tempuri.org/0>";boundary="uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1";start-info="application/soap+xml"
    VsDebuggerCausalityData: uIDPo5F/qXRc4YJImqB6Ard30cQAAAAAAjIXinpIVUulXLJOsSG7yyv7Lf2yHgpHlIxvc6oeqaAACQAA
    Host: deab
    Content-Length: 1017
    Expect: 100-continue
    Accept-Encoding: gzip, deflate
    Connection: Keep-Alive
    --uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1
    Content-ID: <http://tempuri.org/0>
    Content-Transfer-Encoding: 8bit
    Content-Type: application/xop+xml;charset=utf-8;type="application/soap+xml"
    <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><a:Action s:mustUnderstand="1">http://tempuri.org/ILoginService/LoginByUserName</a:Action><a:MessageID>urn:uuid:cf410a05-23d4-4b92-a22c-329cbc19fbe7</a:MessageID><a:ReplyTo><a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address></a:ReplyTo><a:To s:mustUnderstand="1">http://deab/DexNETWebServices_4_0_0_4/LoginService.svc</a:To></s:Header><s:Body><LoginByUserName xmlns="http://tempuri.org/"><systemId>19e0ddb4-5fa5-41ee-b624-aea762865a6c</systemId><strName>FirmwareUpdateLogQueryWorker</strName><productId>0af39a3e-6549-485b-872f-b73413203998</productId><password>abc</password></LoginByUserName></s:Body></s:Envelope>
    --uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1--
    I'm using the following code to set the header from PL/SQL.
    l_http_req := UTL_HTTP.begin_request ('http://deab/DexNETWebServices_4_0_0_4/LoginService.svc', 'POST', 'HTTP/1.1');
    UTL_HTTP.set_header (
             l_http_req,
             'Content-Type',
             'multipart/related; type="application/xop+xml";start="<http://tempuri.org/0>";boundary="uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1";start-info="application/soap+xml"');
    UTL_HTTP.set_header (l_http_req, 'Content-Length', LENGTH (l_request));
    But UTL_HTTP.get_response returns the error 400 Bad Request. How do I set MIME-Version and VsDebuggerCausalityData from the header?
    Thank you for your help on this.

    Here is the complete code that returns the 400 Bad Request error. Thanks for your help.
    DECLARE
       l_request         CLOB;
       l_http_req        UTL_HTTP.req;
       l_http_resp       UTL_HTTP.resp;
       v_buffer          VARCHAR2 (32767);
       p_status_code     NUMBER (9);
       p_error_message   VARCHAR2 (32767);
       p_response        CLOB;
    BEGIN
       l_request :=
             '--uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1
    Content-ID: <http://tempuri.org/0>
    Content-Transfer-Encoding: 8bit
    Content-Type: application/xop+xml;charset=utf-8;type="application/soap+xml"
    <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><a:Action s:mustUnderstand="1">http://tempuri.org/ILoginService/LoginByUserName</a:Action><a:MessageID>urn:uuid:cf410a05-23d4-4b92-a22c-329cbc19fbe7</a:MessageID><a:ReplyTo><a:Address>http://www.w3.org/2005/08/addressing/anonymous</a:Address></a:ReplyTo><a:To s:mustUnderstand="1">http://deab/DexNETWebServices_4_0_0_4/LoginService.svc</a:To></s:Header><s:Body><LoginByUserName xmlns="http://tempuri.org/"><systemId>'
          || '19e0ddb4-5fa5-41ee-b624-aea762865a6c'
          || '</systemId><strName>'
          || 'FirmwareUpdateLogQueryWorker'
          || '</strName><productId>'
          || '0af39a3e-6549-485b-872f-b73413203998'
          || '</productId><password>'
          || 'abc'
          || '</password></LoginByUserName></s:Body></s:Envelope>
    --uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1--';
       DBMS_OUTPUT.put_line ('request ' || l_request);
       l_http_req :=
          UTL_HTTP.begin_request (
             'http://deab/DexNETWebServices_4_0_0_4/LoginService.svc',
             'POST',
             'HTTP/1.1');
       UTL_HTTP.set_header (
          l_http_req,
          'Content-Type',
          'multipart/related; type="application/xop+xml";start="<http://tempuri.org/0>";boundary="uuid:e4c19840-745d-45b2-90ca-12d71be4cfd9+id=1";start-info="application/soap+xml"');
       UTL_HTTP.set_header (l_http_req, 'Content-Length', LENGTH (l_request));
       UTL_HTTP.set_header (l_http_req, 'MIME-Version', '1.0');
       UTL_HTTP.set_header (
          l_http_req,
          'VsDebuggerCausalityData',
          'uIDPo5F/qXRc4YJImqB6Ard30cQAAAAAAjIXinpIVUulXLJOsSG7yyv7Lf2yHgpHlIxvc6oeqaAACQAA');
       UTL_HTTP.write_text (l_http_req, l_request);
       DBMS_LOB.createtemporary (p_response, FALSE);
       l_http_resp := UTL_HTTP.get_response (l_http_req);
       BEGIN
          LOOP
             UTL_HTTP.read_text (l_http_resp, v_buffer, 32767);
             DBMS_OUTPUT.put_line (v_buffer);
             DBMS_LOB.writeappend (p_response, LENGTH (v_buffer), v_buffer);
          END LOOP;
       EXCEPTION
          WHEN UTL_HTTP.end_of_body
          THEN
             NULL;
       END;
       UTL_HTTP.end_response (l_http_resp);
       p_status_code := l_http_resp.status_code;
       p_error_message := l_http_resp.reason_phrase;
       p_response := REPLACE (p_response, '&lt;', '<');
       p_response := REPLACE (p_response, '&gt;', '>');
       DBMS_OUTPUT.put_line (
          'Status: ' || p_status_code || '-' || p_error_message || ': ' || p_response);
    END;

  • Logging of Forwarded HTTP Requests using RequestDispatcher in Weblogic

    Can anyone help me on this?
    Logging of Forwarded HTTP Requests using RequestDispatcher in Weblogic
    Access Log File:
    1. I have a servlet(S1) which decides which JSP to be published based on
    some logic. If I try to forward the request from a servlet to a JSP or to
    another servlet from within S1 using RequestDispatcher, it doesn't get
    logged in the access log, only the initial request to S1 gets logged, when I
    switch on HTTP logging by setting weblogic.httpd.enableLogFile to true. Is
    there any way of logging this forwarding of request in the access log?
    2. If there is no solution for (1), I woiuld like to make entries into the
    access log file of weblogic in the common log format, when I forward a
    request to a JSP or a servlet throught the RequestDispatcher, so that I can
    use standard tools to analyze the logfile.The two issues with this are (i)
    is there any weblogic service that gives a handle to the access log file
    like the LogServicesDef which gives a handle to the weblogic log file. (ii)
    Is there any utility class available that can format a URL pointing to a JSP
    to a string confirming to the common log format.

    The log4j:ERROR messages are not coming from Log4j 2 and are most likely from Log4j 1.x. Somehow Log4j 1.x must be getting the log4j2 configuration.

  • WANT TO USE WEBLOGIC 10 R3 AS WEBSERVER FOR ONLY ROUTING HTTP REQUEST .

    Hi ,
    I have a requirement which I have to address ASAP . Any help would be appreciated .
    I want to use weblogic 10 R3 as web server. I understand by the definition of application server that it’s also capable of handling HTTP request . That means it’s having a build-in webserver in it. (Please correct me if I am wrong in my understanding .) Thus can I use the weblogic webserver for hosting all incoming http request and routing to the another instance of weblogic application server. (Could be the same instance also if possible .)
    I also understand that weblogic app server can be integrated with other third party web server like apache web server . But is it not possible to use weblogic 10g webserver ? If this is possible please guide me how I should proceed for this.
    With Regards
    AD

    Hi ,
    I am rephrasing my query as below:
    It’s my understanding that weblogic 10g R3 application server is capable of handling http requests also . That means it has a built-in webserver. Thus can I use this built-in weblogic webserver for hosting all incoming http requests and routing to the another instance of weblogic application server.
    With Regards
    AD

  • How  to configure website address to http request

    hi
    How to configure website address to http request
    (I want access JBOSS URL: http://localhost:8080/HIS/Login using website like www.HIS.com)
    Please help me.

    What I'm trying to do is connect my laptops built in wifi adapter to my home network and connect my usb wifi adapter to my phones hotspot then combine the bandwidth into one stream so that my speed is faster.

Maybe you are looking for

  • Manual creation of Oracle RAC Database

    Hello Guru's, I successfully installed Oracle Grid(clusterware) and Oracle RDBMS 11.2.0.1.0 for RAC containing 2 nodes on Linux 5.3 64 bit. All the clusterware services and ASM instance are running fine on both nodes. Now im planning to create databa

  • STO for Muliple Plants through delivery

    Dear Gurus, I have configured the STO process through Delivery and Shipment for my 4 plants within one CC. The process is running end to end. The problem is that one of my plant can recieve stock from any one of my other 3 plants or you can say that

  • Why can i NOT open PDF on Iphone4s all of a sudden

    I used to be able to retrieve all PDFs and other downloadable folders sent to my email on my IPHONE4s but they suddenly STOPPED opening saying either "portable document" or UNABle to download doc It's NOT YAHOO, because i can get the downloads as alw

  • Simple Login and Session maintaining with Mysql

    Hi everybody, I'm not expert in Java servlets and I'm writing and application that recognize users and maintain their session trough application's pages. This application, after authentication, will displays a table coming from a query where I will h

  • No video with flash player version 11.6.602.180 in IExplorer10

    Tried to solve with given steps on http://helpx.adobe.com/flash-player/kb/flash-player-games-video-or.html#main_Flash_Player_ information Version check (step 1) doesn't show no movie , but neither any error. I cannot proces step 7; the settings-popup