UltraESB when run from netbeans IDE gives "service not found" error in ultraesb soa toolbox but works fine when run from cmd - esb

The following is default proxy service in ultraesb file "ultra-unit.xml"
<u:proxy id="echo-proxy">
<u:transport id="http-8280"/>
<u:target>
<u:inSequence>
<u:class name="sample.SimpleJavaMediation1"/>
</u:inSequence>
<u:inDestination>
<u:address>http://localhost:9000/service/EchoService</u:address>
</u:inDestination>
<u:outSequence>
<u:java><![CDATA[
System.out.println("Reply payload : " + mediation.readPayloadAsString(msg));
]]></u:java>
</u:outSequence>
<u:outDestination>
<u:address type="response"/>
</u:outDestination>
</u:target>
</u:proxy>
I run ultraesb from Netbeans IDE and run toolbox.bat from command line (as there is no other way to run toolbox). When i send message to "http://localhost:8280/service/echo-proxy" using Ultraesb toolbox, it gives me following error
HTTP/1.1 404 Not Found
Date: Mon, 13 Jun 2016 07:34:40 GMT
Server: UltraESB/2.3.0 (GA)
Content-Length: 17
Content-Type: text/plain; charset=ISO-8859-1
Connection: close
Service not found
BUT when i run ultraesb.bat and toolbox.bat from commandline cmd....the service is perfectly accessed in toolbox and no error appears....
I really cant understand whats the issue...
Toolbox doesnt have log file whereas ultraesb log file exists which doesnt have any exception....no exception appears on Netbeans IDE console also. Please Help.

By looking at your description it seems like the proxy service has not been deployed over the 8280 transport listener, as there doesn't seem to be any error logs on the UltraESB log. This could happen if the deployment unit is not deployed. NetBeans IDE configuration on the standalone distribution of UltraESB ships with 2 run profiles of UltraESB one for the default server, another for the samples. If you are running the sample run profile it doesn't by default deploy the deployment units.
You got to either run the default server run profile or enable the deployment units in the environment bean of the ultra-root.xml. For more information on the NetBeans IDE setup please refer to the documentation

Related

GCP deployment fails on "Updating service"

I have asp.net core application hosted on GCP App Engine. When I try to deploy the application it fails on last step:
Updating service [name] (this may take several minutes)... ...failed
ERROR: (gcloud.app.deploy) Error Response: [9] An internal error occurred while processing task /app-engine-flex/flex_await_healthy/flex_await_healthy>blablabla.wm.1
The exception stack trace show that service running in background couldn't find MySQL table (that table obviously exists).
my app.yaml file:
service: XXX
runtime: custom
env: flex
automatic_scaling:
max_concurrent_requests: 80
min_num_instances: 1
max_num_instances: 1
resources:
cpu: XXX
memory_gb: XXX
beta_settings:
cloud_sql_instances: "XXX:XXXX:XXXX=tcp:3306"
It looks like the application is deployed properly despite the error. This is the only error and backgroud service desn't throw any exceptions at later point. In fact it works properly and can connect to the database.
My guess was that maybe GCP is checking health while the application is not connected do database. So I tried to add liveness_check and readiness_check to app.yaml and configured dedicated /healthcheck endpoint in my application but it didn't make any change.
Any ideas how to fix it and what might be a cause?
Deploying app with new version fixed the issue

How to run a html file on localhost (any port)

I am creating a website using HTML, CSS and js with java for server side. I need to run it on localhost.
Extra info: I am using mac os x 11 (el capitan)
I have already tried python and node.js but it clashes with java
So i need a technology that won't clash with java and will help me localhost on mac
IIRC macOS comes with PHP preinstalled, and PHP has built-in web-server which should be enough for serving static content.
So, open Terminal.app and then:
cd your/project/dir
php -S localhost:8080
After than you can navigate to http://localhost:8080/ and see your site in the browser (given you have index.html in your project, otherwise there will be "Not Found" message).
There are more advanced and/or less terminal-oriented ways, of course, but since you already tinkering with python and node, another terminal command should not be a problem.
BTW, you might want to look at that terminal window from time to time, as it outputs nice log of what things were requested from server. Good if you want to check for invalid references, 404 errors, etc. Here is a sample output:
$ php -S localhost:8080
PHP 7.3.6 Development Server started at Sat Jun 22 20:00:28 2019
Listening on http://localhost:8080
Document root is /private/tmp/test
Press Ctrl-C to quit.
[Sat Jun 22 20:00:32 2019] [::1]:51640 [200]: /
[Sat Jun 22 20:00:32 2019] [::1]:51641 [200]: /style.css
[Sat Jun 22 20:02:35 2019] [::1]:51670 [404]: /oops.html - No such file or directory
As you can see, root folder (/, which was translated to index.html in my case) and a stylesheet (style.css) were requested and successfully delivered (code is 200). But non-existent file oops.html resulted in error (code is 404).
You can use caddy
Install: brew install caddy
To serve static files from the current working directory, run:
caddy file-server --browse --listen :2015
Caddy's default port is 2015, so open your browser to http://localhost:2015.

axis2/c server could not be opened

I'm going to use axis2/c on windows to build a program, but when i click the "axis_http_server.exe" to start up the axis2/c server, nothing happened but a flashing window, i could't see the message "Started Simple Axis2 HTTP Server..." which was seen in the offical tutorial by apache, i've not changed anything but set the System's environment variable which was initial, so how can i open this?
i've turned to the directory axix2c/logs,the details in the axis2.log are as below:
....\src\core\deployment\conf_builder.c(903) Transport sender is NULL for transport http, unable to continue
....\src\core\deployment\conf_builder.c(262) Processing transport senders failed, unable to continue
....\src\core\deployment\dep_engine.c(752) Populating Axis2 Configuration failed
....\src\core\deployment\conf_init.c(64) Loading deployment engine failed for repository ../.
....\src\core\transport\http\receiver\http_receiver.c(126) unable to create private configuration contextfor repo path ../
....\src\core\transport\http\server\simple_axis2_server\http_server_main.c(215) Server creation failed: Error code: 103 :: Failed in creating DLL

PHPstorm 10.0.3 Error 502 Bad Gateway (Due to JavaVM?)

I have installed PHPstorm 10.0.3 Trial, and PHP in my Apache folder on Windows machine, however when I use PHP interpreter I'm getting error 502 Bad Gateway around 50-90% of time.
When this is only HTML page, it works 100%of time.
Edit:
What I do is 'run' my template.php(or any other)file which then appears in browser with url: http://localhost:63342/htdocs/template.php
I have tested:
PHP 7.0.2, PHP 5.3(ISS), first one thread safe, second one thread safe disabled, same results. In Webstorm my path is pointing to PHP-CGI.exe which was problem in different topics.
Only hint about what is going on I was able to find out by clicking: PHPstorm/Help/Show Log in Explorer. So anytime I get Error 502 something along these lines comes up:
2016-01-14 09:57:21,510 [1084784] ERROR - ins.io.ChannelExceptionHandler - PhpStorm 10.0.3 Build #PS-143.1770
2016-01-14 09:57:21,510 [1084784] ERROR - ins.io.ChannelExceptionHandler - JDK: 1.8.0_51
2016-01-14 09:57:21,510 [1084784] ERROR - ins.io.ChannelExceptionHandler - VM: Java HotSpot(TM) Server VM
2016-01-14 09:57:21,510 [1084784] ERROR - ins.io.ChannelExceptionHandler - Vendor: Oracle Corporation
2016-01-14 09:57:21,510 [1084784] ERROR - ins.io.ChannelExceptionHandler - OS: Windows 7
2016-01-14 09:57:21,511 [1084785] INFO - ins.io.ChannelExceptionHandler - Channel will be closed due to error
2016-01-14 09:57:24,273 [1087547] ERROR - ins.io.ChannelExceptionHandler - minimumReadableBytes: -2815 (expected: >= 0)
java.lang.IllegalArgumentException: minimumReadableBytes: -2815 (expected: >= 0)
at io.netty.buffer.AbstractByteBuf.checkReadableBytes(AbstractByteBuf.java:1143)
at io.netty.buffer.AbstractByteBuf.skipBytes(AbstractByteBuf.java:731)
at org.jetbrains.io.Decoder.getBufferIfSufficient(Decoder.java:131)
at org.jetbrains.io.fastCgi.FastCgiDecoder.messageReceived(FastCgiDecoder.kt:56)
at org.jetbrains.io.Decoder.channelRead(Decoder.java:38)
at io.netty.channel.ChannelHandlerInvokerUtil.invokeChannelReadNow(ChannelHandlerInvokerUtil.java:83)
at io.netty.channel.DefaultChannelHandlerInvoker.invokeChannelRead(DefaultChannelHandlerInvoker.java:163)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:155)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:950)
at io.netty.channel.oio.AbstractOioByteChannel.doRead(AbstractOioByteChannel.java:166)
at io.netty.channel.oio.AbstractOioChannel$1.run(AbstractOioChannel.java:38)
at io.netty.channel.ThreadPerChannelEventLoop.run(ThreadPerChannelEventLoop.java:52)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:742)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:55)
minimumReadableBytes is changing from record to record.
You are using PhpStorm's own built-in web server, which has some issues right now (especially with POST requests, e.g. WEB-17317).
The solution is to use your own proper web server (Apache/IIS/nginx/whatever).
Define Deployment entry. In place type should be fine, as long as your Apache/IIS can serve files from that location; otherwise either configure web server to be able to do that .. or use another type of deployment (e.g. Local or Mounted Folders for IDE to copy files to another location for you)
Configure it (provide desired URL etc)
Mark it as Default for this project
Now IDE will use that base URL when you will use Open in Browser or Run/Debug actions (NOTE: it will not affect any existing Run/Debug Configurations -- only future ones; you will have to update your current Run/Debug Configurations manually).
This is what worked for me.
I opened XAMPP control panel v3.2.2, I went into Apache->Config->httpd.conf
and changed the below code
Listen 12.34.56.78:80
Listen 80
to
Listen 12.34.56.78:8080
Listen 8080
Also,
ServerName localhost:80
to
ServerName localhost:8080
saved the file httpd.conf and then started the apache below action from the main screen of XAMPP Control Panel v3.2.2 and it started the apache.
After that I opened the browser and MANUALLY typed the address
for example:
If previous address was: http://
localhost:63342/htdocs/template.php (no space inbetween)
the new one would be:http://
localhost:8080/template.php (no space inbetween)
It should run just fine. Refresh the page and you shouldn't get 502 Bad Gateway error.
Remember: If you run your application later it may go back to previous location, All you need to do is, use the new location on address bar which would be (in this case)
http://
localhost:8080/template.php. (no space inbetween)
In your case:
http://
localhost:8080/yourfilename.php (no space inbetween)

Sublime Text 2 - There are no packages available for installation

So many Sublime Text 2 users get error (or) no action when they want to install any sublime text 2 package #via Package Control.
When I'm clicked on Package Control: Install Package from Ctrl+Shift+P.
I got this below error:
There are no packages available for installation
Note: Some times error message is not displayed and no action is happened.
When I'm tracing error report from console. I got this below error on console.
Package Control: Trying to execute command /usr/bin/curl --user-agent 'Sublime Package Control v2.0.0' --connect-timeout 30 -sSL --compressed --dump-header /tmp/tmpwQjJVT --header 'If-Modified-Since: Sun, 03 Aug 2014 12:10:13 GMT' --cacert /usr/lib/ssl/certs/ca-certificates.crt -v https://sublime.wbond.net/channel.json
Package Control: Curl HTTP Debug General
Hostname was NOT found in DNS cache
Trying 50.116.34.243...
Trying 2600:3c02:e000:42::1...
connect to 2600:3c02:e000:42::1 port 443 failed: Network is unreachable
Failed to connect to sublime.wbond.net port 443: Network is unreachable
Closing connection 0
Package Control: Error downloading channel. curl: (7) Failed to connect to sublime.wbond.net port 443: Network is unreachable downloading https://sublime.wbond.net/channel.json.
error: Package Control
There are no packages available for installation
How to solve this problem?
This error is happened with IPv6 problem. If your Internet Service
Provider (ISP) does not support for IPv6 you will get this error.
How to solve this on Unix (OSX/Linux/Ubuntu/CentOS/etc...):
Open terminal and run this below command line.
sudo echo "50.116.34.243 sublime.wbond.net" >> /etc/hosts
How to solve this on Windows:
Click on start button on your windows desktop and find cmd.
Now right click on Command Prompt option and select Run as administrator.
Run this below command line on CMD.
echo 50.116.34.243 sublime.wbond.net >> "C:\Windows\system32\drivers\etc\hosts"
Do not hard-code the current ip of sublime.wbond.net. This will not solve the problem, and will only break your machine's connection to Package Control in the near future.
If you are having trouble with ipv6, use the latest version from https://github.com/wbond/package_control. It has a fix for curl and wget when they encounter issues with computers that provide ipv6 via DNS, but can not actually access sites via ipv6.
If you are still having trouble with Package Control, follow the instructions at https://packagecontrol.io/docs/issues. Please be sure to include a debug log, otherwise I can't help.
Three stps to solve this problem on Mac in China.
add "0.116.34.243 sublime.wbond.net" into /etc/host
open Global Mode of Shadowsocks (needed only in China)
restart Sublime
I had the same problem today, and after a long search I found out that packagecontrol.io website was down!