Archive for ronhks

Transmission network problem

Recently started in debug mode on Transmission and I see:

[17:42:40.319] UDP Failed to set receive buffer: requested 4194304, got 262142 (tr-udp.c:75)
[17:42:40.319] UDP Please add the line "net.core.rmem_max = 4194304" to /etc/sysctl.conf (tr-udp.c:80)
[17:42:40.319] UDP Failed to set send buffer: requested 1048576, got 262142 (tr-udp.c:86)
[17:42:40.319] UDP Please add the line "net.core.wmem_max = 1048576" to /etc/sysctl.conf (tr-udp.c:91)

By tuning the two variables, higher throughput can be achieved more easily using uTP.

Here’s the relevant part from the changeset :

Since we are using a single UDP socket to implement multiple UTP sockets,
and since we are not always timely in servicing an incoming UDP packet,
it is important to use a large receive buffer. The send buffer is probably
less critical, we increase it nonetheless.

Four megabytes might seem huge for embedded clients, but running behind a dedicated connection, it might even become too small. I recommend using 16 megabytes for receive buffering and 4 for the send buffer. That is, because uTP implements a retransmission algorithm and by scaling up the buffers we can achieve fewer retransmits because of dropped datagrams. Let’s set it up that way.

Check actual settings:

sysctl -p

do the modifications:

echo 'net.core.rmem_max = 16777216' >> /etc/sysctl.conf
echo 'net.core.wmem_max = 4194304' >> /etc/sysctl.conf
sysctl -p

src: https://falkhusemann.de/blog/2012/07/transmission-utp-and-udp-buffer-optimizations/

Oracle 11g XE install on Ubuntu 14/16

After Ubuntu downloaded and installed.

First install Java:

sudo add-apt-repository ppa:webupd8team/java

sudo apt-get update

sudo apt-get install oracle-java8-installer

Set JAVA_HOME

sudo nano /etc/bash.bashrc
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export PATH=$JAVA_HOME/bin:$PATH

Reload sources:

source /etc/bash.bashrc

Check:

echo $JAVA_HOME

result should be:

/usr/lib/jvm/java-8-oracle

Second: Download and prepare Oracle DB

Copy the downloaded file and paste it in home directory.

Unzip using the command:
unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip 

Install required packages using the command:

sudo apt-get install alien libaio1 unixodbc

Enter into the Disk1 folder using command:

cd Disk1/

Convert RPM package format to DEB package format (that is used by Ubuntu) using the command:

sudo alien --scripts -d oracle-xe-11.2.0-1.0.x86_64.rpm

Create the required chkconfig script using the command:

sudo pico /sbin/chkconfig

The pico text editor is started and the commands are shown at the bottom of the screen. Now copy and paste the following into the file and save:

#!/bin/bash
# Oracle 11gR2 XE installer chkconfig hack for Ubuntu
file=/etc/init.d/oracle-xe
if [[ ! `tail -n1 $file | grep INIT` ]]; then
    echo >> $file
    echo '### BEGIN INIT INFO' >> $file
    echo '# Provides: OracleXE' >> $file
    echo '# Required-Start: $remote_fs $syslog' >> $file
    echo '# Required-Stop: $remote_fs $syslog' >> $file
    echo '# Default-Start: 2 3 4 5' >> $file
    echo '# Default-Stop: 0 1 6' >> $file
    echo '# Short-Description: Oracle 11g Express Edition' >> $file
    echo '### END INIT INFO' >> $file
fi
update-rc.d oracle-xe defaults 80 01

Change the permission of the chkconfig file using the command:

sudo chmod 755 /sbin/chkconfig  

Set kernel parameters. Oracle 11gR2 XE requires additional kernel parameters which you need to set using the command:

sudo pico /etc/sysctl.d/60-oracle.conf

Copy the following into the file and save:

# Oracle 11g XE kernel parameters 
fs.file-max=6815744  
net.ipv4.ip_local_port_range=9000 65000  
kernel.sem=250 32000 100 128 
kernel.shmmax=536870912 

Verify the change using the command:

sudo cat /etc/sysctl.d/60-oracle.conf 

You should see what you entered earlier. Now load the kernel parameters:

sudo service procps start

Verify the new parameters are loaded using:

sudo sysctl -q fs.file-max

You should see the file-max value that you entered earlier.

Set up /dev/shm mount point for Oracle. Create the following file using the command:

sudo pico /etc/rc2.d/S01shm_load

Copy the following into the file and save.

#!/bin/sh
case "$1" in
start)
    mkdir /var/lock/subsys 2>/dev/null
    touch /var/lock/subsys/listener
    rm /dev/shm 2>/dev/null
    mkdir /dev/shm 2>/dev/null
*)
    echo error
    exit 1
    ;;

esac

Change the permissions of the file using the command:

sudo chmod 755 /etc/rc2.d/S01shm_load

Now execute the following commands:

sudo ln -s /usr/bin/awk /bin/awk 
sudo mkdir /var/lock/subsys 
sudo touch /var/lock/subsys/listener

Install Oracle

Install the oracle DBMS using the command:

sudo dpkg --install oracle-xe_11.2.0-2_amd64.deb

Configure Oracle using the command:

sudo /etc/init.d/oracle-xe configure

Setup environment variables by editting your .bashrc file:

pico ~/.bashrc

Add the following lines to the end of the file:

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export ORACLE_BASE=/u01/app/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export PATH=$ORACLE_HOME/bin:$PATH

Load the changes by executing your profile:

. ~/.bashrc

Start the Oracle 11gR2 XE:

sudo service oracle-xe start

Add user YOURUSERNAME to group dba using the command:

sudo usermod -a -G dba YOURUSERNAME

 

src: https://askubuntu.com/questions/566734/how-to-install-oracle-11gr2-on-ubuntu-14-04 and https://www.quora.com/How-can-I-install-Oracle-11g-in-Ubuntu-16-04LTS

gentoo beragadt init script takarítása

/etc/init.d/docker zap

 

Debian 8 Docker daemon default start params remove

Somebody at debian’s thought, it will be very usefull, if adds the

-H fd://

param to the docker daemon default

To remove it, and use the /etc/docker/daemon.json do this below:

vi /lib/systemd/system/docker.service

mod this line:

ExecStart=/usr/bin/dockerd -H fd://

to

ExecStart=/usr/bin/dockerd

than reload the daemon config

systemctl daemon-reload

and reload the service

/etc/init.d/docker restart

 

 

JDK 8 Failed to read schema document ‘xjc.xsd’, because ‘file’ access is not allowed due to restriction set by the accessExternalSchema property.

The error msg is:

java.lang.AssertionError: org.xml.sax.SAXParseException; systemId: jar:file:/path/to/glassfish/modules/jaxb-osgi.jar!/com/sun/tools/xjc/reader/xmlschema/bindinfo/binding.xsd; lineNumber: 52; columnNumber: 88; schema_reference: Failed to read schema document ‘xjc.xsd’, because ‘file’ access is not allowed due to restriction set by the accessExternalSchema property.

the resolution is:

Create a file named jaxp.properties (if it doesn’t exist) under /path/to/jdk1.8.0/jre/lib and then write this line in it:

javax.xml.accessExternalSchema = all

src: https://stackoverflow.com/questions/23011547/webservice-client-generation-error-with-jdk8

gigabit e1000e Detected Hardware Unit Hang

If we see it in

$ dmesg
[Tue Feb 13 20:53:07 2018] e1000e 0000:00:19.0 eno1: Detected Hardware Unit Hang:
                             TDH                  <1b>
                             TDT                  <76>
                             next_to_use          <76>
                             next_to_clean        <1b>
                           buffer_info[next_to_clean]:
                             time_stamp           <361c0382c>
                             next_to_watch        <1e>
                             jiffies              <361c056ec>
                             next_to_watch.status <0>
                           MAC Status             <80083>
                           PHY Status             <796d>
                           PHY 1000BASE-T Status  <3800>
                           PHY Extended Status    <3000>
                           PCI Status             <10>
[Tue Feb 13 20:53:07 2018] e1000e 0000:00:19.0 eno1: Reset adapter unexpectedly

the resulution is:

$ ethtool -K eth0 gso off gro off tso off

 

for gentoo, add these lines into

$ vi /etc/conf.d/net
postup(){

  /usr/sbin/ethtool -K eno1 gso off gro off tso off

}

 

src: https://serverfault.com/questions/616485/e1000e-reset-adapter-unexpectedly-detected-hardware-unit-hang

Tomcat 8.5 manager app, manager-script role

Mert másodszor futottam bele. A tomcat 8.5 alap manager appjában változott (szigorodott) a jogosultság kezelés.

Az alábbi sort ki kell kommentezni:

CATALINA_HOME/webapps/manager/META-INF/context.xml 

 

<Context antiResourceLocking="false" privileged="true" >
<!--
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />
-->
</Context>

src: https://stackoverflow.com/questions/40503771/tomcat-8-5-403-access-denied

MySQL root pwd reset

/etc/init.d/mysql stop

next start damon at safe mode

mysqld_safe --skip-grant-tables

connect to the safe mode daemon into mysql database

mysql --user=root mysql

change pwd

update user set Password=PASSWORD('new-password') where user='root';

Finish

flush privileges;
exit;

kill safe moded daemon

than restart deamon

/et/init.d/mysql start

test the new pwd

mysql -u root -p

 

 

Adot napnál régebbi fájlok megkeresése

find . -maxdepth 1 -daystart -mtime +0 -ls

 

Pidgin facebook usage

Most useful solution:

Download, install (copy ddl-s), then restart. Done.

Thanks!

DLL-s:

https://github.com/dequis/purple-facebook/wiki/Installing-on-Windows