This is a story about btrfs and docker build server. Decomissioned hardware with AMD Phenom X4 was brought to life again after Intel Spectre/Meltdown bugs, however problem of not tightly installed RAM modules went unnoticed. Electrical connection between pins was not reliable and from time to time headless server was crashing due to corrupted memory. After cold restart it was working again. Until it was loaded with building docker images. Once ssh failed with I/O error from filesystem and after warm reboot server was dead. After attaching display it was visible that boot process crashed early on btrfs open_ctree_failed.
OK, there is initrd with btrfsck. Let's try btrfsck --repair. According to output there is a disaster.
Let's check what else we have with this tool: -b use the first valid backup root copy. Command line tool did something, but after --repair rerun still nothing. Assessment of situation: brtfs seriously damaged, no backup since it was simple server for building docker images. Nothing important was on disks, everything important was pushed to the cloud. Reinstall Linux, now with ZFS? OK, booting USB installer. Next, next, hmm - installer sees btrfs volumes. How is it possible? Running dmesg. Kernel sees partition, tries to reply transactions but fails with checksums.
OK, now: btrfsck --repair -b --init-csum-tree. Waiting....
Mounting. Now kernel fails with extents. How about: btrfsck --repair -b --init-csum-tree --init-extent-tree?
After many minutes fsck finishes and I'm able to mount fs read write. Listing content and there is /root and /home. Reboot and server is fully operational!
Filesystem is probably rock solid, but fsck is written this way that it totally doesn't help people to recover filesystem.
Pokazywanie postów oznaczonych etykietą Oracle. Pokaż wszystkie posty
Pokazywanie postów oznaczonych etykietą Oracle. Pokaż wszystkie posty
piątek, kwietnia 13, 2018
środa, lipca 15, 2015
wtorek, sierpnia 19, 2014
ConnectionConsumer API for AQjmsConnection
public synchronized ConnectionConsumer createConnectionConsumer(
Destination destination, String s,
ServerSessionPool serversessionpool, int i) throws JMSException {
//AQjmsError.throwEx(102);
return _createConnectionConsumer(destination, null, s, serversessionpool, i);
}
private ConnectionConsumer _createConnectionConsumer(final Destination destination,
final String sub, final String s, final ServerSessionPool spool, final int max) {
return new ConnectionConsumer() {
private boolean closed = false;
private final LinkedBlockingQueue<Long> trigger = new LinkedBlockingQueue<Long>();
private AtomicLong counter = new AtomicLong(0);
@SuppressWarnings("unused")
private Thread bootstrapThread = bootstrapConsumers();
@Override
public ServerSessionPool getServerSessionPool() throws JMSException {
return spool;
}
@Override
public void close() throws JMSException {
closed = true;
}
public Thread bootstrapConsumers() {
Thread coordinator = new Thread() {
public void run() {
setName("ConsumerCoordinator "+Thread.currentThread().getId());
long lastCnt = 0;
while (!closed) {
Long value = null;
try {
value = trigger.poll(1, TimeUnit.SECONDS);
}
catch (InterruptedException e) {}
if ((value!=null && counter.get() < max) && !closed) {
Thread th = new Thread() {
public void run() {
runConsumer();
}
};
th.setDaemon(true);
th.start();
}
long currentCnt = counter.get();
if (currentCnt!=lastCnt) {
System.out.println("Server session pool #"+spool.hashCode()+" has got active "+counter.get()+" session(s), max is "+max);
lastCnt = currentCnt;
}
}
}
};
coordinator.setDaemon(true);
coordinator.start();
trigger.add(System.currentTimeMillis());
return coordinator;
}
public void runConsumer() {
Thread.currentThread().setName("Connection consumer "+Thread.currentThread().getId());
counter.incrementAndGet();
ServerSession ss = null;
Session sess = null;
MessageListener appSrvMessageListener = null;
while (!closed) {
try {
if (ss==null) {
ss = spool.getServerSession(); /* app srv will block */
trigger.put(System.currentTimeMillis());
sess = ss.getSession();
appSrvMessageListener = sess.getMessageListener();
}
if (sess==null) {
sess = ss.getSession();
}
sess.setMessageListener(null);
MessageConsumer mc = (sub!=null) ?
sess.createDurableSubscriber((Topic) destination, sub, s, false) :
sess.createConsumer(destination, s);
while (!closed) {
LinkedList list = new LinkedList();
int limit = 1; /* XA: one transaction per message */
for (int i=0; i < limit; i++) {
Message m = null;
try {
m = (i==limit-1) ? mc.receive(1000) : mc.receiveNoWait();
if (m!=null)
list.add(m);
}
catch (Exception e) {
System.out.println("Error while trying to receive message from JMS server, destination="+destination+", subscription="+sub+", selector="+s+": "+ e);
try {
sess.close();
}
catch (Exception ee) {}
sess = null;
break;
}
}
if (sess==null)
break;
if (!list.isEmpty()) {
synchronized (ss) {
for (Message m : list)
appSrvMessageListener.onMessage(m);
/*ss.start();*/
}
}
}
}
catch (Exception exception) {
System.out.println("Cannot consume JMS connection (but will retry), destination="+destination+", subscription="+sub+", selector="+s+": "+ exception);
try {
if (sess!=null)
sess.close();
}
catch (Exception e) {}
}
}
counter.decrementAndGet();
Logger.debug("EMS Connection Consumer closed (permanently), destination="+destination+", subscription="+sub+", selector="+s);
Logger.debug("Connection #"+hashCode()+" consumer counter is "+counter.get());
}
};
}
Destination destination, String s,
ServerSessionPool serversessionpool, int i) throws JMSException {
//AQjmsError.throwEx(102);
return _createConnectionConsumer(destination, null, s, serversessionpool, i);
}
private ConnectionConsumer _createConnectionConsumer(final Destination destination,
final String sub, final String s, final ServerSessionPool spool, final int max) {
return new ConnectionConsumer() {
private boolean closed = false;
private final LinkedBlockingQueue<Long> trigger = new LinkedBlockingQueue<Long>();
private AtomicLong counter = new AtomicLong(0);
@SuppressWarnings("unused")
private Thread bootstrapThread = bootstrapConsumers();
@Override
public ServerSessionPool getServerSessionPool() throws JMSException {
return spool;
}
@Override
public void close() throws JMSException {
closed = true;
}
public Thread bootstrapConsumers() {
Thread coordinator = new Thread() {
public void run() {
setName("ConsumerCoordinator "+Thread.currentThread().getId());
long lastCnt = 0;
while (!closed) {
Long value = null;
try {
value = trigger.poll(1, TimeUnit.SECONDS);
}
catch (InterruptedException e) {}
if ((value!=null && counter.get() < max) && !closed) {
Thread th = new Thread() {
public void run() {
runConsumer();
}
};
th.setDaemon(true);
th.start();
}
long currentCnt = counter.get();
if (currentCnt!=lastCnt) {
System.out.println("Server session pool #"+spool.hashCode()+" has got active "+counter.get()+" session(s), max is "+max);
lastCnt = currentCnt;
}
}
}
};
coordinator.setDaemon(true);
coordinator.start();
trigger.add(System.currentTimeMillis());
return coordinator;
}
public void runConsumer() {
Thread.currentThread().setName("Connection consumer "+Thread.currentThread().getId());
counter.incrementAndGet();
ServerSession ss = null;
Session sess = null;
MessageListener appSrvMessageListener = null;
while (!closed) {
try {
if (ss==null) {
ss = spool.getServerSession(); /* app srv will block */
trigger.put(System.currentTimeMillis());
sess = ss.getSession();
appSrvMessageListener = sess.getMessageListener();
}
if (sess==null) {
sess = ss.getSession();
}
sess.setMessageListener(null);
MessageConsumer mc = (sub!=null) ?
sess.createDurableSubscriber((Topic) destination, sub, s, false) :
sess.createConsumer(destination, s);
while (!closed) {
LinkedList
int limit = 1; /* XA: one transaction per message */
for (int i=0; i < limit; i++) {
Message m = null;
try {
m = (i==limit-1) ? mc.receive(1000) : mc.receiveNoWait();
if (m!=null)
list.add(m);
}
catch (Exception e) {
System.out.println("Error while trying to receive message from JMS server, destination="+destination+", subscription="+sub+", selector="+s+": "+ e);
try {
sess.close();
}
catch (Exception ee) {}
sess = null;
break;
}
}
if (sess==null)
break;
if (!list.isEmpty()) {
synchronized (ss) {
for (Message m : list)
appSrvMessageListener.onMessage(m);
/*ss.start();*/
}
}
}
}
catch (Exception exception) {
System.out.println("Cannot consume JMS connection (but will retry), destination="+destination+", subscription="+sub+", selector="+s+": "+ exception);
try {
if (sess!=null)
sess.close();
}
catch (Exception e) {}
}
}
counter.decrementAndGet();
Logger.debug("EMS Connection Consumer closed (permanently), destination="+destination+", subscription="+sub+", selector="+s);
Logger.debug("Connection #"+hashCode()+" consumer counter is "+counter.get());
}
};
}
Oracle AQ XA Connection
There is a bug in aqapi.jar AQjmsGeneralDBConnection which prevents usage of XA outside Oracle WebLogic.
Here is a bugfix:
private String getProviderKey() throws JMSException {
try {
OracleConnection oracleconnection = (OracleConnection) m_dbConn;
+ if (oracleconnection==null)
+ oracleconnection = (OracleConnection) m_xaConn.getConnection();
String s = oracleconnection.getURL();
int i = s.indexOf('@');
String s1;
if (i < 0) {
if (!"jdbc:oracle:kprb:".equals(((Object) (s)))
&& !"jdbc:default:connection:".equals(((Object) (s))))
AQjmsError.throwEx(112);
s1 = "jdbc:oracle:kprb:";
} else {
s1 = s.substring(i);
}
return s1.toUpperCase();
} catch (SQLException sqlexception) {
throw new AQjmsException(sqlexception);
}
}
oracle.jms.traceLevel=6
oracle.jms.useNativeXA=true
oracle.jms.useEmulatedXA=false
oracle.jms.j2eeCompliant=true
Here is a bugfix:
private String getProviderKey() throws JMSException {
try {
OracleConnection oracleconnection = (OracleConnection) m_dbConn;
+ if (oracleconnection==null)
+ oracleconnection = (OracleConnection) m_xaConn.getConnection();
String s = oracleconnection.getURL();
int i = s.indexOf('@');
String s1;
if (i < 0) {
if (!"jdbc:oracle:kprb:".equals(((Object) (s)))
&& !"jdbc:default:connection:".equals(((Object) (s))))
AQjmsError.throwEx(112);
s1 = "jdbc:oracle:kprb:";
} else {
s1 = s.substring(i);
}
return s1.toUpperCase();
} catch (SQLException sqlexception) {
throw new AQjmsException(sqlexception);
}
}
oracle.jms.traceLevel=6
oracle.jms.useNativeXA=true
oracle.jms.useEmulatedXA=false
oracle.jms.j2eeCompliant=true
execute dbms_aqadm.create_queue_table(queue_table => 'XA.JMS_Q_STORE001', queue_payload_type => 'sys.aq$_jms_message', multiple_consumers => false); execute dbms_aqadm.create_queue(queue_name => 'XA.test_fw1', queue_table => 'XA.JMS_Q_STORE001'); execute dbms_aqadm.start_queue('XA.test_fw1')
@ActivationConfigProperty(propertyName = "destination", propertyValue = "Queues/test_fw1"),
poniedziałek, grudnia 09, 2013
Kernel 3.8.13 od Oracle-a dla RHEL 6.5
http://public-yum.oracle.com/public-yum-ol6.repo
http://public-yum.oracle.com/repo/OracleLinux/OL6/UEKR3/latest/x86_64/
Btrfs send-receive wreszcie dostępne.
http://public-yum.oracle.com/repo/OracleLinux/OL6/UEKR3/latest/x86_64/
Btrfs send-receive wreszcie dostępne.
środa, sierpnia 28, 2013
Tracing Oracle connectivity problem (connection timed out on socket)
tcpdump -nnvvXS host oracle-db-prd
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
11:33:13.433097 IP (tos 0x0, ttl 64, id 36655, offset 0, flags [DF], proto TCP (6), length 60)
192.168.100.3.36283 > 192.168.1.10.1521: Flags [S], cksum 0x7cab (correct), seq 3238343368, win 14600, options [mss 1460,sackOK,TS val 678084071 ecr 0,nop,wscale 7], length 0
0x0000: 4500 003c 8f2f 4000 4006 870c 0af3 025e E..<./@.@......^
0x0010: 0acb 0c65 8dbb 05f1 c105 32c8 0000 0000 ...e......2.....
0x0020: a002 3908 7cab 0000 0204 05b4 0402 080a ..9.|...........
0x0030: 286a bde7 0000 0000 0103 0307 (j..........
11:33:13.434046 IP (tos 0x0, ttl 63, id 0, offset 0, flags [DF], proto TCP (6), length 52)
192.168.1.10.1521 > 192.168.100.3.36283: Flags [S.], cksum 0xacc3 (correct), seq 4037414683, ack 3238343369, win 5840, options [mss 1380,nop,nop,sackOK,nop,wscale 7], length 0
0x0000: 4500 0034 0000 4000 3f06 1744 0acb 0c65 E..4..@.?..D...e
0x0010: 0af3 025e 05f1 8dbb f0a6 0f1b c105 32c9 ...^..........2.
0x0020: 8012 16d0 acc3 0000 0204 0564 0101 0402 ...........d....
0x0030: 0103 0307 ....
11:33:13.434153 IP (tos 0x0, ttl 64, id 36656, offset 0, flags [DF], proto TCP (6), length 40)
192.168.100.3.36283 > 192.168.1.10.1521: Flags [.], cksum 0x03a3 (correct), seq 3238343369, ack 4037414684, win 115, length 0
0x0000: 4500 0028 8f30 4000 4006 871f 0af3 025e E..(.0@.@......^
0x0010: 0acb 0c65 8dbb 05f1 c105 32c9 f0a6 0f1c ...e......2.....
0x0020: 5010 0073 03a3 0000 P..s....
11:33:13.434506 IP (tos 0x0, ttl 64, id 36657, offset 0, flags [DF], proto TCP (6), length 321)
192.168.100.3.36283 > 192.168.1.10.1521: Flags [P.], cksum 0x25b4 (incorrect -> 0x00d9), seq 3238343369:3238343650, ack 4037414684, win 115, length 281
0x0000: 4500 0141 8f31 4000 4006 8605 0af3 025e E..A.1@.@......^
0x0010: 0acb 0c65 8dbb 05f1 c105 32c9 f0a6 0f1c ...e......2.....
0x0020: 5018 0073 25b4 0000 0119 0000 0100 0000 P..s%...........
0x0030: 0136 012c 0e41 2000 7fff 4f98 0000 0001 .6.,.A....O.....
0x0040: 00df 003a 0000 0000 8181 0000 0000 0000 ...:............
0x0050: 0000 0000 0000 0000 0000 0000 0000 0000 ................
0x0060: 0000 2844 4553 4352 4950 5449 4f4e 3d28 ..(DESCRIPTION=(
0x0070: 4144 4452 4553 533d 2850 524f 544f 434f ADDRESS=(PROTOCO
0x0080: 4c3d 5443 5029 2848 4f53 543d 3130 2e32 L=TCP)(HOST=orac
0x0090: 3033 2e31 322e 3130 3129 2850 4f52 543d le-db-prd)(PORT=
0x00a0: 3135 3231 2929 2843 4f4e 4e45 4354 5f44 1521))(CONNECT_D
0x00b0: 4154 413d 2843 4944 3d28 5052 4f47 5241 ATA=(CID=(PROGRA
0x00c0: 4d3d 4a44 4243 2054 6869 6e20 436c 6965 M=JDBC.Thin.Clie
0x00d0: 6e74 2928 484f 5354 3d5f 5f6a 6462 635f nt)(HOST=__jdbc_
0x00e0: 5f29 2855 5345 523d 7469 6263 6f29 2928 _)(USER=tibco))(
0x00f0: 5345 5256 4943 455f 4e41 4d45 3d71 786c SERVICE_NAME=crm
0x0100: 6477 6829 2843 4944 3d28 5052 4f47 5241 001)(CID=(PROGRA
0x0110: 4d3d 4a44 4243 2054 6869 6e20 436c 6965 M=JDBC.Thin.Clie
0x0120: 6e74 2928 484f 5354 3d5f 5f6a 6462 635f nt)(HOST=__jdbc_
0x0130: 5f29 2855 5345 523d 7469 6263 6f29 2929 _)(USER=tibco)))
0x0140: 29 )
11:33:13.435530 IP (tos 0x0, ttl 63, id 15716, offset 0, flags [DF], proto TCP (6), length 40)
192.168.1.10.1521 > 192.168.100.3.36283: Flags [.], cksum 0x02c7 (correct), seq 4037414684, ack 3238343650, win 54, length 0
0x0000: 4500 0028 3d64 4000 3f06 d9eb 0acb 0c65 E..(=d@.?......e
0x0010: 0af3 025e 05f1 8dbb f0a6 0f1c c105 33e2 ...^..........3.
0x0020: 5010 0036 02c7 0000 0000 0000 0000 P..6..........
11:33:13.435660 IP (tos 0x0, ttl 63, id 15717, offset 0, flags [DF], proto TCP (6), length 117)
192.168.1.10.1521 > 192.168.100.3.36283: Flags [P.], cksum 0x8f72 (correct), seq 4037414684:4037414761, ack 3238343650, win 54, length 77
0x0000: 4500 0075 3d65 4000 3f06 d99d 0acb 0c65 E..u=e@.?......e
0x0010: 0af3 025e 05f1 8dbb f0a6 0f1c c105 33e2 ...^..........3.
0x0020: 5018 0036 8f72 0000 004d 0000 0500 0000 P..6.r...M......
0x0030: 0043 2844 4553 4352 4950 5449 4f4e 3d28 .C(DESCRIPTION=(
0x0040: 4144 4452 4553 533d 2850 524f 544f 434f ADDRESS=(PROTOCO
0x0050: 4c3d 5443 5029 2848 4f53 543d 3130 2e32 L=TCP)(HOST=orac
0x0060: 3033 2e31 322e 3429 2850 4f52 543d 3135 le-prd1)(PORT=15
0x0070: 3231 2929 29 21)))
11:33:13.435682 IP (tos 0x0, ttl 64, id 36658, offset 0, flags [DF], proto TCP (6), length 40)
192.168.100.3.36283 > 192.168.1.10.1521: Flags [.], cksum 0x023d (correct), seq 3238343650, ack 4037414761, win 115, length 0
0x0000: 4500 0028 8f32 4000 4006 871d 0af3 025e E..(.2@.@......^
0x0010: 0acb 0c65 8dbb 05f1 c105 33e2 f0a6 0f69 ...e......3....i
0x0020: 5010 0073 023d 0000 P..s.=..
11:33:13.435700 IP (tos 0x0, ttl 63, id 15718, offset 0, flags [DF], proto TCP (6), length 40)
192.168.1.10.1521 > 192.168.100.3.36283: Flags [F.], cksum 0x0279 (correct), seq 4037414761, ack 3238343650, win 54, length 0
0x0000: 4500 0028 3d66 4000 3f06 d9e9 0acb 0c65 E..(=f@.?......e
0x0010: 0af3 025e 05f1 8dbb f0a6 0f69 c105 33e2 ...^.......i..3.
0x0020: 5011 0036 0279 0000 0000 0000 0000 P..6.y........
11:33:13.436176 IP (tos 0x0, ttl 64, id 36659, offset 0, flags [DF], proto TCP (6), length 40)
192.168.100.3.36283 > 192.168.1.10.1521: Flags [F.], cksum 0x023b (correct), seq 3238343650, ack 4037414762, win 115, length 0
0x0000: 4500 0028 8f33 4000 4006 871c 0af3 025e E..(.3@.@......^
0x0010: 0acb 0c65 8dbb 05f1 c105 33e2 f0a6 0f6a ...e......3....j
0x0020: 5011 0073 023b 0000 P..s.;..
11:33:13.437033 IP (tos 0x0, ttl 63, id 15719, offset 0, flags [DF], proto TCP (6), length 40)
192.168.1.10.1521 > 192.168.100.3.36283: Flags [.], cksum 0x0278 (correct), seq 4037414762, ack 3238343651, win 54, length 0
0x0000: 4500 0028 3d67 4000 3f06 d9e8 0acb 0c65 E..(=g@.?......e
0x0010: 0af3 025e 05f1 8dbb f0a6 0f6a c105 33e3 ...^.......j..3.
0x0020: 5010 0036 0278 0000 0000 0000 0000 P..6.x........
caused by: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:458)
at oracle.jdbc.driver.PhysicalConnection.
at oracle.jdbc.driver.T4CConnection.
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:521)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at com.tibco.pe.core.JDBCPool.getConnectionEntry(Unknown Source)
at com.tibco.pe.core.JDBCPool.getConnectionEntry(Unknown Source)
at com.tibco.pe.core.JDBCPoolManager.getConnectionEntry(Unknown Source)
at com.tibco.plugin.jdbc.JDBCActivity.eval(Unknown Source)
at com.tibco.pe.plugin.Activity.eval(Unknown Source)
at com.tibco.pe.core.TaskImpl.eval(Unknown Source)
at com.tibco.pe.core.Job.a(Unknown Source)
at com.tibco.pe.core.Job.k(Unknown Source)
at com.tibco.pe.core.JobDispatcher$JobCourier.a(Unknown Source)
at com.tibco.pe.core.JobDispatcher$JobCourier.run(Unknown Source)
Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
at oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:392)
at oracle.net.resolver.AddrResolution.resolveAndExecute(AddrResolution.java:434)
at oracle.net.ns.NSProtocol.establishConnection(NSProtocol.java:687)
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:343)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1102)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:320)
... 16 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
środa, lipca 31, 2013
No protocol specified, Could not initialize class sun.awt.X11.XToolkit [Oracle install via VNC]
Do not run vncserver as a root, a don't do 'su oracle'. Start VNC sever as a plain user, start runInstaller within his VNC session.
poniedziałek, lipca 29, 2013
Jak na RHEL6 zainstalować Btrfs od Oracle-a
#[root@eai-node-02 /]# cd /etc/yum.repos.d
#[root@eai-node-02 /]# wget https://public-yum.oracle.com/public-yum-ol6.repo
#[root@eai-node-02 yum.repos.d]# yum --nogpgcheck --disablerepo=* --enablerepo=ol6_UEK_latest install kernel-uek
#[root@eai-node-02 yum.repos.d]# yum --nogpgcheck --disablerepo=* --enablerepo=ol6_UEK_latest install btrfs-progs
#[root@eai-node-02 /]# wget https://public-yum.oracle.com/public-yum-ol6.repo
#[root@eai-node-02 yum.repos.d]# yum --nogpgcheck --disablerepo=* --enablerepo=ol6_UEK_latest install kernel-uek
#[root@eai-node-02 yum.repos.d]# yum --nogpgcheck --disablerepo=* --enablerepo=ol6_UEK_latest install btrfs-progs
środa, lutego 13, 2013
Bezpieczeństwo chmury Oracle
Rozwiązania chmurowe cechuje to, że na potężnym serwerze z dużą ilością CPU i RAM hostowanych jest wiele maszyn wirtualnych różnych klientów. Czy jest gwarancja, że dane klientów (zwłaszcza osobowe, wrażliwe, finansowe, poufne) będą zupełnie odseparowane? W przypadku sprzętowej izolacji SPARC LDOMs raczej tak. W przypadku rozwiązania software-owego Xen, Sun xVM, Oracle VM Server for x86 niekoniecznie.
Wątpliwości, co do Oracle VM Server for x86:
- rozwiązanie Sun xVM zostało stworzone przez inżynierów Sun Microsystems, którzy odeszli z firmy
- czy Oracle ma wystarczającą liczbę wysokiej klasy specjalistów od tego oprogramowania?
- kod Oracle VM Server for x86 jest rozwijany rozłącznie w stosunku do Xen, co z backportem patchy na luki bezpieczeństwa?
czwartek, listopada 22, 2012
Przykłady na schemacie Oracle HR
select sys.dbms_xmlgen.getxml('select e.first_name || '' '' ||
e.last_name as full_name, d.manager_id as manager_id, d.department_name,
l.city, cursor(select em.first_name || '' '' || em.last_name as
full_name, j.job_title from hr.employees em, hr.jobs j where
em.manager_id = d.manager_id and em.job_id = j.job_id) as employee from
hr.departments d, hr.employees e, hr.locations l where d.location_id =
l.location_id and (l.city like ''' || ? || ''') and e.employee_id =
d.manager_id') as xml from dual
niedziela, września 09, 2012
DRBD w Oracle Linux 6.3 z OEK 2.6.39
Sytuacja jest o tyle inna w stosunku do Red Hata, że DRBD 8.3.11 jest w jądrze Oracle Enterprise Kernel, potrzebne są tylko narzędzia userspace. Konfiguracja zasobu wygląda tak:
resource eai-store-01 {
protocol C;
startup {
become-primary-on both;
}
syncer {
verify-alg sha1;
csums-alg md5;
rate 100M;
}
net {
allow-two-primaries;
data-integrity-alg sha1;
connect-int 20;
ping-int 15;
timeout 10;
cram-hmac-alg sha1;
shared-secret 7812352gsd7t327r56;
after-sb-0pri discard-zero-changes;
after-sb-1pri discard-secondary;
after-sb-2pri disconnect;
}
disk {
on-io-error pass_on;
fencing dont-care;
}
on eai1 {
device minor 1;
disk /dev/sdb1;
meta-disk internal;
address 192.168.100.71:7789;
}
on eai2 {
device minor 1;
disk /dev/sdb1;
meta-disk internal;
address 192.168.100.72:7789;
}
}
resource eai-store-01 {
protocol C;
startup {
become-primary-on both;
}
syncer {
verify-alg sha1;
csums-alg md5;
rate 100M;
}
net {
allow-two-primaries;
data-integrity-alg sha1;
connect-int 20;
ping-int 15;
timeout 10;
cram-hmac-alg sha1;
shared-secret 7812352gsd7t327r56;
after-sb-0pri discard-zero-changes;
after-sb-1pri discard-secondary;
after-sb-2pri disconnect;
}
disk {
on-io-error pass_on;
fencing dont-care;
}
on eai1 {
device minor 1;
disk /dev/sdb1;
meta-disk internal;
address 192.168.100.71:7789;
}
on eai2 {
device minor 1;
disk /dev/sdb1;
meta-disk internal;
address 192.168.100.72:7789;
}
}
piątek, stycznia 13, 2012
Użycie wskazanego drivera Oracle metodą brute force
LinkedList<URL> cpList = new LinkedList<URL>();
try {
cpList.add(new URL("jar:file:/ojdbc_11_2_5.jar!/");
}
catch (MalformedURLException e) {
throw new RuntimeException(e);
}
URLClassLoader parent = (URLClassLoader) this.getClass()
.getClassLoader();
for (URL url : parent.getURLs()) {
String su = url.toString();
if (!(su.contains("ojdbc")))
cpList.add(url);
}
Logger.getInstance().debug(
"Using url "+cpList.get(0)+" for loading Oracle driver");
URLClassLoader cl = new URLClassLoader(
cpList.toArray(new URL[0]), null);
ClassLoader savedClassLoader = Thread.currentThread()
.getContextClassLoader();
// because of 'javax.management.InstanceAlreadyExistsException
// com.oracle.jdbc:type=diagnosability,
// name=sun.misc.Launcher$AppClassLoader@92e78c'
Thread.currentThread().setContextClassLoader(cl);
Driver drv = (Driver) cl.loadClass(
"oracle.jdbc.OracleDriver").newInstance();
Thread.currentThread().setContextClassLoader(savedClassLoader);
czwartek, grudnia 08, 2011
Oracle against Spring
Właścicielem Springa jest VMware - konkurencja w wirtualizacji i cloud computing.
piątek, października 28, 2011
Oracle Day 2011
Sponsorem konferencji był Intel, miał też swoją prezentację, w której pokazywał innowacyjność firmy, ukierunkowanie na przyszłość, wsłuchiwanie się i przewidywanie potrzeb klientów oraz synergię z korporacją Oracle. Był to bardzo ważny sygnał: x86 mówimy tak! Tej architekurze można ufać i stawiamy na nią długoterminowo. Exadata, Exalogic, Exalytics - wszystkie te rozwiązania używają procesorów Intel Xeon. Dla sceptyków jest SuperCluster na T4. Oracle 11g na Exadata może być 20-50x szybszy: kontrolery dysków używają podtrzymywanego bateryjnie cache-u na pamięciach DDR3, zapis do cache-u powoduje powrót z operacji I/O; logi bazy są przetrzymywane na dedykowanych, jeszcze szybszych niż standardowe, dyskach SSD; dane są kompresowane - kompresja i dekompresja na wydajnym procesorze przy mniejszej liczbie odczytanych/zapisanych bloków storage-u daje mierzalne przyśpieszenie (patrz: testy btrfs w serwisie Phoronix); wreszcie baza wie jak mapują się kolumny na bloki na dysku i dzięki temu czyta tylko to, czego potrzebuje zapytanie SQL użytkownika, a nie leci sekwencyjnie po całych rekordach. Zwróćcie uwagę na literkę 'c' w Oracle Enterprise Manager 12c - to nawiązanie do chmury (co ciekawe EM ma w interfejsie webowym integrację z Metalinkiem). Na potężnych maszynach (w jednej szafie po kilkanaście albo więcej serwerów) można faktycznie stawiać rozwiązania Infrastructure/Platform-As-A-Service. Oracle jest firmą totalną. Teraz widać jak na dłoni jak przemyślane i strategiczne było przejęcie Sun Microsystems: Oracle może zaoferować klientom gotowe rozwiązanie, które wstawia się tylko do serwerowni dostając gotową bazę danych i serwer aplikacyjny.Big Data - Oracle dostrzegł potencjał NoSQL. BerkeleyDB to teraz Oracle NoSQL Enterprise do gromadzenia danych surowych, które mają być dalej przefiltrowane przez Oracle Hadoop lub obrobione przez Oracle R (wersja środowiska R dostosowana do współpracy z Exadata/Exalytics).
Gwiazdami konferencji byli: Michał Kostrzewa (ma dobre założenie, że audytorium to IT, kadra zarządzająca i biznes), Marek Martofel (profesjonalny, doświadczony, techniczny), Marcin Kozak (prawdziwy ewangelista, działkę Sun DSEE zamienił na bezpieczeństwo) oraz Jurek Owsiak (20 lat WOŚP i Oracle-a). Brakowało mi Waldka Kota (BEA). Grzegorz Świątek z PW EE zadał ciekawe pytanie: czy skoro na Oracle Solaris i Oracle Unbreakable Linux mamy tak samo nazywający się Oracle VM 3.0, to czy w przyszłości platformy te będzie można łączyć. Pytanie jednak pozostało bez odpowiedzi, a było bardzo uzasadnione w kontekście newsów o portowaniu ZFS-a i DTrace na Linuksa.
Wiceprezes Oracle Application Product Marketing Folia Grace (której amerykańskiego angielskiego słuchało się z przyjemnością, po przedmówcy Francuzie) zwróciła uwagę na istotny trend: za moment proporcje rynków established/emerging będą 50/50. Duże korporacje muszą zmieniać strategię i orientować się także na małych klientów.
Konferencja dla niektórych wymagała poświęceń - na jej rzecz z firmowego wyjazdu integracyjnego zrezygnowali koledzy z działek Unix, Capacity i BSCS. Ja jestem aspołecznym typem i integruję się tylko w ramach EAI :)
sobota, października 15, 2011
The American Dream
Firma, która z sukcesem stworzyła Uniksa na Big Iron. Marzeniem młodych inżynierów było pracować w Sun-ie. Zone-y, ZFS, DTrace były innowacyjnymi pomysłami. OpenSolaris i OpenJDK były wydarzeniami, które odbiły się szerokim echem w branży IT. Sun w dużym stopniu wspierał środowisko Gnome (poprzez Java Desktop System). Ludzie z tej firmy jako pierwsi z branży zaczęli prowadzić blogi. Sun był otwarty. Dali społeczności darmowy serwer aplikacyjny i darmowe ESB. Od czego zaczęła się rewolucja 3D (Compiz) na linuksowym desktopie? Od projektu Sun Looking Glass.Oracle drastycznie zmienił kierunek, z czym wielu pracowników fioletowej korporacji nie mogło się pogodzić. Odeszło wielu wartościowych ludzi, którzy stworzyli potęgę techniczną Sun Microsystems. Jak bez nich będzie rozwijał się komercyjny i zamknięty Solaris? Architekt infrastruktury, podejmując w tym momencie strategiczne i długoterminowe decyzje, widząc duże przyśpieszenie RedHata (patrz Cluster Suite, High Availability Add-On), ma poważne wątpliwości którą opcję wybrać.
Obecnie dewelopmentem Javy kieruje Henrik Stahl (BEA JRockit). Co do koncepcji, to dobrze, ale co do jakości wydań to Java 7.0 ze słynnym już Segmentation Fault ma jakość niektórych wersji JRockita...
piątek, sierpnia 19, 2011
Klient Java 1.5 do WebLogic-a 11g działającego na Javie 1.6
http://download.oracle.com/docs/cd/E12840_01/wls/docs103/client/jarbuilder.htmlsobota, lipca 23, 2011
Oracle kupił Ksplice
Ksplice pozwala na patchowanie linuksowego kernela w pamięci bez konieczności restartu maszyny. Czy to taka innowacyjna funkcjonalność? Można dyskutować. Rozwiązania failover radzą sobie z niedostępnością pojedynczej maszyny. W przypadku wykrytej dziury zawsze jest jeszcze firewall, NX, AppArmor, SELinux.Oracle buduje swoje kompetencje przez przejęcia innych firm i niewątpliwie jest to ważny sygnał: chcemy być kluczowym dostawcą Linuksa - w oficjalnym oświadczeniu mowa jest o tym, że nie będzie supportu ksplice na konkurencyjncych dystrybucjach SUSE i RedHat. Wygląda na to, że za moment będziemy mieli napiętą sytuację. Oracle Unbreakable Linux to klon RedHata. Firma RedHat ma bardzo duży wkład w rozwój Linuksa, o czym można się m.in. przekonać, patrząc na kompleksowe rozwiązanie MRG. RedHat się napracuje, a kasę zgarnie Oracle. RedHat z JBoss Middleware robi konkurencję Oracle Fusion. Jakiś czas temu taką konkurencją na rynku SMB było OpenESB i zostało zniszczone po przejęciu Sun-a.
Oracle nachalnie wpychający się do firm ze swoją kosztowną dla klienta koncepcją One IT (sprzęt, OS, baza danych, serwer aplikacyjny, ESB, CRM, BI) próbuje zawłaszczyć kolejny obszar - Linuksa.
środa, czerwca 22, 2011
wtorek, czerwca 21, 2011
niedziela, marca 20, 2011
System plików a baza danych
4 miliony insertów i 2000 selektów z agregacją rozdzielone na 6 równoległych wątków komunikujących się po TCP/IP z bazą HSQLDB (tabelki cached, końcowy rozmiar 1,3GB) umiejscowioną na różnych systemach plików.32-bitowe OpenSUSE 11.4 / 32-bitowy Solaris 11 Express, 1GB RAM, Sun Java 6.0. Czas trwania benchmarku podany w sekundach.
NilFS jest systemem plików z garbage collectorem, który może działać zbyt wolno dopuszczając do zapełnienia partycji: java.sql.BatchUpdateException: Data File size limit is reached at org.hsqldb.jdbc.JDBCPreparedStatement.executeBatch(JDBCPreparedStatement.java:1928). Wersjonowanie to fajna rzecz, ale mało powtarzalna i degradowalna z czasem wydajność sprawiają, że nie nadaje się do produkcyjnego użycia.
Wnioski: Wydajność Ext4 i XFS-a jest zbliżona, a systemy plików rozwijane przez Oracle-a (ZFS i BtrFS) są od tych linuksowych sporo wolniejsze. Miło, że z biegiem czasu natywny linuksowy system plików dogonił produkt SGI. ZFS jest fajny, ale jak widać nie we wszystkich zastosowaniach. Jedyny z w/w systemów, który umożliwia defragmentację to XFS.
Subskrybuj:
Posty (Atom)























