Why tinyproxy requires an upstream proxy? - proxy

Today I configured a basic tinyproxy.
I expected it to act as proxy for ubuntu repositories.
But when trying to download stuff from repositories I got this on tinyproxy log
CONNECT Mar 27 17:30:46 [20348]: Connect (file descriptor 9): [unknown] [192.168.2.30]
CONNECT Mar 27 17:30:46 [20348]: Request (file descriptor 9): GET http://br.archive.ubuntu.com/ubuntu/pool/main/t/tdb/python-tdb_1.2.12-1_amd64.deb HTTP/1.1
INFO Mar 27 17:30:46 [20348]: No upstream proxy for br.archive.ubuntu.com
ERROR Mar 27 17:30:56 [20348]: opensock: Could not retrieve info for br.archive.ubuntu.com
INFO Mar 27 17:30:56 [20348]: no entity
I stuck on some misconcept. Do not tinyproxy send requests for outside servers directly?
I supllied an external proxy server to fix this
upstream 117.79.64.29:80

Related

Spring Boot - Tomcat - Apache2 - HTTP 503 Error - ProxyIOBufferSize

I have installed my Spring Boot application at an Ubuntu version 18 server.
I use apache2 and lets encrypt to secure the application with SSL.
The application works fine in 95%, sometimes I get a HTTP 503 error at the client (Browser debugging view)
If HTTP 503 appears at the Browser/Client an entry is also made at apache2 log file which looks like this:
[Thu Mar 26 00:10:52.731383 2020] [proxy_ajp:error] [pid 16266:tid 139926293157632] [client
xxxx.xxxx.3.59:60869] AH00893: dialog to 127.0.0.1:9090 (localhost) failed, referer:
https domain
[Thu Mar 26 00:10:57.802571 2020] [proxy_ajp:error] [pid 16266:tid 139926720988928]
(70014)End of file found: AH01030: ajp_ilink_receive() can't receive header
[Thu Mar 26 00:10:57.802597 2020] [proxy_ajp:error] [pid 16266:tid 139926720988928] [client
xxx.xxx.3.59:60875] AH00992: ajp_read_header: ajp_ilink_receive failed, referer:
https domain
[Thu Mar 26 00:10:57.802628 2020] [proxy_ajp:error] [pid 16266:tid 139926720988928]
(120006)APR does not understand this error code: [client xxx.xxx.3.59:60875] AH00878: read
response failed from 127.0.0.1:9090 (localhost), referer: https domain
I found this thread:
We did some more investigation and found that the Apache setting that enables packets > 8192
(ProxyIOBufferSize 65536) was not going into effect because it was wrapped in an <IfModule
... > condition. (The module is loaded but we are investigating why the condition isn't
satisfied.) Tomcat 8.5 worked because it never sent packets larger than 8192, even though it
was allowed to, Tomcat 9 is sending bigger packets as it is configured to. With
ProxyIOBufferSize outside of the conditional, it is now working as expected.
My question now would be if it is possible that the size of ProxyIOBufferSize is to small and how can I adjust ProxyIOBufferSize in apache2 config file.
You can change ProxyIOBufferSize Directive of Module mod_proxy ref : https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#proxyiobuffersize
Edit proxy section of /etc/apache2/sites-enabled/000-default.conf :
<Proxy>
ProxyIOBufferSize 65536
</Proxy>

WebLogic Server 12c cant log in localhost Exception weblogic.nodemanager.NMConnectException: Connection refused

I use a Oracle WebLogic Server 12c and when I start it on Eclipse it shows this error, it does'nt allow me to log in localhost neither when I try to access it
from another computer in a different domain, in the log appears that the server is not reacheable.
This is the exception that appears in Eclipse.
This Exception occurred at Wed Nov 13 08:11:07 CET 2019.
weblogic.nodemanager.NMConnectException: Connection refused: connect. Could not connect to NodeManager. Check that it is running at localhost/127.0.0.1:5556.
Problem invoking WLST - Traceback (innermost last):
File "C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\bin\scripts_manejados\StartBT.wlst", line 1, in ?
File "<iostream>", line 111, in nmConnect
File "<iostream>", line 552, in raiseWLSTException
WLSTException: Error occurred while performing nmConnect : Cannot connect to Node Manager. : Connection refused: connect. Could not connect to NodeManager. Check that it is running at localhost/127.0.0.1:5545.
This is my nodemanager properties:
#Tue Nov 12 09:45:58 CET 2019
#Node manager properties
#Fri Jun 24 14:55:43 CEST 2016
DomainsFile=C\:\\Oracle\\Middleware\\Oracle_Home\\user_projects\\domains\\base_domain\\nodemanager\\nodemanager.domains
LogLimit=0
PropertiesVersion=12.1.3
AuthenticationEnabled=true
NodeManagerHome=C\:\\Oracle\\Middleware\\Oracle_Home\\user_projects\\domains\\base_domain\\nodemanager
JavaHome=C\:\\Program Files\\Java\\jdk1.7.0_75
LogLevel=INFO
DomainsFileEnabled=true
StartScriptName=startWebLogic.cmd
ListenAddress=localhost
NativeVersionEnabled=true
ListenPort=5540
LogToStderr=true
SecureListener=false
LogCount=1
StopScriptEnabled=false
QuitEnabled=false
LogAppend=true
StateCheckInterval=500
CrashRecoveryEnabled=false
StartScriptEnabled=true
LogFile=C\:\\Oracle\\Middleware\\Oracle_Home\\user_projects\\domains\\base_domain\\nodemanager\\nodemanager.log
LogFormatter=weblogic.nodemanager.server.LogFormatter
ListenBacklog=50
And this is my StartBt script file, used to start the server and specify some preferences:
nmConnect('weblogic','AXLWL20040','localhost','5521','base_domain','C:/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain','plain')
nmStart('AdminServer')
nmDisconnect()
I want to make it accesible, not only for local.
nmConnect('weblogic','AXLWL20040','localhost',**'5521'**,'base_domain','C:/Oracle/Middleware/Oracle_Home/user_projects/domains/base_domain','plain')
Port should listen to 5545.
You wrongly configure the ports. Your NodeManager listen on port 5540
ListenPort=5540
You try to connect to 5545
WLSTException:..Could not connect to NodeManager. Check that it is running at localhost/127.0.0.1:5545

default virtualhost overlap on port 19000. Oracle OHS server failed to start

I am working on enable ssl for Oralce EPM11121 OHS server.
While after configuration, want to restart the OHS server. Found it can not be start and got below error message from ohs_component.log
[2015-08-26T11:13:51.3062+08:00] [OHS] [INCIDENT_ERROR:32] [OHS-9999] [worker.c] [host_id: vmhkhypirdv1] [host_addr: 172.23.18.212] [pid: 21253] [tid: 47937310527456] [user: hyperion] [VirtualHost: main] (98)Address already in use: make_sock: could not bind to address 0.0.0.0:19000
[2015-08-26T11:13:51.3063+08:00] [OHS] [INCIDENT_ERROR:20] [OHS-9999] [worker.c] [host_id: vmhkhypirdv1] [host_addr: 172.23.18.212] [pid: 21253] [tid: 47937310527456] [user: hyperion] [VirtualHost: main] no listening sockets available, shutting down
[2015-08-26T11:13:51.3063+08:00] [OHS] [ERROR:32] [OHS-9999] [core.c] [host_id: vmhkhypirdv1] [host_addr: 172.23.18.212] [pid: 21253] [tid: 47937310527456] [user: hyperion] [VirtualHost: main] Unable to open logs
And OHS server failed to start. console~OHS~1.log have below error message
[Wed Aug 26 11:13:51 2015] [crit] (20014)Internal error: WL SSL Init failed for server: (null) on 0
[Wed Aug 26 11:13:51 2015] [warn] _default_ VirtualHost overlap on port 19000, the first has precedence
[Wed Aug 26 11:13:51 2015] [warn] Errors will be logged into /u01/app/Middleware/user_projects/epmsystem1/httpConfig/ohs/diagnostics/logs/OHS/ohs_component/ohs_component.log
Anyone know how to find the overlap one listen 19000? And make OHS server can be startup?
I already tried >lsof -i :19000 but it returns nothing. Any other method that can find the configuration might listen to 19000?
Finally find out where the wrong configuration.
I carelessly commented out 'Listen 19000' in file {EPM_ORALCE_INSTANCE}/httpConfig/ohs/config/OHS/ohs_component/ssl.conf
Should comment Listen.
# OHS Listen Port
# Listen 19000

Why aren't my Windows Apache log messages being written to the ErrorLog location specified in my VirtualHost?

I'm attempting to override the ErrorLog location in my httpd.conf file by specifying it in my .vhost, but it's creating the file only and still writing to the .conf one.
I have the following in my httpd.conf file:
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here. If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog "logs/error.log"
# Virtual hosts
Include conf/vhosts/xyz_apache.vhost
Then I have this in my xyz_apache.vhost file (on one line):
ErrorLog "C:/Program Files (x86)/Apache Software Foundation/
Apache2.2/logs/xyzerrors.log"
If I start up apache and look in my logs directory to see what was created, I see a blank xyzerrors.log and an error.log file with startup messages in it ("Starting thread to listen on port 80, etc.).
Any idea why this might be happening, or advice as to how I can fix it? The xyzerrors.log file was clearly created, so it seems my file paths and spelling of "ErrorLog" and my vhost configuration and all the obvious parts should be correct. But it's writing to the file specified in my httpd.conf, which, if I understand correctly, should only be the backup location, should there not be one specified in the .vhost. I wondered if permissions might be an issue somehow (maybe it didn't have write access to the xyzerror.log it created so it wrote to error.log instead?), but both files are in the same directory. Is there another configuration piece I missed?
I verified what was happening by renaming the .conf ErrorLog and deleting the .vhost ErrorLog, and again saw the .vhost log created and the .conf log created and written to. I have similar setups running in Linux with no problems.
Update: Here's another piece. I was fixing an issue with lxml (I got an error, installed a newer version of it, then restarted apache), and noticed that a couple of messages appeared in my xyzerror.log. Here's what it looks like:
error.log
[Wed Oct 09 09:14:52 2013] [notice] Child 42900: Starting thread to listen on port 80.
[Wed Oct 09 09:48:11 2013] [error] ERROR:django.request:Internal Server Error: /admin/
[Wed Oct 09 09:48:11 2013] [error] Traceback (most recent call last):
[Wed Oct 09 09:48:11 2013] [error] ImportError: DLL load failed: A dynamic link library (DLL) initialization routine failed. (Rest of traceback omitted)
[Wed Oct 09 09:54:50 2013] [notice] Parent: Received shutdown signal -- Shutting down the server.
Apache server interrupted...
Apache server interrupted...
Apache server interrupted...
Apache server interrupted...
Apache server interrupted...
Released the start mutex
[Wed Oct 09 09:54:52 2013] [notice] Child 42900: All worker threads have exited.
[Wed Oct 09 09:54:52 2013] [notice] Child 42900: Child process is exiting
[Wed Oct 09 09:54:52 2013] [notice] Parent: Child process exited successfully.
[Wed Oct 09 09:54:53 2013] [warn] mod_wsgi: Compiled for Python/2.7.
[Wed Oct 09 09:54:53 2013] [warn] mod_wsgi: Runtime using Python/2.7.2.
[Wed Oct 09 09:54:53 2013] [notice] Apache/2.2.22 (Win32) mod_wsgi/3.3 Python/2.7.2 configured -- resuming normal operations
[Wed Oct 09 09:54:53 2013] [notice] Server built: Jan 28 2012 11:16:39
[Wed Oct 09 09:54:53 2013] [notice] Parent: Created child process 40284
[Wed Oct 09 09:54:53 2013] [warn] mod_wsgi: Compiled for Python/2.7.
[Wed Oct 09 09:54:53 2013] [warn] mod_wsgi: Runtime using Python/2.7.2.
[Wed Oct 09 09:54:53 2013] [notice] Child 40284: Child process is running
[Wed Oct 09 09:54:53 2013] [notice] Child 40284: Acquired the start mutex.
[Wed Oct 09 09:54:53 2013] [notice] Child 40284: Starting 64 worker threads.
[Wed Oct 09 09:54:53 2013] [notice] Child 40284: Starting thread to listen on port 80.
xyzerror.log
[Wed Oct 09 09:47:54 2013] [info] [client 127.0.0.1] mod_wsgi (pid=42900, process='', application='XYZ.sysname.mydomain.local|'): Loading WSGI script 'C:/Users/etc/etc/XYZ_wsgi.py'.
[Wed Oct 09 09:48:11 2013] [error] [client 127.0.0.1] client denied by server configuration: C:/Users/etc/etc/site_media
So maybe these aren't ErrorLog messages and I need to investigate my CustomLog settings? I'm seeing similar behavior with those (an xyzaccess.log file is being written but my access.log in my .conf is being written to), but I didn't include it here for simplicity.
Update 2:
If I continue to browse my site and watch the log files, I see that logs are eventually getting written to the xyzerror.log (and the xyzaccess.log) in my vhost location. Only the initial startup messages ("listening on port..", etc.) and one site-related error were in the conf location.
Can anyone explain or suggest a solution?
Apache 2.2/Windows 7/Django 1.5/Python 2.7
if I understand correctly, should only be the backup location, should there not be one specified in the .vhost
Not at all !
This is normal behaviour, because the ErrorLog directive can either apply globally, or to the VirtualHost it is declared in.
Think about it. When an error is reported to the error log for apache internal events, such as startup events or module loading failure, how can it use a specific virtual host's error log, since virtual host resolution is not even possible yet ?
Apache knows which Virtual Host to use only when a client makes a request and the request is identified to refer to a specific virtual host, either via IP resolution or Hostname resolution.
Therefore, only those errors will appear in your vhost-specific error log, such as PHP errors pertaining to that vhost, or HTTP errors such as 401 or 404 codes.

Apache crash on launch - W2008 Server

I installed Xampp on my Windows Server 2008. It worked fine, untill I decided to install some updates.
Now Apache doesn't start any more and I get these errors;
[Wed Aug 29 23:31:20.328125 2012] [core:warn] [pid 1540:tid 312] AH00098: pid file
C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Wed Aug 29 23:31:20.968750 2012] [ssl:warn] [pid 1540:tid 312] AH01873: Init:Session Cache is not configured [hint: SSLSessionCache]
I'm trying to install Cacti on the server to monitor everything... Don't think it's relevant, but just saying
If you still need it:
http://httpd.apache.org/docs/2.4/upgrading.html#post_234
Apache 2.4 will not start with added SSL support on windows until additional module (compare to Apache 2.2 configuration) was enabled: socache_shmcb_module
This additional info is at the beginning of the httpd-ssl.conf, but it takes time to read it :)
# Required modules: mod_log_config, mod_setenvif, mod_ssl, socache_shmcb_module (for default value of SSLSessionCache)

Resources