Can SSH but cannot connect via HTTP Posted: 05 Apr 2022 01:20 AM PDT I am trying to set up a web application on my server. I can ssh to the server but when I connect via any browser (using IP or URL) I get no response. Running sudo netstat -tulpn | grep LISTEN gives the following result tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN 31747/docker-proxy tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 30899/docker-proxy tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 1441/systemd-resolv tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 27775/sshd tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 9949/postgres tcp 0 0 127.0.0.1:35757 0.0.0.0:* LISTEN 1481/containerd tcp6 0 0 :::8080 :::* LISTEN 31754/docker-proxy tcp6 0 0 :::80 :::* LISTEN 30906/docker-proxy tcp6 0 0 :::22 :::* LISTEN 27775/sshd tcp6 0 0 ::1:5432 :::* LISTEN 9949/postgres Which looks fine to me although I do not have a lot of experience with netstat. The react application runs on port 80, the server on port 8080, both in a docker. When I ssh to the server and try curl localhost:80 or curl localhost:8080 respectively the proper pages are returned. Only when I connect from the outside, I cannot reach my services. What are the best ways to debug this? |
DDOS AWS API Gateway protection Posted: 05 Apr 2022 01:11 AM PDT I want to secure API Gateway (HTTP) with Cloudfront + WAF. After reading docs I think that API Gateway endpoint is still exposed to the Internet. The only thing that protects API Gateway is verification of Header in WAF. Attacker can still find API Gateway in the Internet and perform DDOS attack directly to API Gateway endpoint without going through Cloudfront. Is this approach considered as secure? Cloudflare is using Tunnel to make sure that your infrastructure is not exposed to the Internet. I think this approach is much more secure. Is something like this available in AWS? |
Not able to use enable AZURE AD PREMIUM P2 Posted: 05 Apr 2022 12:54 AM PDT I need to use Azure Premium trial was not able to Activate. What is the solution. |
Fedora 34: How do I stop the console going blank and reduce the screen resolution on a text only console? Posted: 05 Apr 2022 12:45 AM PDT I have a Fedora 34 server edition connected to a TV. There is no GUI installed and I only have a text based console. My problem is that the console will blank after some time (I think a screen saver is kicking in) and also the font size is too small to read. I would like to disable the screensaver and reduce the screen resolution because the text is too small to read. Any help would be appreciated. |
GCS - Internet Egress Costs Posted: 05 Apr 2022 12:38 AM PDT Does anyone know where can I find the pricing for Google Cloud Storage pricing for Internet Traffic? Doing some design work and I need to work out what the cost of multiple GCS Buckets serving content to the Internet may cost and having trouble finding it a definitive resource on the cost Per GB of egress traffic. This page has a lot of information but for some reason Internet isn't mentioned: https://cloud.google.com/storage/pricing#network-pricing |
NTP Debian: how do I know, if the last poll was successfull Posted: 05 Apr 2022 01:04 AM PDT I've got the task to write an application, that supports NTP communication. Everything works fine so far, but I need to know, if the last ntp poll was successful or not. When I pull out the network cable, ntpstat even tells me even in the next morning, that everything was fine. But there was no NTP communication the whole night... Have you got any ideas? Thank you! Pinging is not a good solution, bc response could be turned off by the server or the server is reachable, but the ntp daemon is not running. |
DHCP Leases shows MAC address 00:00:00:00:00:00 assigned an IPaddress on NetComm NF18ACV router after assigning static IP for a PC Posted: 04 Apr 2022 11:48 PM PDT On the DHCP Leases page of my NetComm NF18ACV router, it shows that an IP address has been assigned to MAC address 00:00:00:00:00:00. This, for some reason, only appears after I set up the static IP address for my Windows 10 PC using the control panel (not on the router). Any reason why? Image of the IP lease |
How to set SELINUX HTTPD User Content RW? Posted: 05 Apr 2022 12:22 AM PDT I'm quite new to SELINUX, I've simple question, I know there are httpd_sys_rw_content_t for /var/www/html, and read only httpd_user_content_t , but if I want to allow some folder to be RW for that user only, is there any httpd_user_rw_content_t ? Or I should use httpd_sys_rw_content_t context for that particular user? Thanks. |
Alert when Admin logs into Azure Posted: 04 Apr 2022 09:06 PM PDT I setup an Office365/Azure tenancy for a small charity I help. I am keen to setup automated reporting that sends an email when someone logs in as an admin account (i.e with a particular role or group). The main things I am trying to achieve are - Visibility of when a 3rd party support organisation logging in to change the tenancy
- Visibility of when an internal staff member logs in, including staff who have moved on and we believe their accounts are disabled
- Visibility of unknown accounts logging in (i.e. a newly created admin account by a nefarious actor)
All I have been able to find is how to alert on a specific user, which can help with the first 2 requirements (although it means setting up an alert per account), however it doesn't cover the 3rd requirement. Is it possible to setup an alert in Azure to send an email to a nominated address when any account with the Global Admin role logs in ? |
Using a compressed initrd when pxe booting Posted: 04 Apr 2022 09:01 PM PDT I'm using netboot/pxeboot with grub. menuentry "Install Ubuntu 20.04" { set gfxpayload=keep echo 'Loading vmlinuz ...' linux /tftp/vmlinuz ip=dhcp netboot=nfs nfsroot=10.0.0.20:/data/netboot/nfs/ubuntu2004/ boot=casper toram noquiet splash=off console=tty0 console=ttyS1,57600n8 --- echo 'Loading initrd, this takes a long time ...' initrd /tftp/initrd } It works fine, however, the loading of initrd over tftp is taking a long time (30+ minutes). I would like to compress (gz/bz2) this file to save on some file transfer time. I had seen some examples out there referring to a initrd.gz (One example: https://unix.stackexchange.com/questions/217002/which-iso-file-vmlinuz-and-initrd-gz-to-use-for-installing-centos-from-multiboo) but when I tried to just compress the file with gzip and use it, I get an error such as: [ 12.543547] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6 [ 12.558487] Please append a correct "root=" boot option; here are the available partitions: [ 12.575161] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) Is there a way to compress this file so it can transfer a smaller file size, and have it uncompress before it tries to mount the root fs? Alternatively, is there a way to transfer it over a different protocol (HTTP/FTP/SFTP/SCP/etc) ? |
Is the network interface card(NIC) prerequisite of IP addresses? [closed] Posted: 05 Apr 2022 01:07 AM PDT Here is the command to assign IP address to an interface for Linux server. ip addr add ADDRESS dev IFNAME Where IFNAME is the interface name and ADDRESS is the IP address you want to assign to the interface. To add address 192.168.121.45 with netmask 24 to device eth0, you would type: sudo ip address add 192.168.121.45/24 dev eth0 NIC belongs to the physical layer, IP belongs to the IP layer, they are independent. I would like to ask further questions to figure out the relation between NIC and IP address. - Is the NIC prerequisite of IP address?
- Must IP address be attached to a NIC?
- Can ip address live alone on IP layer without NIC?
Reference - Linux ip Command: Assign IP addresses to an interface
- serverFault: Can a single network card have 2 IP addresses?
|
802.1q multicast blocked by Cisco router Posted: 05 Apr 2022 01:20 AM PDT We are using Cisco Catalyst 1000 switch (C100-16P-2G-L to be precise) and having a trouble of passing tagged multicast from one its port to another. We would like to pass it as it is (tagged), I assume it should be possible but how to configure (we need to pass multicast traffic with vlan id=257)? default configuration definitely doesn't work. Some additional details related to default configuration: - tagged (id=257) multicast is not passing through!
- untagged multicast is passing through
- tagged unicast is passing through
This type of switch has vlan=1 as default, so if I send multicast traffic tagged with vlan id=1, it goes out de-tagged - this is not what I need. Also I found that: Switch#show topology Topology Address Family Associated VRF State base ipv4 default UP base ipv6 default DOWN base ipv4 multicast default DOWN base ipv6 multicast default DOWN could it be related, and how to change the topology? These packets are sent from host: $ sudo mz v_eno1 -v -c 0 -d 1s -B 239.0.0.5 -t udp "dp=32000" -P "AAAA" IP: ver=4, len=32, tos=0, id=0, frag=0, ttl=255, proto=17, sum=0, SA=198.19.4.250, DA=239.0.0.5, payload=[see next layer] UDP: sp=0, dp=32000, len=12, sum=0, payload=41:41:41:41 .... Captured on host: $ tcpdump -nn "udp port 32000 or (vlan and udp port 32000)" -e -i eno1 -Xvvv 16:20:02.364860 f6:e0:32:f0:7b:74 > 01:00:5e:00:00:05, ethertype 802.1Q (0x8100), length 50: vlan 257, p 0, ethertype IPv4, (tos 0x0, ttl 255, id 26302, offset 0, flags [none], proto UDP (17), length 32) 198.19.4.250.0 > 239.0.0.5.32000: [udp sum ok] UDP, length 4 0x0000: 4500 0020 66be 0000 ff11 9afb c613 04fa E...f........... 0x0010: ef00 0005 0000 7d00 000c 4640 4141 4141 ......}...F@AAAA UPDATE 1 trying to setup trunk on incoming/outgoing ports, but: Switch#configure terminal Enter configuration commands, one per line. End with CNTL/Z. Switch(config)#interface GigabitEthernet1/0/2 Switch(config-if)#switchport mode trunk Switch(config-if)#vlan dot1q tag native ^ % Invalid input detected at '^' marker. Switch(config-if)#switchport trunk ? allowed Set allowed VLAN characteristics when interface is in trunking mode native Set trunking native characteristics when interface is in trunking mode pruning Set pruning VLAN characteristics when interface is in trunking mode should I select trunk mode? UPDATE 2 Current setting for one of the ports: Switch#show interfaces GigabitEthernet1/0/4 switchport Name: Gi1/0/4 Switchport: Enabled Administrative Mode: trunk Operational Mode: trunk Administrative Trunking Encapsulation: dot1q Operational Trunking Encapsulation: dot1q Negotiation of Trunking: On Access Mode VLAN: 1 (default) Trunking Native Mode VLAN: 1 (default) Administrative Native VLAN tagging: disabled Voice VLAN: none Administrative private-vlan host-association: none Administrative private-vlan mapping: none Administrative private-vlan trunk native VLAN: none Administrative private-vlan trunk Native VLAN tagging: enabled Administrative private-vlan trunk encapsulation: dot1q Administrative private-vlan trunk normal VLANs: none Administrative private-vlan trunk associations: none Administrative private-vlan trunk mappings: none Operational private-vlan: none Trunking VLANs Enabled: ALL Pruning VLANs Enabled: 2-1001 Capture Mode Disabled Capture VLANs Allowed: ALL Protected: false Unknown unicast blocked: disabled Unknown multicast blocked: disabled Appliance trust: none UPDATE 3 After trying to setup trunk on 2 ports: interface GigabitEthernet1/0/2 switchport trunk allowed vlan 257 switchport trunk native vlan 257 switchport mode trunk interface GigabitEthernet1/0/4 switchport trunk allowed vlan 257 switchport trunk native vlan 257 switchport mode trunk still not passing through.... |
User Access Logging Service starts and stops immediately - windows server 2016 [closed] Posted: 05 Apr 2022 12:24 AM PDT so we have this weird problem on one of our customer servers. This service cannot be started - stops immediately. It is set to automatic startup, so it triggers monitoring and creates alerts. On all other servers I see this service is running. There are no other events except service is starting and stopping... |
NFSv4 and kerberos: access denied 50% of the time Posted: 05 Apr 2022 12:52 AM PDT We are trying to mount NFSv4 shares on RHEL 8 clients, with kerberos. We have a very similar setup on another environment, and it worked fine. But on this setup, it happens that we get access denied around 50% of the times we try to mount a share: # failed attempt bash-4.4$ sudo mount -t nfs -o sec=krb5 server.com:/homes/francis test -vvvv mount.nfs: timeout set for Sat Apr 2 16:28:32 2022 mount.nfs: trying text-based options 'sec=krb5,vers=4.2,addr=192.168.1.89,clientaddr=192.168.2.29' mount.nfs: mount(2): Protocol not supported mount.nfs: trying text-based options 'sec=krb5,vers=4,minorversion=1,addr=192.168.1.89,clientaddr=192.168.2.29' mount.nfs: mount(2): Protocol not supported mount.nfs: trying text-based options 'sec=krb5,vers=4,addr=192.168.1.89,clientaddr=192.168.2.29' mount.nfs: mount(2): Permission denied mount.nfs: trying text-based options 'sec=krb5,vers=4,addr=192.168.1.88,clientaddr=192.168.2.29' mount.nfs: mount(2): Permission denied mount.nfs: trying text-based options 'sec=krb5,addr=192.168.1.89' mount.nfs: prog 100003, trying vers=3, prot=6 mount.nfs: trying 192.168.1.89 prog 100003 vers 3 prot TCP port 2049 mount.nfs: prog 100005, trying vers=3, prot=17 mount.nfs: trying 192.168.1.89 prog 100005 vers 3 prot UDP port 32767 mount.nfs: mount(2): Permission denied mount.nfs: trying text-based options 'sec=krb5,addr=192.168.1.88' mount.nfs: prog 100003, trying vers=3, prot=6 mount.nfs: trying 192.168.1.88 prog 100003 vers 3 prot TCP port 2049 mount.nfs: prog 100005, trying vers=3, prot=17 mount.nfs: trying 192.168.1.88 prog 100005 vers 3 prot UDP port 32767 mount.nfs: mount(2): Permission denied mount.nfs: access denied by server while mounting hypatia.uio.no:/uioit-usit-drift-homes/francis # working attempt two seconds later bash-4.4$ sudo mount -t nfs -o sec=krb5 server.com:/homes/francis test -vvvv mount.nfs: timeout set for Sat Apr 2 16:30:09 2022 mount.nfs: trying text-based options 'sec=krb5,vers=4.2,addr=192.168.1.88,clientaddr=192.168.2.29' mount.nfs: mount(2): Protocol not supported mount.nfs: trying text-based options 'sec=krb5,vers=4,minorversion=1,addr=192.168.1.88,clientaddr=192.168.2.29' mount.nfs: mount(2): Protocol not supported mount.nfs: trying text-based options 'sec=krb5,vers=4,addr=192.168.1.88,clientaddr=192.168.2.29' mount.nfs: mount(2): Permission denied mount.nfs: trying text-based options 'sec=krb5,vers=4,addr=192.168.1.89,clientaddr=192.168.2.29' I have checked the logs on the client side, and not much there that points to the cause of the failure to mount. It works one time, and it won't work two seconds later. Or vice-versa. I thought at first it could be a cross-mount issue, but I also tried with the upper directory of the share, and it was the same problem. Any hints on what can be the problem? |
issue with playbook script Posted: 04 Apr 2022 11:24 PM PDT How can I write a playbook to - Make sure both nfs server and client listen to same domain in /etc/idmapd.conf and confirmed with nfsidmap -d
[General] Verbosity = 0 Pipefs-Directory = /run/rpc_pipefs # set your own domain here, if it differs from FQDN minus hostname Domain = localdomain [Mapping] Nobody-User = nobody Nobody-Group = nogroup - Also Enable the id mapping in /sys/module/nfsd/parameters/nfs4_disable_idmapping it is currently Y and need to be N....i tried runnign the playbook below but i get error
- hosts: localhost tasks: - name: Run command to enable id mapping become: true lineinfile: path: /sys/module/nfs/parameters/nfs4_disable_idmapping regexp: 'Y' line: 'N' state: present - Finally Run the command nfsidmap -c
|
Ubuntu Linux 20.04 dnsmasq can not be started, tried much but same error 127.0.0.1 Posted: 04 Apr 2022 11:46 PM PDT [transferred to superuser] Quick synopsis: trying to implement dnsmasq on Ubuntu 20.04 LTS with two NICs One serves the ISP interneet another handles the subnet and the idea is to have dnsmasq handle DHCP, DNS, TFTP/PXE as per subnet requirements Problem that emerged is that any of these internet quick dnsmasq setup guides for Ubuntu 20.04 failed when dnsmasq threw an error that something holds 127.0.0.1:53, even when resolv was stopped. Using commands to pinpoint any process in the previous attempt did not give any usable results (no processes listed using 127.0.0.1:53) In any case, thanks for any useful ideas and hints on how to config/troubleshoot that. Thx guys! https://superuser.com/questions/1714518/ubuntu-linux-20-04-dnsmasq-can-not-be-started-tried-much-but-same-error-127-0-0 |
Could not resolve host: mirrors.iuscommunity.org Posted: 04 Apr 2022 09:25 PM PDT I'm not able to install or update the package on my centos machine . check with vi /etc/sysconfig/network-scripts/ifcfg-lo ONBOOT=yes NAME=loopbac [ec2-user@ip- ~]$ sudo yum update Loaded plugins: langpacks, priorities, update-motd amzn2-core | 3.7 kB 00:00:00 datadog | 2.9 kB 00:00:00 epel/x86_64/metalink | 8.5 kB 00:00:00 epel | 4.7 kB 00:00:00 Could not retrieve mirrorlist https://mirrors.iuscommunity.org/mirrorlist?repo=ius-centos7&arch=x86_64&protocol=http error was 14: curl#6 - "Could not resolve host: mirrors.iuscommunity.org" One of the configured repositories failed (Unknown), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo=<repoid> ... 4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable <repoid> or subscription-manager repos --disable=<repoid> 5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true Cannot find a valid baseurl for repo: ius/x86_64 What might be the possible issues? |
Unable to deploy Activiti 6 on Tomcat 9 Posted: 05 Apr 2022 01:27 AM PDT I am trying to deploy the Activiti 6.0 WAR on Tomcat 9 using the command line. I have copied the WAR file in the webapps directory when I restart Tomcat 9 it extracts the archive but the app is not accessible from the browser. I tried deploying the application from the Tomcat Web Application Manager GUI and I get an error message FAIL - Application at context path [/activiti-app] could not be started I checked the Catalina.out file in the logs folder and found these messages. 30-May-2020 10:47:57.402 SEVERE [http-nio-8080-exec-23] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.activiti.app$ org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bootstrapper': Injection of autowired dependencies failed; nested exception is org.springframework.beans.f$ at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1210) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) at org.activiti.app.servlet.WebConfigurer.contextInitialized(WebConfigurer.java:62) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4686) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5147) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1418) at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:700) at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:223) at javax.servlet.http.HttpServlet.service(HttpServlet.java:660) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:211) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:666) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.springframework.transaction.support.TransactionTemplate org.activiti.app.conf.Bootstrapp$ at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:561) at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331) ... 44 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionTemplate' defined in class path resource [org/activiti/app/conf/DatabaseConfiguratio$ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1119) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1014) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1120) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1044) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:942) at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:533) ... 46 more Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.transaction.support.TransactionTemplate]: Factory method 'transactionTemplate' threw e$ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ... 58 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [org/activiti/app/conf/DatabaseConfiguration$ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1119) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1014) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:322) at org.activiti.app.conf.DatabaseConfiguration$$EnhancerBySpringCGLIB$$fe3c95a1.annotationDrivenTransactionManager(<generated>) at org.activiti.app.conf.DatabaseConfiguration.transactionTemplate(DatabaseConfiguration.java:225) at org.activiti.app.conf.DatabaseConfiguration$$EnhancerBySpringCGLIB$$fe3c95a1.CGLIB$transactionTemplate$6(<generated>) at org.activiti.app.conf.DatabaseConfiguration$$EnhancerBySpringCGLIB$$fe3c95a1$$FastClassBySpringCGLIB$$7a6d3931.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:309) at org.activiti.app.conf.DatabaseConfiguration$$EnhancerBySpringCGLIB$$fe3c95a1.transactionTemplate(<generated>) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ... 59 more Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.transaction.PlatformTransactionManager]: Factory method 'annotationDrivenTransactionMa$ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ... 80 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/activiti/app/conf/DatabaseConfigurati$ at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1119) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1014) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:322) at org.activiti.app.conf.DatabaseConfiguration$$EnhancerBySpringCGLIB$$fe3c95a1.entityManagerFactory(<generated>) at org.activiti.app.conf.DatabaseConfiguration.annotationDrivenTransactionManager(DatabaseConfiguration.java:195) at org.activiti.app.conf.DatabaseConfiguration$$EnhancerBySpringCGLIB$$fe3c95a1.CGLIB$annotationDrivenTransactionManager$3(<generated>) at org.activiti.app.conf.DatabaseConfiguration$$EnhancerBySpringCGLIB$$fe3c95a1$$FastClassBySpringCGLIB$$7a6d3931.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:309) at org.activiti.app.conf.DatabaseConfiguration$$EnhancerBySpringCGLIB$$fe3c95a1.annotationDrivenTransactionManager(<generated>) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ... 81 more Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.persistence.EntityManagerFactory]: Factory method 'entityManagerFactory' threw exception; nested exc$ at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ... 102 more Caused by: javax.persistence.PersistenceException: [PersistenceUnit: persistenceUnit] Unable to build EntityManagerFactory at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:925) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:900) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:76) at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:343) at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:318) at org.activiti.app.conf.DatabaseConfiguration.entityManagerFactory(DatabaseConfiguration.java:175) at org.activiti.app.conf.DatabaseConfiguration$$EnhancerBySpringCGLIB$$fe3c95a1.CGLIB$entityManagerFactory$5(<generated>) at org.activiti.app.conf.DatabaseConfiguration$$EnhancerBySpringCGLIB$$fe3c95a1$$FastClassBySpringCGLIB$$7a6d3931.invoke(<generated>) at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:309) at org.activiti.app.conf.DatabaseConfiguration$$EnhancerBySpringCGLIB$$fe3c95a1.entityManagerFactory(<generated>) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ... 103 more Caused by: org.hibernate.cfg.beanvalidation.IntegrationException: Error activating Bean Validation integration at org.hibernate.cfg.beanvalidation.BeanValidationIntegrator.integrate(BeanValidationIntegrator.java:154) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:307) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1799) at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:96) at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:915) ... 118 more Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.internal.engine.ConfigurationImpl at org.hibernate.validator.HibernateValidator.createGenericConfiguration(HibernateValidator.java:41) at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:276) at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:110) at org.hibernate.cfg.beanvalidation.TypeSafeActivator.getValidatorFactory(TypeSafeActivator.java:445) at org.hibernate.cfg.beanvalidation.TypeSafeActivator.activate(TypeSafeActivator.java:96) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.hibernate.cfg.beanvalidation.BeanValidationIntegrator.integrate(BeanValidationIntegrator.java:148) ... 122 more 30-May-2020 10:47:57.403 SEVERE [http-nio-8080-exec-23] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate contai$ 30-May-2020 10:47:57.405 SEVERE [http-nio-8080-exec-23] org.apache.catalina.core.StandardContext.startInternal Context [/activiti-app] startup failed due to previous errors 10:47:57,407 [http-nio-8080-exec-23] INFO org.activiti.app.servlet.WebConfigurer - Destroying Web application 30-May-2020 10:47:57.407 SEVERE [http-nio-8080-exec-23] org.apache.catalina.core.StandardContext.listenerStop Exception sending context destroyed event to listener instance of class [org.activiti.app.se$ java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered? at org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:83) at org.activiti.app.servlet.WebConfigurer.contextDestroyed(WebConfigurer.java:125) at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4732) at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5397) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:187) at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1418) at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:700) at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:223) at javax.servlet.http.HttpServlet.service(HttpServlet.java:660) at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:211) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:666) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:690) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:373) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1590) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:834) 30-May-2020 10:47:57.410 WARNING [http-nio-8080-exec-23] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [activiti-app] registered the JDBC driver [org.h2.Driver$ 30-May-2020 10:47:57.415 WARNING [http-nio-8080-exec-23] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [activiti-app] appears to have started a thread named$ java.base@11.0.7/java.util.zip.Inflater.inflateBytesBytes(Native Method) java.base@11.0.7/java.util.zip.Inflater.inflate(Inflater.java:385) java.base@11.0.7/java.util.zip.InflaterInputStream.read(InflaterInputStream.java:153) java.base@11.0.7/java.io.InputStream.readNBytes(InputStream.java:490) java.base@11.0.7/java.util.jar.JarFile.getBytes(JarFile.java:807) java.base@11.0.7/java.util.jar.JarFile.checkForSpecialAttributes(JarFile.java:1007) java.base@11.0.7/java.util.jar.JarFile.isMultiRelease(JarFile.java:390) java.base@11.0.7/java.util.jar.JarFile.getEntry(JarFile.java:509) java.base@11.0.7/java.util.jar.JarFile.getJarEntry(JarFile.java:470) org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.getArchiveEntry(AbstractSingleArchiveResourceSet.java:98) org.apache.catalina.webresources.AbstractArchiveResourceSet.getResource(AbstractArchiveResourceSet.java:256) org.apache.catalina.webresources.StandardRoot.getResourceInternal(StandardRoot.java:281) org.apache.catalina.webresources.Cache.getResource(Cache.java:62) org.apache.catalina.webresources.StandardRoot.getResource(StandardRoot.java:216) org.apache.catalina.webresources.StandardRoot.getClassLoaderResource(StandardRoot.java:225) org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2302) org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:865) org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1334) org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188) com.mchange.v2.resourcepool.BasicResourcePool.destroyResource(BasicResourcePool.java:1040) com.mchange.v2.resourcepool.BasicResourcePool.destroyResource(BasicResourcePool.java:1010) com.mchange.v2.resourcepool.BasicResourcePool.access$100(BasicResourcePool.java:44) com.mchange.v2.resourcepool.BasicResourcePool$5.run(BasicResourcePool.java:1260) 30-May-2020 10:47:57.438 INFO [Resource Destroyer in BasicResourcePool.close()] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instanc$ These are my PATH and JAVA_HOME settings sridhar@ub-s-2vcpu-4gb-blr1-01-02:~$ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/sridhar/bin:/usr/lib/jvm/jdk-14.0.1/bin:/home/sridhar/bin:/usr/lib/jvm/jdk-14.0.1/bin sridhar@ub-s-2vcpu-4gb-blr1-01-02:~$ which java /usr/bin/java sridhar@ub-s-2vcpu-4gb-blr1-01-02:~$ java --version openjdk 11.0.7 2020-04-14 OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-2ubuntu218.04) OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-2ubuntu218.04, mixed mode, sharing) I am at a deadend and don't have know what could be a reason for this issue. Any clues on what could be the reason? |
Permission Denied in Squid Proxy Server Posted: 05 Apr 2022 12:02 AM PDT I have successfully installed and configured Squid Proxy Server 3.5.26 in Slackware 14.2. Im currently logged in as root user and I get an error when starting Squid using the command sudo squid -z : WARNING: Cannot write log file: /var/log/squid/cache.log /var/log/squid/cache.clog: Permission Denied messages will be sent to 'stderr' 2019/04/08 16:16:20 kid1| Set Current Directory to /var/log/squid/cache/squid 2019/04/08 16:16:20 kid1| Creating missing swap directories FATAL: Failed to make swap directory /var/cache/squid: (13) Permission Denied Squid Cache (Version 3.5.26): Terminated abnormally. CPU Usage: 0.008 seconds = 0.006 user + 0.002 sys Maximum Resident Size: 45392 KB Page faults with physical i/o:0 Even if i made /var/log/squid permissions to 777. Still the application is unable to write cache.log. Running : squid -NCd1 The command outputs: WARNING: Cannot write log file: /var/log/squid/cache.log /var/log/squid/cache.log: Permission denied messages will be sent to 'stderr'. 2019/04/08 17:26:44| Set Current Directory to /var/log/squid/cache/squid WARNING: Cannot write log file: /var/log/squid/cache.log /var/log/squid/cache.log: Permission denied messages will be sent to 'stderr'. 2019/04/08 17:26:44| WARNING: Closing open FD 2 2019/04/08 17:26:44| Starting Squid Cache version 3.5.26 for x86_64- slackware-linux-gnu... 2019/04/08 17:26:44| Service Name: squid 2019/04/08 17:26:44| Process ID 1669 2019/04/08 17:26:44| Process Roles: master worker 2019/04/08 17:26:44| With 1024 file descriptors available 2019/04/08 17:26:44| Initializing IP Cache... 2019/04/08 17:26:44| parseEtcHosts: /etc/hosts: (13) Permission denied 2019/04/08 17:26:44| DNS Socket created at [::], FD 8 2019/04/08 17:26:44| DNS Socket created at 0.0.0.0, FD 9 2019/04/08 17:26:44| /etc/resolv.conf: (13) Permission denied 2019/04/08 17:26:44| Warning: Could not find any nameservers. Trying to use localhost 2019/04/08 17:26:44| Please check your /etc/resolv.conf file 2019/04/08 17:26:44| or use the 'dns_nameservers' option in squid.conf. 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_ACCESS_DENIED': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_ACCESS_DENIED 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_CACHE_ACCESS_DENIED': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_CACHE_ACCESS_DENIED 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_CACHE_MGR_ACCESS_DENIED': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_CACHE_MGR_ACCESS_DENIED 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_FORWARDING_DENIED': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_FORWARDING_DENIED 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_NO_RELAY': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_NO_RELAY 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_CANNOT_FORWARD': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_CANNOT_FORWARD 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_READ_TIMEOUT': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_READ_TIMEOUT 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_LIFETIME_EXP': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_LIFETIME_EXP 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_READ_ERROR': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_READ_ERROR 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_WRITE_ERROR': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_WRITE_ERROR 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_CONNECT_FAIL': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_CONNECT_FAIL 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_SECURE_CONNECT_FAIL': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_SECURE_CONNECT_FAIL 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_SOCKET_FAILURE': ( 13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_SOCKET_FAILURE 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_DNS_FAIL': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_DNS_FAIL 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_URN_RESOLVE': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_URN_RESOLVE 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_ONLY_IF_CACHED_MISS': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_ONLY_IF_CACHED_MISS 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_TOO_BIG': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_TOO_BIG 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_INVALID_RESP': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_INVALID_RESP 2019 /04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_UNSUP_HTTPVERSION': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_UNSUP_HTTPVERSION 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_INVALID_REQ': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_INVALID_REQ 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_UNSUP_REQ': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_UNSUP_REQ 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_INVALID_URL': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_INVALID_URL 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_ZERO_SIZE_OBJECT': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_ZERO_SIZE_OBJECT 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_PRECONDITION_FAILED': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_PRECONDITION_FAILED 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_CONFLICT_HOST': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_CONFLICT_HOST 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_FTP_DISABLED': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_FTP_DISABLED 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_FTP_UNAVAILABLE': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_FTP_UNAVAILABLE 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_FTP_FAILURE': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_FTP_FAILURE 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_FTP_PUT_ERROR': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_FTP_PUT_ERROR 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_FTP_NOT_FOUND': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_FTP_NOT_FOUND 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_FTP_FORBIDDEN': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_FTP_FORBIDDEN 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_FTP_PUT_CREATED': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_FTP_PUT_CREATED 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_FTP_PUT_MODIFIED': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_FTP_PUT_MODIFIED 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_ESI': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_ESI 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_ICAP_FAILURE': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_ICAP_FAILURE 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_GATEWAY_FAILURE': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_GATEWAY_FAILURE 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_DIR_LISTING': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_DIR_LISTING 2019/04/08 17:26:44| '/usr/share/squid/errors/templates/ERR_SHUTTING_DOWN': (13) Permission denied 2019/04/08 17:26:44| WARNING: failed to find or read error text file ERR_SHUTTING_DOWN 2019/04/08 17:26:44| Logfile: opening log daemon:/var/log/squid/access.log 2019/04/08 17:26:44| Logfile Daemon: opening log /var/log/squid/access.log 2019/04/08 17:26:44| ipcCreate: /usr/libexec/log_file_daemon: (22) Invalid argument 2019/04/08 17:26:44| Unlinkd pipe opened on FD 15 2019/04/08 17:26:44| ipcCreate: /usr/libexec/unlinkd: (22) Invalid argument 2019/04/08 17:26:44| Store logging disabled 2019/04/08 17:26:44| Swap maxSize 262144 + 262144 KB, estimated 40329 objects 2019/04/08 17:26:44| Target number of buckets: 2016 2019/04/08 17:26:44| Using 8192 Store buckets 2019/04/08 17:26:44| Max Mem size: 262144 KB 2019/04/08 17:26:44| Max Swap size: 262144 KB 2019/04/08 17:26:44| ERROR: /var/cache/squid: (13) Permission denied FATAL: Failed to verify one of the swap directories, Check cache.log for details. Run 'squid -z' to create swap directories if needed, or if running Squid for the first time. Squid Cache (Version 3.5.26): Terminated abnormally. CPU Usage: 0.023 seconds = 0.016 user + 0.007 sys Maximum Resident Size: 58800 KB Page faults with physical i/o: 0 |
AWS Freeable memory decreases from 16GB to 1GB Posted: 04 Apr 2022 11:03 PM PDT I have a MYSQL database hosted on RDS with 16GB RAM. I'm using an r4.large with 20GB General purpose SSD storage. We are using a microservice architecture and has 6 backend containers. So the request will hit the RDS from that 6 backend servers. The operation on our application has more read and write operations. We are trying a load test of our application and using 10 to 20 users for the load test. But while testing and when we reached nearly 20 users for load test, we noted that the response time is really high. While checking on RDS metrics, we figured out that the freeable memory came down from 15GB to nearly 1GB and not coming up also. The main issue we faced was when we again test the load using 10 users, the response time taken was really high. It was not comparable with the initial test results of 10 users. I'm not sure it is the freeable memory causing the issue, or else any other factor. How can I figure out the issue and resolve it? Any help would be appreciated. |
Where do I put group_vars in an ansible setup and galaxy role Posted: 04 Apr 2022 09:04 PM PDT I'm trying to use my first playbook with a galaxy role and while I can get the role to run, I can't seem to get it to find the group_vars I've defined. The role is nickjj.mariadb (not that that probably matters) but in the docs its stated that group_vars should be relative to your inventory directory. I've tried a couple of different things but so far no dice. tree . ├── group.vars │ └── siteservers.yml ├── install_maria.yml ├── inventory │ └── hosts └── update-apt.yml is what I have for the layout and I'm running the playbook with ansible-playbook -i inventory/hosts -l siteservers install_maria.yml -K It is finding the ip address of the server from the hosts file happily, but doesn't seem to pick up the variables from siteservers.yml. Where should this be put? Am I close with the layout or is it all wrong? |
Apache mod_wsgi tuning Posted: 04 Apr 2022 09:04 PM PDT I have a django site on webfaction that uses apache + mod_wsgi. Site is getting around 1000 requests per minute. But it makes some calculations, so request takes about 5-10 seconds. I use the following configuration StartServers 2 MinSpareThreads 10 MaxSpareThreads 25 ThreadLimit 25 ThreadsPerChild 25 MaxClients 75 MaxRequestsPerChild 1000 threads=15 processes=12 The problem is high CPU usage and it takes time to process a simple static page without calculations (looks like Apache queued the request). So what I want is for Apache to quickly accept requests. I'm totally lost because of number of parameters, I also don't quite understand what they mean. What do we need StartServers and MaxRequestWorkers for? Any help and/or explanations will be highly appreciated. I have 8GB of RAM. Apache MPM Worker. mod_wsgi 4.4.21. Thank you in advance. |
CentOS 7 sssd with AD - getent passwd slow in response Posted: 05 Apr 2022 01:04 AM PDT CentOS 7 + SSSD + AD AD user is created through bash script. To confirm the AD user account is created I am using getent passwd <username> . It is not returning the user account created in AD immediately, but it is returning the user account after a minute or so when using the same getent passwd <username> . Is there any config parameter to change in sssd.conf ? |
Unable to restart a systemctl service remotely as a non root user Posted: 04 Apr 2022 10:01 PM PDT I have a systemd.socket named gunicorn.socket which I would like to restart after updating some code on a remote server. I've followed the steps detailed in Allowing a non-root user to restart a service and systemctl keeps asking for my user password. Here is what I've done trying to run systemctl restart gunicorn.socket with user john : # added an appadmin group to allow the restart command to john addgroup appadmin usermod -a -G appadmin john visudo In sudoers : Cmnd_Alias MYAPP_CMNDS = /bin/systemctl start gunicorn.socket, /bin/systemctl stop gunicorn.socket, /bin/systemctl restart gunicorn.socket %appadmin ALL=(ALL) NOPASSWD: MYAPP_CMNDS Then sudo systemctl restart gunicorn.socket works fine while being on the server, but when I try it remotely I get: ssh example.com "sudo systemctl restart gunicorn.socket" Failed to restart gunicorn.socket: Interactive authentication required. See system logs and 'systemctl status gunicorn.socket' for details. Any ideas? I'm using Ubuntu 17.04. Update: adding full content of /etc/sudoers : Defaults env_reset Defaults mail_badpass Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" # Cmnd alias specification Cmnd_Alias MYAPP_CMNDS = /bin/systemctl start gunicorn.socket, /bin/systemctl stop gunicorn.socket, /bin/systemctl restart gunicorn.socket %appadmin ALL=(ALL) NOPASSWD: MYAPP_CMNDS # User privilege specification root ALL=(ALL:ALL) ALL john ALL=(ALL:ALL) ALL # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) ALL |
Outlook 2010 Exchange Account - Folders only sync when clicked Posted: 05 Apr 2022 12:02 AM PDT I work at a university and we have recently switched our email from an old system managed by the university to Office 365. Because the old system only allowed a very small amount of server space, I used a POP setup and kept all of my email locally. Now that I have tons of space I want to move it back to the cloud. I set up an Exchange account in Office using the new Office 365 settings. All of my old mail and folders are now setup to be synchronized, and they are indeed synchronized, but only which I click on the folder in Outlook. For example, I have open the Microsoft Exchange Connection Status window. When I click a folder in Outlook to view it's contents, the status windows shows that that folder is being synchronized. I can go to Office 365 on the web and verify that everything has pushed to the cloud. However, if I don't click a folder nothing happens. It seems to be only synchronizing when I click a folder in Outlook. I have tons and tons of folders... so I really don't want to click them all. Surely there must be some way to force synchronization of everything? Or at least force synchronization of a folder and all its subfolders? |
Vagrant not ready for SSH error on VirtualBox and Laravel Homestead Posted: 04 Apr 2022 08:25 PM PDT Vagrant Version: 1.6.3 VirtualBox: 4.3.14 Ubuntu 14.04 LTS 64 Bit I have been on this for a pretty good while now and cannot figure this out. I have my public and private keys setup and they work. I know they are not the problem at they worked fine before I updated Ubuntu from 32 Bit to 64 Bit. I have uninstalled and reinstalled all software mentioned and still no fix. This is on a Laravel Homestead instance but it is happening on all my boxes, including the precise32 from vagrants home page. When I run vagrant ssh-config The error I am getting is The provider for this Vagrant-managed machine is reporting that it is not yet ready for SSH. Depending on your provider this can carry different meanings. Make sure your machine is created and running and try again. Additionally, check the output of `vagrant status` to verify that the machine is in the state that you expect. If you continue to get this error message, please view the documentation for the provider you're using. This did not happend when I was on 32 Bit, but I had other issues when is what caused me to move up to 64 Bit. When I run vagrant up, it stops on this line: ==> default: Running 'pre-boot' VM customizations... ==> default: Booting VM... ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH address: 127.0.0.1:2201 default: SSH username: vagrant default: SSH auth method: private key Any thoughts on this would be welcomed. I hate that this is happening as I just recently released a podcast episode on how awesome development on Vagrant WAS as of right now, its sucking my time to try to get this in order. Thanks to all in advance! |
Site-To-Site VPN with Quagga Posted: 04 Apr 2022 11:03 PM PDT Can Quagga broadcast a statically configured routes to all the computers in that network. Say for example I have network 10.0.1.0/16. In one of the PC in this network I am running Quaaga server and have configured a route there. Can this route be broadcasted to all the elements in this network? I was trying to find some online help. But, was not successful. I need this for the following scenario of mine - I am using SoftEther VPN Server to make a site to site VPN say between 10.0.10/16 and 30.0.1.0/16 and now the site to site VPN is established, I want to install a route on all the elements in that 10.0.1.0/16 to send the traffic to 30.0.1.0 through this VPN server. Can anyone please help me out with the Quagga configuration to do this. |
Where to find the default status codes file for Apache in Ubuntu 12.04 Posted: 05 Apr 2022 01:04 AM PDT I am trying to customize all the status codes (error codes) in Apache - Ubuntu 12.04 LTS. The error message content I get on the browser for the error code 414 is: Request-URI Too Large The requested URL's length exceeds the capacity limit for this server. I went through the file: /etc/apache2/conf.d/localized-error-pages to see the default file which shows this error, I found the below line: ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var When I go through the file /usr/share/apache2/error/HTTP_REQUEST_URI_TOO_LARGE.html.var I didn't find the same message viewed on the browser! How come? Where I can find the default message to edit it? I edited the above file and nothing changed on the browser! One more thing, how can I customize this error to fit two different websites on the server (each website has different custom_error_414 page) UPDATE: I removed the comments on the file localized-error-pages but the output didn't change, when I add any path in the file localized-error-pages like: ErrorDocument 414 /var/www/myproject/error.php it doesn't work, but when I add a normal string like: ErrorDocument 414 "Long Request" it does work! Please provide some codes and details on how to fix this issue and how to customize the 414 error for two websites. UPDATE Below is the output of wget -O- -S ... --2014-05-02 21:02:26-- http://localhost/error//HTTP_PRECONDITION_FAILED.html.var Resolving localhost (localhost)... ::1, 127.0.0.1 Connecting to localhost (localhost)|::1|:80... failed: Connection refused. Connecting to localhost (localhost)|127.0.0.1|:80... connected. HTTP request sent, awaiting response... HTTP/1.1 403 Forbidden Date: Fri, 02 May 2014 21:02:26 GMT Server: Apache Vary: Accept-Encoding Content-Length: 1 Keep-Alive: timeout=5, max=100 Connection: Keep-Alive Content-Type: text/html; charset=iso-8859-1 2014-05-02 21:02:26 ERROR 403: Forbidden. One more thing, I put the error page in /var/www/myproject/error.php but when I tried: ErrorDocument 414 /var/www/myproject/error.php It didn't work :( While ErrorDocument 414 "Sorry, request is too long" Worked out! How come? Why it doesn't redirect me to the error page? One more thing, I need to make for two websites two different pages, how can I achieve: ErrorDocument 414 sites1 ==> /var/www/myproject1/error.php ErrorDocument 414 sites2 ==> /var/www/myproject2/error.php I want to put the error pages on my /var/www/project folder I would greatly appreciate if you can send me direct steps to follow as I am not experienced system admin and I can't find documentation about this on the internet, it is very poor. EDIT Thanks for the detailed answer, I have followed your steps but I have minor issues would appreciate your input. a. Below is the configuration file for the errors /etc/apache2/conf.d/localized-error-pages #Alias /error/ "/usr/share/apache2/error/" Options IncludesNoExec AddOutputFilter Includes html AddHandler type-map var Order allow,deny Allow from all LanguagePriority en cs de es fr it nl sv pt-br ro ForceLanguagePriority Prefer Fallback ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.vr ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var ErrorDocument 410 /error/HTTP_GONE.html.var ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var b. I have enabled the 3 mods successfully. c. I have copied: cp -R /usr/share/apache2/error/include /usr/share/apache2/include_site1 also cp -R /usr/share/apache2/error/include /usr/share/apache2/include_site2 d. In site1 configuration in the page: /etc/apache2/sites-available/site1 , I added: Alias /error/include "/usr/share/apache2/error/include_site1" Alias /error/ "/usr/share/apache2/error/"
e. apache2ctl configtest Syntax OK f. Reloaded the Apache, loaded without errors. g. wget -O- ..../error/HTTP_REQUEST_URI_TOO_LARGE.html.var result is: HTTP request sent, awaiting response... 200 OK Length: 223 [text/html] Saving to: `STDOUT' 0% [ ] 0 --.-K/s [an error occurred while processing this directive] The length of the requested URL exceeds the capacity limit for this server. The request cannot be processed. [an error occurred while processing this directive] 100%[==============================================================================================================================>] 223 --.-K/s in 0s 2014-05-04 17:48:33 (73.1 MB/s) - written to stdout [223/223]
h. Tried from the browser: .../error/HTTP_REQUEST_URI_TOO_LARGE.html.var The same result as step 8 but the in the browser i. When I try placing huge request in the browser like: ...../site1/sj7xlekrjsuglkehgigl........., I get empty output on the browser and in the network (F12) I can see 414 error status How can I get this working? I need to give the code 404 for the 414 error and I need to use (include) the customized PHP pages on each website, which is /var/www/site1/not_found.php Edit 2 I have added the below in sites available, but if I put long URL in browser, it doesn't redirect me to index.php nor to not_found.php page. I need the long URL error (414) to direct me to 404 page :( I am really upset I can't find any help online. Error like 414 doesn't work like 404 easily, they built inside the system. 404 is very easy for me! But can't configure 414!!! ErrorDocument 404 /not_found.php <IfModule mod_rewrite.c> RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> For example in sites-available the below doesn't work ErrorDocument 414 /not_found.php |
Why does sub_filter seem to not work when used in conjunction with proxy_pass? Posted: 05 Apr 2022 12:53 AM PDT Given the following configuration of nginx: server { listen 80; server_name apilocal; sub_filter "apiupstream/api" "apilocal"; sub_filter_once off; location /people/ { proxy_pass http://apiupstream/api/people/; proxy_set_header Accept-Encoding ""; } } Sub_filter does not properly response parts of the response. Once I remove proxy_pass from the configuration, it works properly. A lot of folks with this problem end up having gzip compression from the upstream server. I've verified that my upstream server does not have gzip encoding turned on for its responses. But just in case, I've also used the proxy_set_header above to not accept gzip. Is there potentially something else I'm missing? |
IUSR not able to access network resources Posted: 04 Apr 2022 10:01 PM PDT I have a website which access a network path for images including logos on the website. There is a virtual directory pointing to this network shared folder and I gave anonymous access to this virtual directory. This is to make sure that logos and images are available in login page, register page. Webserver is running windows 2008 R2 IIS 7.5 Fileserver is running windows 2008 R2 Both are on same domain network I use IUSR as anonymous user identity, and this works fine in UAT environment. Unfortunately not working on production environment. While troubleshooting I grant Everyone full access to network shared folder, still no luck. The images are not loading for anonymous users. Could anyone shed some light on this? |
No comments:
Post a Comment