Enabling debug prints for LIGHTTPD server - server

I was setting up a lighttpd server in my ARM device. Server was set successfully. Now I enabled all the debug prints in the lighttpd config file for tracking the server activities. All these debug prints can be seen in an error.log file. Is there some way that i can print these logs directly to my terminal as they happen.

Since lighttpd is designed to be run as a service I suspect the best way to achieve this would be to run tail -f on error.log. This may not be ideal as if you have multiple virtual hosts running on one lighttpd install you will have every sites debug log in amongst the wanted messages. Sadly, there is currently no way to have a separate error log for each vHost, although this has been requested as a feature.

Related

Wildfly stops when running in debug mode in Eclipse

I installed Eclipse and the Jboss Tools plugin with Wildfly.
I can run Wildfly in Eclipse in non-debug mode with no problems. But when I start Wildfly in debug, I can use it for a few minutes, and then it suddenly stops processing, the server ends.
I checked the log and there's nothing. What could be wrong?
Please note the JBoss Tools 4.9.0 is validated against 2018-09 but not against 2018-12.
Do you see something in the server log when the server dies ?
We had this issue and it was because we changed our config to close the management port, which had been used to detect that the server had started. Eclipse could no longer detect that the server had started, so it shut down the process after a set time (450 seconds)
To resolve the issue, we did the following in the Eclipse's Overview panel for our JBoss Server:
Changed the Start Timeout to 30, so it would only fail if it actually couldn't start in 30 seconds rather than waiting for 450
Changed our "Server State Detectors" to detect a Web Port for Startup Poller and Process Terminated for Shutdown Poller.
Changed the Server Ports to match our new configuration
Excerpt from JBoss Community Archive
The tooling was unable to verify your server started. Our tooling has several methods to see if your server is up or not. The two most-often used methods are either "Web Port Poller" or "Management Poller".
You can see which your server is using by opening the server object (In Servers view, double-click your server) and on the right side you'll see a section on polling.
If your server adapter (fancy word for the tooling's representation of your server) is using the Management Port Poller, you should make sure your server is actually exposing the management port. For local servers this shouldn't be an issue, since local servers should automatically expose the management port. You may want to verify in the Ports section (also in the server editor) that the management port is correct. To check if the server is up, we run a management command against the server. If the server responds properly, we declare the server to be started.
If you're using the web port poller, then you may want to verify your web port is correct. To verify the server is up, the Web Port Poller opens a URL connection on {serverHost}:{webPort} and sees if we get a valid connection.

HTTP error 508 from PERL script during redirection of requests from secure to non-secure server

I am getting a strange error in my file upload application.
1) Server 1: It is secure web server on port 443, which is accessible to public hosting a perl script
2) When this server get a request for cgi-bin directory, it will simple redirect the request to other web server (Server 2) running on port 80
3) The perl script in Server 2 will save the file in disk
Issue:
Above mechanism worked for a couple of hours later it has thrown Http error code:508
Observations:
If I directly hit Server2 on port 80, perl script successfully saving the files to disk. But If I directly hit Server1 on port 443, I am getting 508 error
When I first got the issue, I have restarted both webservers and it worked. But when I get the same issue second time, restart of servers did not help. The call to Server1 is throwing 508 error and requests are getting timed out.
ulimits and open files are in control.
If you experience this type of issue, please share your thoughts.
This strange issue has been resolved after moving dynamic service to other Virtual machine. This issue is no longer reproducible after changing the node.

Perl Scripts fails to connect to Netconf server when using Net::Netconf::Manager

I am using a perl script to log onto a remote router running JUNOS and get few information through the NETCONF port.
I am using the following library in order to do this
Net::Netconf::Manager
Net::Netconf::Device
Net::Netconf::Access
The script runs on the routers present on the same network but is failing to log into the routers that are on different networks, where as i am able to log onto the routers manually through Netconf over ssh.
The arguments I am parsing looks fine. Could any one help me resolve why this is happening.
If I need to do any checks in configuration (configuration looks fine to me) prior to running the script.

Perl Mechanize throwing connection error while using proxy

I am trying to download pdf files present in a website using perl MECHANIZE module.
It worked fine when i am running the program without any proxy connection. But i am getting the below error when i tried to run the program on the company server which uses proxy connection.
error:
Error GETing http://www.google.com: Can't connect to www.google.com:80
(10060) a t Download.pl line 20.
I am not sure if i need to add any proxy details in the program or Is this something that our company firewall is blocking programatical requests to a website ?
I have tried a lot but coudn't find out. Can any one of you please suggest?
If you using some kind of LWP related module you could set the following shell variables
HTTP_PROXY=your.corp.proxy:your_proxy_port
You could check the connection with telnet or with wget
telnet www.google.com 80
with wget
wget http://www.google.com
You need to specify you proxy to the $mech:
$mech->proxy(['http'], 'http://proxy_address:proxy_port/');

How do you run multiple instances of JBoss 4.0 (running under Eclipse) on the same machine?

At my office we run JBoss 4.0 and use Eclipse to debug and run the JBoss server. We're deploying simple wars, nothing terribly complex. However, I haven't yet figured out how to get this version of JBoss to either allow me to run separate instances of the war (HEAD and the Branch, for example) or to run separate servers controlled by two different projects in Eclipse. Anyone know how to do this? I've searched and found nothing that addresses this specifically.
The three things you have to think about are:
Making sure that instances do not overwrite each other’s files
Making sure that the instances don’t open the same TCP ports
Determining how to shut down each instance
Create a copy of your configuration so you don't have file collisions (like when temp files are created). Then, I would recommend just binding the two configurations to different IPs on the same machine, which will avoid port conflicts. You can do something like this:
run –b 192.168.0.100 –c myconfig
run –b 192.168.0.101 –c myconfig2
If you have two network cards, this is easy. If you don't, you can setup virtual IP addresses with a loopback adapter on Windows. On Linux, you can use ifconfig.
To shut down, just make sure you specify the IP/port to shut down, like this:
shutdown –s 192.168.0.100:1099 -S
shutdown –s 192.168.0.101:1099 -S
I'm not sure how to get you going on Eclipse, but you should be able to specify those flags to the run and shutdown scripts through the configuration somehow.
We cover this topic in depth in JBoss in Action in section 15.2 - Collocating multiple application server instances.
I think you can subscribe various instances of JBoss to your eclipse installation. normal installation example
Hope it helps you