I have a problem with an application in Java.
This application uses Apache QPid broker (6.0.1) to send messages.
I run it on 2 computers : the computer I use to work, and the 1 we use to test application before we give it to the client.
On my computer, there is no problem, the application send or receive messages.
The problem is we the other computer. I installed qpid the same way i did on mine : I extracted the .tar.gz, set $QPID_WORK to the working directory, and set ports i use with web management interface.
I tried it yesterday morning, and no problems, all works fine.
But after that, I stopped qpid (my boss asked me to show her how to start every components of the application) and since i can't send messages anymore.
I tried 2 applications :
The first one is the application I work on. The first thing it does is connect to qpid with JMX/RMI (with the apache API). But i have a timeout exception at this moment.
The second application is an app I did to test QPID and see how i can send a message. I also have a timeout exception when i try to send the message.
With the second application, QPID detect the connexion (and display it in web interface) but it doesn't create the queue or put message if it already exists.
I think this is a configuration problem (maybe access rights on a file?) but i'm not sure, and if i'm right, i can't find where is the problem.
I wanted to try to send the message from my computer on the qpid on test computer, but there are not on the same network, and i can't test that :(
Does anyone have an idea of what is wrong?
ps : i apologize for english mistakes, i'm french
ps 2 : i can't show you code exept the one i created to try qpid, but there is nothing really interesting (I took a big part of it from apache documentation with just a few modifications that work on my computer)
The connection with RMI makes a timeout like the message producer.
I found a solution :
the overflow on the exchange was set to 0 (unlimited) but if I change (like 10MO) it works without timeout.
But I still don't know if it's a qpid bug, or a problem with the computer, I'll try to find out with the system administrator and i'll post here if we find an answer if someone else have the same problem.
Related
I'm writing an application that runs as a daemon and makes restful request periodically, I'm trying to implement a system where I have another application (preprocessor) that will be sent the JSON responses from the daemon.
My plan is to use JMS for this, my understanding is that I can send the restful responses I receive in my daemon.jar to a Queue using a JMS provider, I've been looking into using JBoss.
So my understanding now is that I need to run a JBoss 7 Application server, or a Wildfly AS, I plan to run this server on a raspberry pi 2 for testing purposes, Have I got this right?
Regarding the client and receiver, Do they both need to be running on the server? I'm confused by this, can I have the Wildfly AS running on the pi, have the sender running on another machine and the receiver running on a 3rd machine?
Do my sender and receiver need anything specific on them to communicate with the AS other than maybe some libs for Wildfly?, I've seen Hornetq mentioned a few times, but am unsure how this fits into the process.
Finally got this working, I couldn't find a start to finish example of setting this all up, but managed to piece it all together from different examples.
the Sender(Producer) and Receiver(Consumer) don't need to be running on the server, I have all 3 running on different machines, they have to know the address of the Wildfly AS and the name of the queue(HornetQ) they are connecting to.
I 've spent the whole night trying to run a simple echo test on Tomcat 7.
The test I try to run runs locally as expected. But when deployed to the openshift the connection opens and then immediately closed. I've been looking for the right setup on the internet and found questions and answers for them for exactly the same problem but the solutions don't work for me.
The example of what I have as a test can be checked at http://pureikka-belgampaul.rhcloud.com/pi-8/index.html
At the bottom of the viewarea there's a debug console reporting the statsus of the websocket.
So I feel like I have not made a simple mistake in the setup and it runs locally with only the change of the host name and the port number for the websocket.
Could it be a routing trouble after the upgrade of the connection?
I deploy my war file directly to the webapps directory.
I also think I got websockets working at one moment but i'm not so sure anymore. I could be looking at the localhost after all.
Eventually I decided to try wildfly8 gear because it ships with support for websockets. I checked out the https://github.com/javaee-samples/javaee7-samples repo and deployed the chat demo to the local wildfly8 and the example worked from the first run as it is supposed. Great. But the same war file fails to work correctly on the openshift (http://wildfly8-belgampaul.rhcloud.com/chat3/)
I tried to use ports 80 or 8000 in both setups.
Need someone's help? advice or question to send me back to the right direction
Maybe someone has solved a similar issue?
Web Sockets on OpenShift work over ports 8000 for ws and 8443 for wss, it is not a "work around" it's the way websockets work on this system.
Here are the most useful links providing just enough light about the problem
https://www.openshift.com/blogs/paas-websockets (general info about websockets on openshift)
https://www.openshift.com/blogs/deploy-websocket-web-applications-with-jboss-wildfly (diy example)
to summarize:
websocket support out-of-the-box is the most reliable with node.js.
I have restarted a project that i closed after it became too comfusing, the original project was a webserver run entirely from java code. I have started this back up in the hopes of making the code 100% my own using java. I have gotten to the testing stage of hosting website however whenever i try to connect from the outside world i am shutdown with an error page. I have note coded this error page and after extensive research it is viewable that the error page is originating from apache. The only problem with this is that there is no apache in the code or in the virtualbox server. I have also tested this on two different virtual servers: opensuse 13.1 and fedora 20.
The URL of the server is blends.hopto.org/beta. There should be a black background there with some arrows and a blue dot, but instead there is an error that states:
"Not Found
The requested URL /beta was not found on this server.
Additionally, a 404 Not Found error was encounted while trying to use an ErrorDocument to handle the request."
I do not get this error if i request the page from inside my local network. But i do from outside, it is not a port forwarding problem because my minecraft server works and the server is assigned to the public ip of my home router!
Thanks, any help is appreciated!
Extra info:
After positing this question i stumbled across some other problems and it seems that the error is originating from SELinux, however i have disabled SELinux and the error is still coming through!
This is not an answer. I cannot comment on StackOverflow yet but would like to help.
You said that you get an Apache error page, which means that Apache must be running on your system. You can check this by typing this in the terminal:
apachectl status
You don’t mention what port you want to serve on. Apache usually uses port 80. You could configure your homemade Java server to work on a different port, say 8080. Also, if you are using Fedora 20, then you will have to configure FirewallD to allow this.
Okay well i finally found out what the problem was after just looking over the assigned ips to devices and found it strange that our networked hard drive was assigned the very first ip always. So i logged into the hard drive and found out it had been capturing all the port 80 requests from the router in an attempt to do remote login!!! I am very excited that this problem is resolved! I will be hoping to release my WebServer API for everyone to use as it is incredibly small and gives the programmer full controll
I'm working with a a framework that has a Core application, and secondary applications that all communicate using JMS via ActiveMQ (through Camel). It all seems to work fine on Windows, but the moment I moved it to our CentOS environment it failed. Let me note that our guy who programmed it and who was our ActiveMQ guy has left so I don't know quite how to diagnose the problem. It seems to be establishing a connection but then does nothing else. It is supposed to begin an exchange of messages but it doesn't. When I set logging to DEBUG I get messages saying "urlList connectionList:[]" and "waiting x ms before attempting connection" as though it's not connecting. I've made sure there's no firewall, there's no security policy to block it, ActiveMQ is shown to be running. I've tried everything I can think of but I have no idea what the problem could be. Any recommendations?
try testing ActiveMQ via the web console to make sure it's functioning properly. next, try connecting remotely via JMX and verify that works as well. It's likely an environment issue that will be difficult to diagnose via the info given...
see these pages for more information...
http://activemq.apache.org/web-console.html
http://activemq.apache.org/jmx.html
I have a setup in which some applications communicate with each other via Tibco rendezvous. The applications communicate using certified messaging. My problem is that two of my receivers have recently started exhibiting the behavior that they will get an Error 27, Not Permitted when they want to confirm a message (the first message in a certified message exchange isn't certified, we've accounted for that).
I've been looking around the internet to find people with the same error, and I have found many, but they all get the error when trying to create the tibco transport. I can create the transport just fine, but I can't confirm any messages received over it.
Our environment uses both tibco 7.X and 8.X, some times intermingled. This problem appears both when the peers use the same tibco version and when they use different versions. It doesn't show up for all applications, but when it does show up for an application, it remains "broken". Discarding the ledger files for both sender and receiver does nothing. We still get the error. Both sender and receiver have proper permissions to write to (and create the) ledger files. We are connecting to permanently running rvds. The sender and receiver are on different machines. Communication has worked flawlessly in the past, but at some point, it stopped doing so. The application is in java, and we're using the tibrvj.jar auto-native libraries.
The error is
...
Caused by: TibrvException[error=27,message=Not permitted]
at com.tibco.tibrv.TibrvImplCmTPortC.natConfirmMsg(Native Method)
at com.tibco.tibrv.TibrvImplCmTPortC.confirmMsg(TibrvImplCmTPortC.java:304)
at com.tibco.tibrv.TibrvCmListener.confirmMsg(TibrvCmListener.java:88)
....
I know you're going to ask me "what did you do to make it start happening", and my response is "I don't know".
Any input would be appreciated.
Thanks.
It may be possible that TCP connections between the two RVD servers is not possible. Can you check if you can connect from one to the other (connect from the subscriber host back to the publisher)? In my experience, CM acknowledgments are handled over TCP (please take this with a grain of salt as I'm more an end user than a Middleware support guy).
As it turns out, it was a screw-up on the application level.
Due to some old code lying around, after having updated a dependency (our messaging layer), we had moved from an application level confirmation to a container level confirmation, but we had forgotten to remove an explicit message confirmation in the application code.
To summarize: We tried to confirm the message twice, and the second time it threw this exception.
I recently encountered the same exception - application had been working for months, suddenly was throwing exception. In my case some maintenance had been done on the Windows server the application ran on and directories had been marked read-only. Once that was cleared the exception went away.
Discovered this after trouble-shooting hours worth of other potential causes.
Just my two cents: This exception also occurs when you try to explicitly confirm message on non-CM transport.