📜 ⬆️ ⬇️

Raising the Likard collection host on Ubuntu

The host of collection Likard is “highly specialized software, which has no analogues for Linux, is unsuitable for .....”, demanding to the most various trifles. It is not enough just to raise XP in a virtual machine so that you can recover lost hours and nights of system downtime due to the inclusion of bare unsafe Windows; it is not acceptable to keep something separate for the fulfillment of these tasks in your close home-office populated by juvenile saboteurs. Entertaining action, played out under the cut as it were, tells us about the degree of progress in the development and improvement of the distribution’s friendliness over the past year, and its high suitability for solving such problems ...

... Could I alone make so much noise? "(C) Piglet

1. What is Licard?

Who would I drop?

The official version can be found here.
Briefly: a network of POS-terminals at gas stations in the CIS and Eastern Europe, deployed to service branded EMV-cards Licard. The company's clients are mostly large freight forwarders (truckers) and the oil and gas sector. The terminals operate in offline mode, communicating with the company's data collection and transmission centers several times a day via GPRS, Ethernet, or a wired telephone. The process of exchanging information of the POS terminal and TsSiPD - called collection, and TsSiPD - collection hosts.

2. Identifying problems

Almost everywhere, collection hosts are located in specially equipped premises, in the offices of the company, on dedicated servers for collection. But in Eastern Siberia, Likard is most often represented by one employee performing the collection of terminals, technical support of gas station operators, etc. in the home-office mode, autonomously. The necessary software for the collection is deployed on his home computer. Changes in the situation are not foreseen: the volume of purchases on fuel cards is an order of magnitude smaller than even in Western Siberia, the profit received from them (only 3% from each purchase) will not cover the cost of maintaining even a small office.

The collection host is a composition of specially configured hardware, closed and outdated software: the inbound processing complex and the generation of outgoing "mail" of terminals and the terminal collection complex (downloading updated reference books from mail, uploading transaction files).
Iron - external dial-up modem (for example, my Zyxel U-1496E for reliable connection on the most noisy lines), 3G-stick for collection of terminals via GPRS and Ethernet with a connected external static IP address service (# Huawei E1550), COM- port (which is currently rare) for connecting an external modem or a communication cable of the terminal.
The basis of the first complex is Microsoft Office 97 (in particular, its Access 97 component) and the Microsoft Windows 2000 operating system (or XP with registry modifications). Moreover, MSO97 - strictly updated in a special way, more modern versions do not work correctly with the database written in 97th year, processing it from scratch in a more modern package - for unknown reasons, is considered the main organization to be empty.
The basis of the second complex - created by the central development department of the Information Exchange Host (abbreviated XOI), replacing the previously used Prowin2k. HOI consists of communication, control and configuration applications. Communication - a console application without an interface, control - the actual interface to it, which allows to observe the collection process and manage the communication application. The configuration application is an ini-file editor of settings that is picked up by the communication application at startup. All 3 parts are written under windows, although such a unit implies the possibility of easy porting to Linux.

In recent years, when replacing and upgrading the iron of collection hosts, various problems arose with MSO97 - due to more than 1Gb of RAM, too large partitions on the hard disk. It is also a problem for Windows, especially in the light of connecting to the Internet through an external static IP address - at least you have to close unnecessary ports and work through Outpost Firewall. But the main thing - all this is deployed on a home computer, whose owner does not at all bring joy to work in an outdated and insecure system. Put in another section of the hard drive Ubuntu, now used as the main system, closes the need to work with Windows is not fully. For 3 hours a day, it was necessary to reboot under Windows to receive "mail", collect terminals and create "mail" with the received transactions.

3. My interest

Wordpress don't let me down

Reduce communication with Windows to zero by solving the tasks of Home- and Office- in the Ubuntu operating system. Although the experience of intensive use of Linux is currently only 9 months old, I have already learned a little and have translated about 70 PCs at work (3 computer classes and about 10 “office” machines). After a few months of using Ubuntu as the main system, daily reboots with pulling out 3 fruitful hours from life are pretty much boring. The fact that half of the documents, logs, history and mail is under the same XP, and half - under Ubuntu, caused great discomfort. Ugly ...

4. Description of the transfer process of HOI

a) Ubuntu 9.10, updated to 10.04

Experiments began with an open virtual machine from Oracle, accessible from the Ubuntu repository. The uninteresting part (the banal installation of WinXP on the created virtual disk) will not be described here. The next, more interesting part is below.

Settings and failures.

  1. Oracle VirtualBox OSE didn’t provide a COM port to the guest system well enough, didn’t know how to work with USB devices . I had to switch to a closed version, the benefit of the virtual disk, and the settings she picked up without any problems. On it, an external dial-up modem immediately became friends with the host. The joy of seeing the first collection terminal was inexpressible. 3 useful hours drop out of life reduced to useless 15 minutes

  2. The closed Oracle VirtualBox refused to “turn on” a perfectly visible 3G modem allowed by it. This meant that “quickly and simply”, including GPRS directly from the guest system, would not work. It remained to make work 3G-modem from under Ubuntu. Up to this point, I did not use 3G under Ubuntu - initially Network Manager in Ubuntu 9.10 interfered with the operation of any configured pppoe-connection or 3G-connection - did not catch the DNS server addresses provided by the connections. Therefore, its packages have been removed, but about 3G is forgotten before the event. Not wanting to return to Network Manager, MobilePartner, a 3G modem management interface for Linux from Megaphone, was found and installed. The success was not complete, because there was a problem of resetting the key fob mode in “modem + CD” from the only valid “modem only”. It was overcome as follows: physically disconnecting the modem, sending a mode recovery command via the terminal, connecting the modem back. Not the most optimal solution, but the modem began to be steadily determined, and at the right moment did not go into whims

  3. Oracle VirtualBox by default closes all ports for the guest system. In the VM options, NAT is enabled, the guest XP browser opens web pages, but GPRS collection is not sent to the host. After clarifying the circumstances (thanks to openkazan ), the desired port was thrown into the guest system . Now, even 15 minutes every day I have not been seen under Windows more) ...

  4. The time of the guest and host systems did not match each other. The host system lived in summer time, and the guest system - in winter. VirtualBox does not emulate the BIOS, the guest helped me edit the clock from “hours” for a couple of seconds - then the time was “synchronized” with the virtual BIOS timer, and the difference returned. The change of zones helped visually - but this did not affect the time of the COI. The time of the terminals was synchronized with a false value, a mess appeared. Terminals called at the same time, and on the other day they called earlier or later than expected, they had to lose 3 hours of life again just to synchronize the time of the terminals and restore order. Previously, I encountered a similar problem on WinXP, immediately after upgrading to SP3 — it, like Ubuntu, was fictitiously time-shifting, only on the clock in the tray. As a result, the collection schedule was strayed and the transaction files received in the first hour after midnight were recorded yesterday, which is completely unacceptable. Initially, the translation of XP time helped for another hour ahead, then the best way was found - turning off the automatic transfer of hours and synchronization with the time server - using the first and thinking about something like the second, Google helped find a better medicine for this trouble.
    Yes, VirtualBox does not allow you to specify the absolute amount of time for the guest system. But it allows you to set the deviation in milliseconds of the guest time relative to the host time ... Translation of the command from win to lin and several experiments resulted in selecting the correct value of the phase shift parameter :) , control time synchronization under Ubuntu, and the bottle of Pauliner as a reward)

  5. Simply copying the files to the folder of the host machine that is connected to the network drive drives the time attributes onto them. In the morning, copying the received transaction files to the correct folder of the host machine, connected as a network drive Z, the above described trail was discovered. But the simple solution came by itself - we archive the portable files with 7z on the guest system, copy the archive somewhere, unpack it - and the attributes are intact. Characteristically, the reverse copying (from the host Z to the guest C) does not destroy the time attributes.

  6. Simultaneously working 2 connections violate the passage of packets to the XOR. The last of the problems encountered. If you connect 3G simultaneously with connected pppoe - there will be no GPRS collection ... The first curved field solution is to physically detach the pppoe cable, reboot, turn on GPRS. The second one is somewhat less crooked and without rebooting:

    sudo poff dsl-provider
    < GPRS GUI Mobile Partner>>
    15 ,
    < GPRS GUI Mobile Partner>
    sudo pon dsl-provider
    < >

So, stepping on all the rakes and surviving, my collection began to go strictly according to the regulations)

b) Ubuntu 10.10 out of the box. From 10.2010 to this day

In October, Maverick became available ..
I read the public opinion of him about the numerous flaws, disclaimers from the transition, but my biggest mistake is installing Ubuntu 9.10 - allocating only 16Gb to all its sections, began to affect more and more often. First, 4Gb of the root partition ran out, and when they were increased to 10Gb by reducing the partition with / home, problems arose with the latter. The daily increase in the archive of service mail by 10 ~ 20MB - and now the Thunderbird base ate a little more than half of the section ... So the photos from the digital camera that were conveniently laid out by Picassa had to be transported several times to the win-section and then every time to search for which one (their 7 ) ... Constant monitoring of free space for 2 months, output to stable 1.2Gb and understanding - I don’t want to go without special need on NTFS, FAT32 partitions. The result was a big purge, the release of 80Gb from one of the NTFS partitions (28 root + 2 swap + 50 / home) and installing the freshest Ubuntu 10.10 on the disc, with tranquility - I don’t lose anything, I don’t like it - I’ll return to my 10.04 and put on download a fresh ArchLinix distribution) ... But - I liked it.

Significantly reduced size of weekly updates (zoo software and garbage packages in the new system is not, because I already decided on the necessary set for myself), successfully copied the mail database and the necessary software settings from the old / home, smaller pluses - no special mention deserve (sort of stopped the hangs of the Xs in the middle of work) . The virtual disk with HOI has been moved to / home and eliminated the need to automount ntfs partitions when booting ...

Over the year, from release 9.10 to release 10.10, a lot has been done, Ubuntu has become an order of magnitude friendlier, in a variety of ways, I guarantee it) ..

5. Profit

The goals have been achieved, the tasks have been fulfilled, the interest has been acquired) ... Even in a larger volume and better quality than was previously thought. So, the VDI image of the screw with the host can be transferred to the very different hardware and OS painlessly, without having to communicate every time with installing the necessary software, configuring it for the first time and other windows-user joys ... Working under the white external static IP has become safer for the host, because on the 8888 port open by hand and some well-known — there is no access ... The problems of Google-Earth and other software, a curve in their latest linux-versions, / me are not really touched either - they settled in a virtual machine, although for some of them wouldn't) ...

Actually the result :)

Respect neonxp for proofreading)

PS: oh, my crying to ..)

Source: https://habr.com/ru/post/107302/

All Articles