Error upgrading from 1.1.37 to 1.2.1

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Moderators, Developers

Author
Message
netniV
Cacti Guru User
Posts: 2885
Joined: Sun Aug 27, 2017 12:05 am

Re: Error about 1.2.0, but I am upgrading from 1.1.37 to 1.2

#16 Post by netniV » Sat Feb 02, 2019 7:43 pm

That looks like the 1.1.37 install wizard, not the 1.2.x one. Again, I think this comes down to your webroot path and apache configuration. This is another reason why I like to be absolute rather than using the symlink shortcut. After all, switching between versions using the symlink may sound cool and easy, but often there are database changes that mean you shouldnt' revert to an earlier version (a column was removed or added which can cause issues).

I use Git personally to do my upgrades rather than system packages and always have. So, switching versions is as easy as specifying a release tag. But even with that, I still don't downgrade any production system unless there's been no database mods because of issues that could arise.

stormonts
Cacti User
Posts: 296
Joined: Tue Mar 31, 2009 10:05 am

Re: Error about 1.2.0, but I am upgrading from 1.1.37 to 1.2

#17 Post by stormonts » Tue Feb 05, 2019 1:21 pm

I had minor progress on this but it is still getting stuck on something. I change the Apache conf file to point directly to /usr/local/cacti-1.2.1 and was then taken to the 1.2.1 install wizard but then it gets stuck on this screen. Hitting "Next" causes a progress bar at the top of the screen but then I am back on this page. No combination of the sliders (assuming both of them to the left means that I don't want to do a scan) will allow the upgrade to get past this screen.
install.png
install.png (32.33 KiB) Viewed 395 times

netniV
Cacti Guru User
Posts: 2885
Joined: Sun Aug 27, 2017 12:05 am

Re: Error about 1.2.0, but I am upgrading from 1.1.37 to 1.2

#18 Post by netniV » Wed Feb 06, 2019 7:07 am

OK. Get to this point in your browser, hit next and see if there are any console errors. Additionally, if not, run the following command in MariaDB/MySQL, then remove any log/install*.log, then return to the browser and hit next. Once the page reloads once, send me the log/install-complete.log to [email protected] so I can review what is occurring.

Code: Select all

mysql> REPLACE INTO settings VALUES ('log_install','4')
Once that has been sent, replace the 4 with a 0 and it will turn logging off again (4 is quite high level of logging so you don't want that on permanently for every upgrade).

stormonts
Cacti User
Posts: 296
Joined: Tue Mar 31, 2009 10:05 am

Re: Error about 1.2.0, but I am upgrading from 1.1.37 to 1.2

#19 Post by stormonts » Wed Feb 06, 2019 11:10 am

Sorry for misunderstanding the one comment, but where would I look for any console errors?

User avatar
Osiris
Cacti Pro User
Posts: 863
Joined: Mon Jan 05, 2015 10:10 am

Re: Error about 1.2.0, but I am upgrading from 1.1.37 to 1.2

#20 Post by Osiris » Thu Feb 07, 2019 6:11 pm

In your browser, press F12, and look for the Console tab.
Before history, there was a paradise, now dust.

stormonts
Cacti User
Posts: 296
Joined: Tue Mar 31, 2009 10:05 am

Re: Error upgrading from 1.1.37 to 1.2.1

#21 Post by stormonts » Wed Feb 13, 2019 4:02 pm

I don't know how I did it, but I finally got past that screen. Some combination of moving the sliders and putting a random IP in the box got the install to move on.

Now I have an issue making spine 1.2.1:

Code: Select all

/usr/local/src/cacti-spine-1.2.1> sudo make install
gcc -DHAVE_CONFIG_H -I. -I./config     -I/usr/include/net-snmp -I/usr/include/net-snmp/.. -I/usr/include/mysql -g -O2 -MT sql.o -MD -MP -MF .deps/sql.Tpo -c -o sql.o sql.c
mv -f .deps/sql.Tpo .deps/sql.Po
gcc -DHAVE_CONFIG_H -I. -I./config     -I/usr/include/net-snmp -I/usr/include/net-snmp/.. -I/usr/include/mysql -g -O2 -MT spine.o -MD -MP -MF .deps/spine.Tpo -c -o spine.o spine.c
spine.c: In function ‘main’:
spine.c:663:2: internal compiler error: Illegal instruction
  until.tv_sec = (time_t)(set.poller_interval + begin_time - 0.2);
  ^~~~~
0xa2483f crash_signal
        ../../gcc-8.1.0/gcc/toplev.c:325
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
make: *** [spine.o] Error 1

netniV
Cacti Guru User
Posts: 2885
Joined: Sun Aug 27, 2017 12:05 am

Re: Error upgrading from 1.1.37 to 1.2.1

#22 Post by netniV » Thu Feb 14, 2019 4:53 am

I wonder if it is because gcc is now disliking the use of a keyword as a variable name. gcc 8 must be bleeding edge stuff as I only have 7.3 on my Ubuntu installation.

However, to make sure, I've made the following change so see if it works for you:

Code: Select all

diff --git a/spine.c b/spine.c
index 03edcb9..bb7c45a 100644
--- a/spine.c
+++ b/spine.c
@@ -198,7 +198,7 @@ int main(int argc, char *argv[]) {
        int device_threads;
        sem_t thread_init_sem;
        int a_threads_value;
-       struct timespec until;
+       struct timespec until_spec;

        #ifdef HAVE_LCAP
        if (geteuid() == 0) {
@@ -660,8 +660,8 @@ int main(int argc, char *argv[]) {
        sem_init(&thread_init_sem, 0, 1);

        /* specify the point of timeout for timedwait semaphores */
-       until.tv_sec = (time_t)(set.poller_interval + begin_time - 0.2);
-       until.tv_nsec = 0;
+       until_spec.tv_sec = (time_t)(set.poller_interval + begin_time - 0.2);
+       until_spec.tv_nsec = 0;

        sem_getvalue(&active_threads, &a_threads_value);
        SPINE_LOG_MEDIUM(("DEBUG: Initial Value of Active Threads is %i", set.threads - a_threads_value));
@@ -742,7 +742,7 @@ int main(int argc, char *argv[]) {

                retry1:

-               if (sem_timedwait(&active_threads, &until) == -1) {
+               if (sem_timedwait(&active_threads, &until_spec) == -1) {
                        if (errno == ETIMEDOUT) {
                                SPINE_LOG(("ERROR: Spine Timed Out While Processing Devices Internal"));
                                canexit = TRUE;

stormonts
Cacti User
Posts: 296
Joined: Tue Mar 31, 2009 10:05 am

Re: Error upgrading from 1.1.37 to 1.2.1

#23 Post by stormonts » Thu Feb 14, 2019 10:20 am

No luck.

Code: Select all

util-st-01:/usr/local/src/cacti-spine-1.2.1> sudo make install
gcc -DHAVE_CONFIG_H -I. -I./config     -I/usr/include/net-snmp -I/usr/include/net-snmp/.. -I/usr/include/mysql -g -O2 -MT spine.o -MD -MP -MF .deps/spine.Tpo -c -o spine.o spine.c
spine.c: In function ‘main’:
spine.c:663:2: internal compiler error: Illegal instruction
  until_spec.tv_sec = (time_t)(set.poller_interval + begin_time - 0.2);
  ^~~~~~~~~~
0xa2483f crash_signal
        ../../gcc-8.1.0/gcc/toplev.c:325
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
make: *** [spine.o] Error 1

netniV
Cacti Guru User
Posts: 2885
Joined: Sun Aug 27, 2017 12:05 am

Re: Error upgrading from 1.1.37 to 1.2.1

#24 Post by netniV » Thu Feb 14, 2019 11:06 am

Then this sounds like a bug with the GCC more than a problem with the code and I can't do much about that I'm afraid. Try downgrading your GCC

stormonts
Cacti User
Posts: 296
Joined: Tue Mar 31, 2009 10:05 am

Re: Error upgrading from 1.1.37 to 1.2.1

#25 Post by stormonts » Thu Feb 14, 2019 11:09 am

Yes, an older version worked. Thanks for the help.

Post Reply